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

Attach selected files from Onedrive Folder to email

Hi all - i have this challenge and would like to seek your help! 

 

Task: I have a list of people i need to send customized sales reports to every month. Each of them need to receive 2 sales reports: this month sales report and last month sales report. Reports for each recipient are different from each other as those are customized reports - depend on each recipient's business scope. 

 

Input data:

1. I have all of the reports for all recipients saved in Onedrive folder. The naming convention is: recipient name_this month report.xlsx; recipient name_last month report.xlsx 

2. I have another excel file saved in Onedrive that have recipient name and email. 

 

I'm not sure if it's possible to use recipient name as the key to look up the 2 reports for each recipients, and then attach that 2 reports in email and send to him/her? 

 

Thanks so much for your help! 

4 REPLIES 4
Super User III
Super User III

Hi!

 

So, since you have an excel file saved in Onedrive that have recipient name and email, and assuming the data is inside a table, you can have a Recurrence trigger (to execute your flowwith the frequency you need), then 'List Rows PResent in a table' to read all its rows and get emails. Now, you can add an 'Apply to each' to iterate all through them, inside it, you can add an action block to list all files in reports folder ordered by date (this action block can be moved before the Apply to Each), next 'Filter Array' action block to get all the ones matching current recipient name, and take the 2 newest. Still inside the 'Apply to each' you can store those two files in an array add a 'Send an email' action block and use the array to create the attachments.

 

Hope this approach matches your requirements, if so, please let us know your progress and do not hesitate to contact us in case of finding any blocking issue

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@jinny_le Any progress on this topic?

Challenge finally solved? Stuck?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



hi @efialttes 

Thanks for following up! I manage to run the loop and get an email sent to each of the recipient - but i'm still figuring out the sorting reports and attach only relevant one for each of the recipient. I'll keep you updated! 

@jinny_le

Hi again! Any progress on this topic?

Challenge finally solved? Stuck?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



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 (58,280)