web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Automatic Email

(0) ShareShare
ReportReport
Posted on by

Hi, how do I automatically send emails to different email IDs that are present in the Excel sheet saved in a OneDrive folder with a unique subject and body when we manually trigger a button?

Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @prawincumar 

     

    Does the email body and email subject data is present in excel sheet ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • prawincumar Profile Picture
    on at

    HI Nived,

    Thanks for your reply, my excel sheet is going to be in the below format;

    S.noRecipient NameRecipient Email AddressSubjectBodyCopy Email Address
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @prawincumar 

     

    I have created a demo flow, see below

     

    I have created a excel file with demo values:

    Nived_Nambiar_0-1705590566406.png

     

     

    Now see the flow design:

    1. Use manually trigger a flow option

    2. use List rows in table to list all rows in the table in excel file

    Nived_Nambiar_1-1705590619981.png

     

    3. use apply to each to loop through each row of excel table

    Nived_Nambiar_2-1705590705849.png

     

    i am not sure what is use of copy to email address, i assume it would needed for cc in email, if yes, then you have to add the dynamic content in the field 

    Nived_Nambiar_3-1705590777846.png

     

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • prawincumar Profile Picture
    on at

    Hi @Nived_Nambiar 

    Thanks, it worked, but tell me, how do I send it to different email IDs with just a couple of changes in the body and the subject, say Sub for one email ID is - Praveen Request and for the other is Nived Request, like this, in the subject only one word will be changed, and also in the content say it has four line for every email, but two words entire rows will get changed just like the subject.


    Or tell me without using an Excel sheet, for multiple email IDs I want to send emails in one click with a unique subject and body.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @prawincumar 

     

    Ok in that case, let's say we assume subject should be of format [Name of person] Request & Email body should be having format like 

     

    Hi [Name of person],

     

    Email body content

     

     

    So in that case, just make a small change in flow like below in send email part:

    Nived_Nambiar_0-1705594634692.png

     

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • prawincumar Profile Picture
    on at

    Hi @Nived_Nambiar 

    I have now somehow figured out a way to send emails automatically to different email IDs all at once, but I still need a few clarifications, would you mind helping me?

    My excel sheet now looks like the below;

    Recipient Email AddressSubjectMagazine NameIssue NameCC
    xxxxx@gmail.comXXXXXXXXJanuary 2024praveenkumar@gmail.com
    yyyyy@gmail.comXXXXYYYYFebruary 2024praveenkumar@gmail.com
    zzzzz@gmail.comXXXXZZZZ2024praveenkumar@gmail.com

    I have created an Html table which inserts the magazine name and issue for all email.

    The issue I'm facing is that all the data present in the magazine and issue name column are sent to each recipient address, which should not happen, it should send only the data respective to the email address.

    Please tell me how to do it.

     



  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @prawincumar 

     

    Try this flow design:

     

    Assume the excel file looks like this:

    Nived_Nambiar_0-1705943695941.png

     

     

    Flow Steps

     

    1. List all rows present in excel file

    Nived_Nambiar_1-1705943720599.png

     

     

    2. Select only Recipient email address column values from values dynamic content using select action.

    Nived_Nambiar_2-1705943880241.png

     

    3. use apply to each action to loop through the recipient email address using union function get unique values from the list:

    Nived_Nambiar_3-1705944749141.png

     

     (steps are under loop)

    3.1: use filter array to filter value dynamic content with iterating recipient email address like below

    Nived_Nambiar_4-1705944813805.png

     

     

    3.2: use select action to select Magazine name and issue name column from filter array output

    Nived_Nambiar_5-1705944865109.png

     

    Nived_Nambiar_6-1705944890102.png

     

    Nived_Nambiar_7-1705944910183.png

     

    3.3: Create HTML Table out of output of select action

    Nived_Nambiar_8-1705944953330.png

     

    3.4: use send email to send email to recipient like below

     

    Nived_Nambiar_9-1705944992186.png

     

    expression used in subject field:  first(body('Filter_array'))?['Subject']

     

    expression used in body field: 

    Nived_Nambiar_10-1705945142982.png

     

    Expression:  replace(body('Create_HTML_table'),'<table>','<table border="1">')
     
    Hope this helps !
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • prawincumar Profile Picture
    on at

    Hi @Nived_Nambiar 

    I tried the above design, I received the below error message when trying to save

    Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Send_an_email_(V2)' at line '1 and column '2623' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Send_an_email_(V2)' to be referenced by 'repeatItems' or 'items' functions.'.'.

  • prawincumar Profile Picture
    on at

    Hi @Nived_Nambiar 

    Kindly help me with the below question;

    Recipient Email AddressCountryStateCityCC
    aaaaa@gmail.comIndiaTamil NaduChennaicccc@gmail.com
      KeralaKochicccc@gmail.com
      KarnatakaBangalorecccc@gmail.com
    bbbbb@gmail.comAustraliaQueenslandBrisbane 
      New South WalesSydney 
      VictoriaMelbourne 


    Considering the above table, I want to send an email to aaaaa@gmail.com by inserting only the below values as a table;

    StateCity
    Tamil NaduChennai
    KeralaKochi
    KarnatakaBangalore


    But the thing is, the whole column values like the below is inserted in the email body when I automatically send it;

    StateCity
    Tamil NaduChennai
    KeralaKochi
    KarnatakaBangalore
    QueenslandBrisbane
    New South WalesSydney
    VictoriaMelbourne

     

    This happens for all, the state and city data present in the entire column is sent to all email addresses present in the table.

     

    Please help me with this

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @prawincumar 

     

    show me the flow 

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard