web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to complete Par...
Power Automate
Answered

Unable to complete Parse JSON form without attachment

(0) ShareShare
ReportReport
Posted on by 12

Hi. I have successfully created a form that now sends to an email address (other than my own) and includes attachments using the Parse JSON tool. When an attachment is uploaded in the form, the flow is successful - however the upload attachments is optional. When users do not add an attachment the flow fails, with the following error:

Unable to process template language expressions in action 'Parse_JSON' inputs at line '0' and column '0': 'Required property 'content' expects a value but got null. Path ''.'.

 

I have spent the last 3 hours Googling how to overcome this - with the only solution being to 'include a condition before the Parse Json'. This is probably correct, however I have zero knowledge how Power Automate really works and everything I have done so far has been copying Youtube content!! 

 

Failed Flow below:

AdamMullins_0-1665135509860.png

Successful flow below (when attachment is added)

AdamMullins_1-1665135622347.png

Can any one help me, with a step by step guide assist me how to get this form to send with or without an attachment! If you can, please treat me like I've never seen a computer before! LOL

 

Really appreciate this community and your support.

Cheers

 

 

Categories:
I have the same question (1)
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @AdamMullins,

     

    I would use a condition action to check that the answer to the Upload Please question is not empty. You can do that by using an expression with the length function. When the length is not equal to 0 it will mean you have some attachment data.

     

    Below is an example of that approach.

     

    1. Add a Condition directly after the Get response details action. Use the following expression:

    length(outputs('Get_response_details')?['body/rcef90edcfcdb49b7b8db8ca7580a964c'])

     

    Make sure you add the expression via the expression tab and also change the question id by your Upload Please question id. That will be different in your form.

     

    2. Place all the other actions (related to the send with attachment scenario) in the If Yes section. 

     

    3. Add whatever you want to do in the no attachment scenario in the If No section.

     

     

    parsejson.png

  • AdamMullins Profile Picture
    12 on at

    Thank you for getting back to me so quickly! I now seeing a new error:

    AdamMullins_0-1665149590619.png

    Below is the config you have suggested:

    AdamMullins_1-1665149631320.png

     

    I dont suppose you would be free for a Teams call?

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @AdamMullins,

     

    Did you update my question id rcef90edcfcdb49b7b8db8ca7580a964c (of the Upload Please question) to your specific question id?

     

    This id will be different in your Microsoft Form.

  • AdamMullins Profile Picture
    12 on at

    This is where my complete lack of knowledge comes in.... could you show me how to obtain the question ID that I need to insert? 

     

    Thank you for your patients!!! 

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @AdamMullins,

     

    You can hover over the field in the interface or even easier, use the peek code feature. With the peek code you can also copy the id value. So, I would use that one.

     

    Below is an animation how you can find it in the Parse Json action.

     

    PeekCode_ParseJson.gif

  • AdamMullins Profile Picture
    12 on at

    Awesome! I have it working. Thank you! The only issue I have now, is this new error - although the email was received as expected both with and without the attachment.

     

    AdamMullins_0-1665152039283.png

     

    I'm assuming I can ignore this error.....

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @AdamMullins,

     

    If you want to avoid that error I would add the Initialize variable action (varFiles of type Array). It looks like that action is missing in your flow setup (while it was there before in your opening post of this thread).

     

    Place it above the Condition action.

     

     

  • AdamMullins Profile Picture
    12 on at

    Thank you so much for your help with this. I now have a working flow and my users are using the form with great success! Cheers.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard