Hey all,
I've created a form in Powerapps where it's possible to add an attachment.
After the forum get's submitted I want to notify someone in the organization by email with the information about the form (incl. the attachment).
I've created the flow below when I submit the form the flow runs successful, but it doesn't send a mail.. Before it did send the email, but overnight somehow it doesn't send it anymore.
Does anyone know how to fix this? I have the idea this happens me often
Thanks!
Ramon
Solved! Go to Solution.
Thanks for the screenshot. Expand the Get Attachments step before the foreach and see what that returns. That might be returning null hence For each loop is not iterating the inside actions.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi!
My suggestion is to add a Condition action block before he apply to each, evaluate if get item 'has attachments' is true, on the false branch add a Terminate action block
As @abm suggests, it looks like no attachment is stored, so no there is not Apply to each iteration
Hope this helps
Proud to be a Flownaut!
Check your run history? Which email connector are you using?
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @abm,
When I check my run history I can open the apply to each field and see the details in this field.
When I check the last run I can't view the details Apply to each is vinked correctly but the send email isn't, could this be the issue?
The connectors are active so I don't know if that can be an issue, might need a reset?
Thanks!
Ramon
Thanks for the screenshot. Expand the Get Attachments step before the foreach and see what that returns. That might be returning null hence For each loop is not iterating the inside actions.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @abm ,
I've tried to get attachment content before the apply to each, but it automatically get set back to apply to each.
If I unlock the mail out of the apply to each I can't find the attachment content in the email.
Strange that it worked before and now not anymore.
Thanks.
Ramon
Hi!
My suggestion is to add a Condition action block before he apply to each, evaluate if get item 'has attachments' is true, on the false branch add a Terminate action block
As @abm suggests, it looks like no attachment is stored, so no there is not Apply to each iteration
Hope this helps
Proud to be a Flownaut!
Hi @efialttes and @abm ,
So it looks like if there is no attachment it will not apply to each what will mean there is no email to be send? is that correct?
I'll add an condition and check if that will work.
Thanks!
did it work... inquiring minds want to know.
Thanks,
~Cyn
Yes it worked, somehow the mail didn't send if there wasn't an attachment.
So it did send if there was an attachment, but it didn't if there wasn't
I had to create a condition as below with a "true" if there is an attachment and "false" if there is no attachment.
If it's true I've used the apply to each formula and in the false only the email without an attachment.
This worked for me, the only issue that I run into is that the condition didn't want to work, so I have created an invisible attachment counter which counts my attachments, so if it's 0 there are no attachments, if it's 1 there is 1 attachment and so on
I hope it's clear how I got it running for my case 🙂
Kind Regards,
Ramon
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
24 | |
13 | |
12 | |
8 | |
5 |
User | Count |
---|---|
46 | |
22 | |
16 | |
15 | |
10 |