Hello,
I have been having the hardest time with this flow. I am looking to make a button start flow that looks in a share point library with a bunch files.
each file has a listed email address. I would like the flow to grab all files for each listed email, group them and attach them into the listed email and send.
im able to make flows that are grabbing all attachments and sending them to every listed email. Instead of sending each set of attachments to the specific email.
thank you so much everyone! I have searched so much and not able to figure this out.
Solved! Go to Solution.
Hi @PA-Jimmy ,
I made a sample for you.
There are the following files in the library, and there is a column of text that is the email address to which the file is sent.
Create a flow, and I will explain it step by step.
Gets the properties of the files in the library.
Select column ‘email address’ data.
Create an array and save only one email address for the same email address.
union(body(‘Select’),body(‘Select’))
Create an empty array.
Add 'Apply to each' to get the properties of the files in the library and filter the same data as the current email address.
Items(‘Apply to each’)?[‘Email’]
Based on the results of the ‘Filter array’, create another 'Apply to each'. Get the file contents based on the path.
items('Apply_to_each_2')['{FullPath}']
Append the following to the empty array.
{"Name": items('Apply_to_each_2')['{FilenameWithExtension}'],
"ContentBytes": body('Get_file_content_using_path')}
Send email with array 'varFile' attached. Finally, set the array to empty.
Items(‘Apply_to_each’)?[‘Email’]
Save flow and run it.
Best Regards,
Wearsky
Hi @PA-Jimmy ,
I made a sample for you.
There are the following files in the library, and there is a column of text that is the email address to which the file is sent.
Create a flow, and I will explain it step by step.
Gets the properties of the files in the library.
Select column ‘email address’ data.
Create an array and save only one email address for the same email address.
union(body(‘Select’),body(‘Select’))
Create an empty array.
Add 'Apply to each' to get the properties of the files in the library and filter the same data as the current email address.
Items(‘Apply to each’)?[‘Email’]
Based on the results of the ‘Filter array’, create another 'Apply to each'. Get the file contents based on the path.
items('Apply_to_each_2')['{FullPath}']
Append the following to the empty array.
{"Name": items('Apply_to_each_2')['{FilenameWithExtension}'],
"ContentBytes": body('Get_file_content_using_path')}
Send email with array 'varFile' attached. Finally, set the array to empty.
Items(‘Apply_to_each’)?[‘Email’]
Save flow and run it.
Best Regards,
Wearsky
Wow, thanks! It works perfectly. I just had a question about making it quicker. I tried to open up the concurrency settings in the 2 apply to each loops and it isn't working as well.
Will this be able to process around 1k pdf files with emails, quickly?
Thanks again for all the help, your solution helped me from going crazy!
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
121 | |
55 | |
37 | |
24 | |
21 |