Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Send emails with different attachments from Sharepoint folder

(2) ShareShare
ReportReport
Posted on by 12
Hi everyone, 
 
I'm trying to build a flow that sends an email to specific recipients and uses as attachment a file specific to each recipient (e.g. sending an email to Mr Brown with the correct attachment file "Curriculum vitae_MrBrown"); all the files that must be used as attachment are stored in a Sharepoint folder, and all the information regarding recipients are stored in a table in Excel file (name and surname, email address, name of the specific attachment file, etc.).
 
I've already managed to build a simplified flow that works fine (it retrieves recipients' info from the Excel table and then, for each of them, retrieves the attachment file from the Sharepoint folder and sends the email), but only if I use the same file as attachment (meaning, for example sending the email to all recipients with the same file attached "Curriculum vitae_MrBrown").
 
 
To make this simplified version work, in the "Get file metadata" and "Get file content" actions I inserted the name of one of the files in the Sharepoint folder (highlighted in yellow in the screens below) as an example, but actually I need the flow to retrieve and attach the correct file associated to each final recipient.
 
I tried to run the flow several time and it always works fine with the same attachment file "Tartarelli_AnnaChiara_ANL_DDP ADV_CV_Mar24.pptx", here you can find the raw Input and Output for the main steps:
"GET FILE METADATA" raw Input >
"GET FILE METADATA" raw Output >
"GET FILE CONTENT" raw Input >
"GET FILE CONTENT" raw Output > see attachment section
"SEND AN EMAIL" raw Input > see attachment section
"SEND AN EMAIL" raw Output >
 
Hope someone can help me, thank you very much in advance!
  • AnnaC Profile Picture
    12 on at
    Send emails with different attachments from Sharepoint folder
    Hi there, 

    as requested, I am adding to the original post some new info on the run of this flow, which is a simplified one able to grab always the same file "Tartarelli_AnnaChiara_ANL_DDP ADV_CV_Mar24.pptx" instead of the correct one at each loop.

    Hope this time I gave the right information; if you have any suggestion on how to make the flow grab the correct file each time, it would be very useful!
    ​​​​​​​
    Thank you in advance!

    ​
  • Michael E. Gernaey Profile Picture
    43,220 Super User 2025 Season 1 on at
    Send emails with different attachments from Sharepoint folder
    Hi
     
    So you said you have an issue awesome, then you did a great job of showing a thing you tried but it didn't work, but didn' tactually share any details about the RUN itself, for your flow, with any details.
     
     
    /cry
     
    So on the Surface, your flow looks fine. But that means nothing at all, if the expressions, the data or anything else is wrong.
     
     
    1. Please do into a run that sent everyone the same file
    2. Show us that for each loop you grabbed the correct file and attached the correct file
    3. Show us the expressions you are using and the Input and Output Properties as they are at RunTime
     
    Please dont waste time writing big things, its nonstop here. please... share what we need. ./cryover

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >