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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Verify if a Microsoft ...
Power Automate
Answered

Verify if a Microsoft Form has an attachment

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I need to verify if a Microsoft Form was submitted with an attachment.

 

Here is the attachment option on my Microsoft Form

form.jpg

Here is how I have my Flow setup

flow2.jpg

 

Regardless of whether I have an attachment or not, I'm still getting "expression result = false".  I'd expect to get a TRUE or FALSE depending on whether I had an attachment on the Form or not.

 

results.jpg

 

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Happy New Year

     

    Check the length of the attachment response using expression.

     

    image.png

    The above expression is as follows:
    length(body('Get_response_details')?['rfd1b4aaa0a4f441da35ecb4dca0bdf7d'])
     
    This is my run history of Get Response Details:
    image.png
    Thanks
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @abm, would I then use the expression in the condition?  What would that look like?

     

    Thanks!

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Thanks for the quick reply. Here I have added a compose action. In your case you can add the expression directly under the If condition under the expression tab next to Dynamic content. See below.

     

    image.png

     

    length(body('Get_response_details')?['rfd1b4aaa0a4f441da35ecb4dca0bdf7d'])
     
    If you need any further help please let me know.
     
    Thanks
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @abm I was able to compose the expression successfully, but I don't know where to go from here.  Do I put the "outputs" in a condition to check if there's an attachment?  I feel like I'm missing the next step.

     

    Flow_3.jpg

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Anonymous 

     

    Yes you can add the output in the condition greater than 0 (Zero). 

    image.png

     

    Or without the compose you can add the expression under the IF statement. See below.

     

    image.png

     

    Both should work.

     

    Thanks

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Please take a try with @abm 's solution and let me know if you have any problem s.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @abm This is exactly what I was missing.  Thank you so much and Happy New Year :)!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This helped me fixed my problem also.
    Thanks a lot

  • jmillar99 Profile Picture
    23 on at

    Thank you for the time you spend to help people with these questions.  Your response helped me as well.

  • Nicolas07 Profile Picture
    42 on at

    Hi @abm ,

    I am trying to do the same thing, but I am getting the following error on the condition: 

     

    Unable to process template language expressions for action 'Condition' at line '1' and column '27420': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#length for usage details.'.

     

     

    This is how my flow looks like.

    Screenshot 2021-06-23 at 12.25.21.png

    It copies responses submitted in a Form into a Sharepoint list. I want it to copy also the attachments (i'm using a parse JSON) in the Sharepoint list too. But if there are no attachments, the Parse JSON fails. So I would like to have the condition to check first if there are any attachments. If yes --> Parse JSON. If not, go to the next step (send email from shared mailbox).

     

    Thanks for your help!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard