cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Flow failed if no attachment in Microsoft Forms

Hi, 

I have created a Microsoft Forms with Upload File attachment and added the actions of "When a new response is submitted" -> "Get response details"-> "Parse JASON" -> "Get File content using path" -> "Send and email" in the flow to include the attachment or as a link in an email. However, I found that if there is no attachment in the Forms, the flow would be failed.  

 

Can I have some advices on how to fix this issue? Is there a condition action that I have to add? 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Anonymous ,

 

Please try to refer to the following image to configure flow.

Use length() function to check if there are attachments uploaded to the Forms.

If yes, use Parse JSON to get the attachment content and send it by email; if no, send an email directly.

Image reference:

104.PNG105.PNG

 

Best Regards,

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

View solution in original post

5 REPLIES 5
ChristianAbata
Super User
Super User

we are handling the question here https://powerusers.microsoft.com/t5/Building-Flows/Flow-failed-if-no-attachment-in-Microsoft-Forms/m...



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Anonymous
Not applicable

@ChristianAbataI have uploaded this question twice by accident. Thanks for your advice. 

 

Hi @Anonymous ,

 

Please try to refer to the following image to configure flow.

Use length() function to check if there are attachments uploaded to the Forms.

If yes, use Parse JSON to get the attachment content and send it by email; if no, send an email directly.

Image reference:

104.PNG105.PNG

 

Best Regards,

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

@v-bacao-msftThanks for your advice. I have the problem solved with the help by @ChristianAbata and now able to run the flow without attachment. 

However, since in the attachment field I would allow user to attach more than one document. For example, if I selected 3 documents to upload, I would expect to have 1 work item created in DevOps with 3 document links. But now I have 3 work items created in DevOps with one document link in each item.

May I get some advice on how to fix it? Also, in the Create Work item, I want to show the hyperlink of the 3 documents. 

Please refer to the screen shots of the outcome and flow. 

 

Attachment.PNG

DevOPs.PNG

 

Flow1.PNG

 

Flow2.PNG

 

 

 

 

Hi @Anonymous ,

 

You could use a string variable to store the links and fill the variable in Description field.

Like:

25.PNG

 

Best Regards,

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

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,558)