Showing results for 
Search instead for 
Did you mean: 
New Member

Flow error when attachments are not added

Hi all,


I hope you can help me with this issue. I am trying to make a flow from data extracted of a form. This form has the option (not mandatory) to add attachments. the flow should trigger an email with the attachments in it.

For now, I made possible to get the attachments in outlook, but whenever the form is filled in without attachments, this fails. 

When I try to add a condition before the Parse JSON depending on if there is attachments or not, I can't complete the path when there is attachments, because I can't make the step of "initialize variable" in the sub-path of "Yes". I get the following error:
Does anyone have an alternative for it? 
Thank you very much, it has been driving me crazy...
New Member

The first screenshot has been removed of my message:


Community Support
Community Support

Hi @sespinac,


Initialize a variable should out of a loop, condition branch.

You could initialize a variable after trigger, then create a condition to check if the submited form contains attachments, if contains, append the variable, and send Email with attachment variable. Or send Email without attachment variable.


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

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,680)