cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Send emails to the related receivers with multiple attachments

Hello,

 

There is sernario like this "based on SO# , sending emails with multiple attachments to the related receivers"

 

- I have a table contains some basic data I need in this FLOW

SO.png

 

- 12 folders already created in this case by another FLOW for these 12 SOs, and in each folder, there will be 2-3 files in it.

folder.png

What I need is to send email to those person who is listed in the above table based on each SO#, also I should attached these files form the related SO# folders in each seperate email.

 

So I created a FLOW, not sure if the logic is correct, but face 2 issues until now.

 

1.png

2.png

 

1. there is no attachment array I`ve created in the dynamic content when I try to add something in the Attachment field.

No array in dynamic.png

 

2. This FLOW stops at the step of list files in folder

error.png

 

Any suggestions which might be wrong here?

 

Thanks!

Poorteeth

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Send emails to the related receivers with multiple attachments

Hi @poorteeth,

 

1. The logic is not correct on the Send Email with attachments part, you should put the Send Email out side of the Apply to each 2 action, then the variable will appear, and the Email will send all attachments in the subfolder.Annotation 2020-05-29 153648.jpg

Otherwise, you should create a Set variable action to empty the attachments variable for the next folder, or it will send to next user attachments of previous folder:

Annotation 2020-05-29 154210.jpg

 

2. The Id of the folder is not a simple path, it is a identifier code just like:

"Id": "b!pU4NyuNFGkKxTFjtXlsSD7bybpyEQzJKoBu-ptVexYOVy-rqGZhXRpbeYZUBWGzD.013VAHFSW5PURK2KH6QZBJQTBHEFD5WBFI"

So the way to get the folder named "1", you should list files of the previous level folder, then use condition to find the folder:

Annotation 2020-05-29 155925.jpg

 

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.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Send emails to the related receivers with multiple attachments

Hi @poorteeth,

 

1. The logic is not correct on the Send Email with attachments part, you should put the Send Email out side of the Apply to each 2 action, then the variable will appear, and the Email will send all attachments in the subfolder.Annotation 2020-05-29 153648.jpg

Otherwise, you should create a Set variable action to empty the attachments variable for the next folder, or it will send to next user attachments of previous folder:

Annotation 2020-05-29 154210.jpg

 

2. The Id of the folder is not a simple path, it is a identifier code just like:

"Id": "b!pU4NyuNFGkKxTFjtXlsSD7bybpyEQzJKoBu-ptVexYOVy-rqGZhXRpbeYZUBWGzD.013VAHFSW5PURK2KH6QZBJQTBHEFD5WBFI"

So the way to get the folder named "1", you should list files of the previous level folder, then use condition to find the folder:

Annotation 2020-05-29 155925.jpg

 

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.

View solution in original post

Highlighted
Frequent Visitor

Re: Send emails to the related receivers with multiple attachments

 Hi Lin,

 

I`ve modified some places as you suggested in this flow, so the whole picture looks like below.

whole process.png

 

but, there still has errors when doing the tesing.

1. Apply to each 2, it says "ActionBranchingConditionNotSatisfied. The execution of template action 'List_files_in_folder' skipped: the branching condition for this action is not satisfied." but looks like this step passed anyway.

apply 2 error.png

2.  flow stops at Apply to each 3, below error message appears.

{
  "status"404,
  "message""You cannot get content for a folder",
  "source""api.connectorp.svc.ms"
}
apply 3 error.png

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,701)