cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Get user profile email address from SharePoint column

Hi everyone. Complete newb at using Power Automate. The answers found here have been so helpful! I'm really stuck after spending hours on this single issue, so I'd really appreciate your help.

 

We're using Lists as a lead management platform, including columns for Follow-up Action, Follow-up Date, and Action Assignee. What I want to happen is when the Follow-up Date = today, email a prompt to the Action Assignee. Getting PA to take action on the Follow-Up Date is no problem, as I've got it successfully setup to send a message to a Teams channel when Follow-Up Date = today.

 

Where my flow is always failing is pulling the email address from the Action Assignee field (see screenshots), which is connected to their user profile. When I switch out "Get user profile" for "Get my profile", it works successfully, so the email step is not the problem. Thank you so much for your help!

 

 

 

xfahrenheit_0-1625782457881.png

xfahrenheit_1-1625782486002.png

 

xfahrenheit_2-1625782656439.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ccc333ab
Solution Sage
Solution Sage

Excellent troubleshooting, thanks for the testing as that makes it a bit easier to diagnose. 

 

Because this is forcing you to use Apply_to_each, and the error message of "is of type object", that indicates to me that your Action Assignee is actually a multiple select field (i.e., you can select more than one Assignee). 

 

Therefore you will need to extract out the individual person out from this field. You can do this as follows: 

(Note, in my example below, my field is called "Stage 1 Approvers". This would be equivalent for your Action Assignment field. 

 

1. Inside your initial Apply to each, get rid of everything you have and instead start with a brand new Apply to each (create it yourself, don't let Power Automate create this for you). 

ccc333ab_0-1625851120305.png

Where I highlighted in red, put in your "Action Assignment" field in here. This is the field with no additional clarifications on it (You should see things like Action Assignemnt, Action Assignment Item, Action Assignment DisplayName, Action Assignement Email, etc.) Just select the main one.

Note: If you get an additional Apply to Each added in, you selected the wrong one.

 

2.  Now you can grab the first person's email address, and feed that into the Get User Profile action. 

ccc333ab_1-1625851334432.png

 

And now you can send your email. 

 

 

View solution in original post

7 REPLIES 7
ccc333ab
Solution Sage
Solution Sage

If your Action Assignee is of type Person, you can use the Action Assignee Email column in the "Get User Profile" action. 

 

If your Action Assignee is of type String, then you'll need to first do a search for the user using "Search for Users" action, and then using the ID returned from this in your "Get User Profile" action. 

Anonymous
Not applicable

Thanks for replying! I tried those two options and they came back with errors unfortunately.

 

I'm pretty certain Action Assignee is of type Person and not String. When we select an Action Assignee while creating or editing a record, it gives options of people in the company based on your first few keystrokes and when you hover over any of them it shows their department, title, email address, etc.

 

Attempt #1, Search for users (v2):

xfahrenheit_1-1625847681876.png

 

xfahrenheit_0-1625847643262.png

 

Attempt #2, Get User Profile (V2) via Action Assignee Email:

This forces an "Apply to each 2" and results in the error below

xfahrenheit_3-1625848997803.png

xfahrenheit_4-1625849156567.png

 

 

Attempt #3, Get User Profile (V2) via Action Assignee:

(Resulted in error that it won't display for me)

xfahrenheit_2-1625848369298.png

 

 

 

ccc333ab
Solution Sage
Solution Sage

Excellent troubleshooting, thanks for the testing as that makes it a bit easier to diagnose. 

 

Because this is forcing you to use Apply_to_each, and the error message of "is of type object", that indicates to me that your Action Assignee is actually a multiple select field (i.e., you can select more than one Assignee). 

 

Therefore you will need to extract out the individual person out from this field. You can do this as follows: 

(Note, in my example below, my field is called "Stage 1 Approvers". This would be equivalent for your Action Assignment field. 

 

1. Inside your initial Apply to each, get rid of everything you have and instead start with a brand new Apply to each (create it yourself, don't let Power Automate create this for you). 

ccc333ab_0-1625851120305.png

Where I highlighted in red, put in your "Action Assignment" field in here. This is the field with no additional clarifications on it (You should see things like Action Assignemnt, Action Assignment Item, Action Assignment DisplayName, Action Assignement Email, etc.) Just select the main one.

Note: If you get an additional Apply to Each added in, you selected the wrong one.

 

2.  Now you can grab the first person's email address, and feed that into the Get User Profile action. 

ccc333ab_1-1625851334432.png

 

And now you can send your email. 

 

 

ccc333ab
Solution Sage
Solution Sage

As I posted that....since you already have the email from your Action Assignment Email field, not sure you even need to do a Get User Profile call. You can just use that email address instead.....

Anonymous
Not applicable

Thank you so much for your help! I'll try these methods.

 

In regard to your second reply, here's the result. I'll post the results of your first suggestion in a moment.

I think I've tried that (please let me know if there's another way of doing this) by putting "Action Assignee Email" in the To: field of the Send an Email step. This forces an Apply to Each 2 step and results in an error:

xfahrenheit_0-1625851946397.png

xfahrenheit_1-1625851990183.png

 

ccc333ab
Solution Sage
Solution Sage

Sorry, on my second reply. What I meant was you still need to loop on each Action Assignment (i.e., this step):

ccc333ab_0-1625854169857.png

 

But then you can the just use the Action Assignment Email from this, you wouldn't need to then do a Get Users Profile step...

Anonymous
Not applicable

Manually creating the Apply to Each worked! Thank you so much! I've spent hours on this and you found the solution lickety-split. You really are an impactful individual. 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,394)