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

Community site session details

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

Verify if a Microsoft Form has an attachment

(1) ShareShare
ReportReport
Posted on by

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,858 Most Valuable Professional on at
    Re: Verify if a Microsoft Form has an attachment

    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
    on at
    Re: Verify if a Microsoft Form has an attachment

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

     

    Thanks!

  • abm abm Profile Picture
    32,858 Most Valuable Professional on at
    Re: Verify if a Microsoft Form has an attachment

    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
    on at
    Re: Verify if a Microsoft Form has an attachment

    @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,858 Most Valuable Professional on at
    Re: Verify if a Microsoft Form has an attachment

    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
    on at
    Re: Verify if a Microsoft Form has an attachment

    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
    on at
    Re: Verify if a Microsoft Form has an attachment

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Verify if a Microsoft Form has an attachment

    This helped me fixed my problem also.
    Thanks a lot

  • jmillar99 Profile Picture
    23 on at
    Re: Verify if a Microsoft Form has an attachment

    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
    Re: Verify if a Microsoft Form has an attachment

    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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard