cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AMarple
New Member

Flow building with MS Forms and attachments

I am in the process of building a flow for a team that I work with. Right now, it is set up to trigger on completion of a form in MS Forms to send out an approval and then contingent on the approval, an email to a final party. The email needs to contain attachments from the form and I've got that all figured out to where it works as intended. However, I built it based on the initial assumption that the form would always have an attachment or multiple attachments. After testing it wider with the rest of the team, scenarios popped up in which no attachments would be necessary on the form. When no attachments are present, it then breaks the flow. I am looking for the easiest way to have the flow check for attachments and move on when there aren't any or put them in my array when there are and ideally not have to build two completely separate lines down the flow if that's even possible. FYI - I'm super new to Power Automate (this is the second flow I've built), nor am I any level of programmer or developer, so any help is appreciated.

 

2022-08-26_14-19-29.png

1 ACCEPTED SOLUTION

Accepted Solutions
JimmyWork
Super User
Super User

I have attached an sample of how I did one flow, now this is not based on your flow but it might give you some info on how it can be done.

 

2022-08-29 16_01_48-Edit your flow _ Power Automate.png

View solution in original post

4 REPLIES 4
JimmyWork
Super User
Super User

@AMarple Make a new condition where you select the attachment column is equal to and leave it blank.

 

2022-08-26 23_26_06-Edit your flow _ Power Automate.png

Replace the first one with your field/column that contains the attachment from the form.

AMarple
New Member

@JimmyWork - thanks for the tip. Tried that by adding the condition before the Parse JSON step in the flow above. Then tried to build the the Parse JSON, Initialize Variable and Apply to Each loop from the "If no" side of the control, but got stopped as it wouldn't let me put the Initialize Variable step in there. If I leave those after the control step, it still breaks the flow when there's no attachments. Is the only way to make this work to build the rest of the flow that doesn't include the variable under the "If yes" option for the control, terminate it at the end of that run, then allow the rest of the flow to continue as I've built it after the control to separate the with/without attachments?

JimmyWork
Super User
Super User

I have attached an sample of how I did one flow, now this is not based on your flow but it might give you some info on how it can be done.

 

2022-08-29 16_01_48-Edit your flow _ Power Automate.png

@JimmyWork That worked great, thanks again for the help.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,276)