Are you looking for how to get a user’s email address using a Power Automate flow? Then, read this complete tutorial where I have explained how to get user email address in Power Automate.
In addition, I have also explained how to retrieve a user’s email address from a SharePoint Online list using Power Automate.
Get the current user in a flow in Power Automate
Here, I will explain how to extract the email address of a current user by using the “Get my profile (V2) flow action inside a Power Automate.
Microsoft allows users to use “Get my profile (V2)” to retrieve the profile of the current user (who triggered the flow). By using it, a user can extract details like About me, Birthday, City, Country, Company name, Department, Mail, etc.
To learn about more parameters, click on Get my profile(V2).
Get my profile (V2) action can be used without giving any parameters. It has a “Select fields” property, which will limit and retrieve the fields that a user gives in it.
To retrieve the current user email address, create an “Instant cloud flow” that will trigger manually.
Follow the below-mentioned step-by-step process:
1. Browse make.powerautomate.com in the browser and click on +Create -> select “Instant cloud flow”. In the next window, provide a flow name, select “Manually trigger a flow”, and click on Create.
2. Then, add the “Get my profile(V2)” flow action, which will retrieve all the details about the user.
- Select fields: Provide the value as ‘Mail’ to limit the details retrieved.
3. Next, add a “Compose” data operation to check the output. Provide below detail:
- Inputs: Select ‘Mail’ under the dynamic content of Get my profile (V2).
4. Now, the flow is ready. Save it. Click on Test -> Manually to test flow.
5. The output of a compose flow action will display the email address of a current user.
This is how to get the email address of a current user by using the “Get my Profile” flow action in a Power Automate flow.
Get email address from a SharePoint list in Power Automate
Now, I will show you how to extract a user’s email address from a SharePoint list person or group column by using the “Get user profile(V2)” flow action inside a flow.
In Power Automate, “Get user profile (V2)” is available to retrieve a specific user’s profile details. It has properties like User principal name or id User (UPN) and Select fields where it retrieves the details based on them.
Recently, I was working on a SharePoint list Where we wanted to extract the email addresses of users filled in a person or group column.
Let us extract a user’s email address from a SharePoint list based on the Get user profile(V2) in a Power Automate flow.
Now, I was taking a SharePoint list named ‘Task List‘ with different datatypes as represented in the below table:
|Task Name||A single line of text- By default Title column|
|Start Date||Date and Time column|
|Assigned To||Person or Group column|
To do that, create an “Instant cloud flow” that will trigger manually in Power Automate.
Follow the below instructions to create a Power Automate flow:
1. Click on App Launcher -> Power Automate. In the Power Automate Home page, select +Create and choose “Instant cloud flow” -> In the next window, give a flow name, select Manually trigger a flow, and click Create.
2. Next, add the “Get items “flow action to retrieve all the list items from a SharePoint list. Here are the details below:
- Site address: Select a specific SharePoint site from the drop-down.
- List Name: Choose a specific SharePoint list name from the drop-down.
3. In the next step, add a “Get user profile(V2)” flow action to extract a user’s profile details. Provide the details below:
- User(UPN): Select the value from dynamic content.
4. To check the output received, add a “Compose” data operation and set the details below:
- Inputs: Choose the value from get items of dynamic content.
5. Now, the flow is ready. Click on Save. Test it Manually.
6. Then, the output of the compose shows the email addresses of the users from the SharePoint list.
This is how to get a user’s email address from a SharePoint list using a Power Automate flow.
I hope this Power Automate tutorial will help you to solve the issues based on how to get the email address of a current user in Power Automate (Who triggered the flow). And also how to get the email addresses of the users from a SharePoint list inside a Power Automate flow.
You may also like:
- How to Update SharePoint Person Field in Power Automate?
- How to get start and end of month in Power Automate?
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.