cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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. 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2.PNG
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
 
3.PNG
 
 
 
Does anyone have an alternative for it? 
 
Thank you very much, it has been driving me crazy...
2 REPLIES 2
New Member

The first screenshot has been removed of my message:

1.PNG

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

Announcements
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 (81,084)