Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ++jWpHTQKpzPtHK7BG3RdM
Power Automate - General Discussion
Answered

Sending Emails with attachments from Sharepoint with a master list from Excel

Like (0) ShareShare
ReportReport
Posted on 19 Nov 2024 01:41:22 by 2
Hi,
 
I have an master Excel file from Sahrepoint with [name], [area] and [email].
 
I need to email each email address and attach corresponding PDF files from a different Sharepoint folder that contains the name of the [area] at the start of a long filename.
 
So my flow needs to cycle through each email and find and email the correct area files.  
 
I have been playing round with arrays and variables but I can't get the for each to work and when I do the PDF does not email properly.
 
Any help would be greatly appreciated.
 
Thanks
 
Tristan
Categories:
  • Suggested answer
    Nived_Nambiar Profile Picture
    17,519 Super User 2025 Season 1 on 24 Nov 2024 at 03:25:31
    Sending Emails with attachments from Sharepoint with a master list from Excel
    Hi,
     
    Try like this as mentioned below
     
    I have used excel file for demo this format 
     
     
    See the flow design 
     
    1. Use list rows in excel table to list out rows in table 
     
    2. use apply to each loop to loop through each row in table 
     
    Next steps will be under this loop
     
    2.1- use get files action to get list of files filtered by the file name starting with area column value as shown below
     
    2.2- use get file content to get file content
     
    Expression - 
    first(outputs('Get_files_(properties_only)')?['body/value'])?['{Identifier}']
     
    2.3- use send email to send the email to given email address in excel
    Expression - 
    first(outputs('Get_files_(properties_only)')?['body/value'])?['{Name}']
     
     
     
    Hope it helps !
     
    Mark it as solution if it resolves your query !
     
    Thanks & Regards,
    Nived N

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,013 Most Valuable Professional

Leaderboard
Loading started