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 Platform Community / Forums / Power Automate / Auto Populate Email fr...
Power Automate
Suggested Answer

Auto Populate Email from Excel

(0) ShareShare
ReportReport
Posted on by 8
Hi,
 
Using the spreadsheet below as an example, I am wondering if there is a way to use Power Automate to have one email sent per Dept, and in the body of the email list all the courses associated with that Derp.
 
For example, one email will go to email1 and email 2 that would list all the courses associated with ENGL, and another email will go to email5 and email6 with all the courses associated with MATH (example below). Thank you for you help and any suggestions you may have!
 
Spreadsheet:
Example of the emails I'd like to generate:
 
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    393 Moderator on at
    Good Afternoon,
     
     
    To accomplish your wanted outcome you need to do the following steps:
     
    1. Trigger you can choose whatever you want (manual or scheduled) - basically on command or at the set time
     
    2. Find the "List Rows" Action in the table this is tricky if the excel file is on your desktop you need to ensure you need to use the Excel (OneDrive) if its in your SharePoint it will be under the Excel(Business) side try both it should be easy to differentiate if you use them a lot.
     
    3A. I would personally use the "Filter Query" field under the "List Rows" action to oData filter for what rows you are looking to send whether its by dept or by course example: Dept eq 'ENGL'  | Grabs all rows where Dept == ENGL
     
     
    3B. Use the "Filter Array" for the "List Rows" outcome this is where you will apply for whatever fields you want to send to if you want to send to all you can skip this this gives a better outcome if there is an error.
     
    4. Send an email(V2) Outlook action-
     
    Set the To field as your Email column dynamic value (because in your screenshot it is formatted correctly)
     
    Set the title as wanted
     
    Set the body to your formatted message with the dynamic values filled as needed.
     
     
    This should get you started up
     
    The only other side bar for this is make sure your Excel file has the data formatted as a table it looks like it is from the screenshot but, if it isn't go the table highlight all the headers and the rows then insert tab -> table -> My table has headers - > Insert/Create then you should be able to select that table to filter from if you follow the prompt for the list rows action.
     
     
    If this answers your question please select it as the solution as it will help other users who come across it. If not feel free to follow up and at me I will try to respond!
     
    Have a great day!
  • Chriddle Profile Picture
    8,691 Super User 2026 Season 1 on at
    Use some xpath to get distict Departments (in the Select's From).
    Then map Dept, Email and Course to the according values.
     
    From there, you only need to send an email for each item in the Select's body.
     
     
    Compose (the data from Excel)
    [
    	{"Course": "Course A", "Dept": "ENGL", "Email Column": "email1@example.com;email2@example.com"},
    	{"Course": "Course B", "Dept": "ENGL", "Email Column": "email1@example.com;email2@example.com"},
    	{"Course": "Course C", "Dept": "MATH", "Emai Column": "email5@example.com;email6@example.com"},
    	{"Course": "Course D", "Dept": "MATH", "Email Column": "email5@example.com;email6@example.com"}
    ]
     
    Select
    From:
    xpath(
    	xml(
    		addProperty(
    			json('{}'),
    			'Root',
    			addProperty(
    				json('{}'),
    				'Item',
    				outputs('Compose')
    			)
    		)
    	),
    	'//Item/Dept[not(. = preceding::Dept)]/text()'
    )
    Map Dept:
    item()
    Map Email:
    first(	
    	xpath(
    		xml(
    			addProperty(
    				json('{}'),
    				'Root',
    				addProperty(
    					json('{}'),
    					'Item',
    					outputs('Compose')
    				)
    			)
    		),
    		concat('//Item[Dept="', item(), '"]/Email_x0020_Column/text()')
    	)
    )
    Map Course:
    xpath(
    	xml(
    		addProperty(
    			json('{}'),
    			'Root',
    			addProperty(
    				json('{}'),
    				'Item',
    				outputs('Compose')
    			)
    		)
    	),
    	concat('//Item[Dept="', item(), '"]/Course/text()')
    )
     
     
     
     
    The Select's output:
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard