cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kjell
Level: Power Up

Extracting email address field from Person object

I'm working on a flow that sends emails to multiple people.  I'm extracting Person fields from a SharePoint list field that can contain a number of Persons using the Apply to each function.  I then send the data to the Send an email function.

 

The problem that I'm having is that CurrentItem contains the comple Person struct and I need to extract just the Email field from this struct in order for the Send an email function to accept the parameter in the To field.

 

How can I extract this field?

 

Screen Shot.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Extracting email address field from Person object

if you hover over the current item you will see the JSON representation of the object.  YOu can take that string, enter it in the formula bar in dynamic content and then add ?['email'] to the end of it.  Insert that into the To blank and you'll have the email. It will look something like this

items('Apply_to_each')?['Email']


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Extracting email address field from Person object

@Kjell 

I may not be understanding your goal totally, but I believe that you are storing the email addresses in the array.  If that is the case, you may want to remove the array.  You can simply loop through each person or group entry - you'll be able to select the email address.  If I am off base, please let me know.

In my example, PG is a person or group column that allows mutliple entries.

MultiPerson.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Dual Super User
Dual Super User

Re: Extracting email address field from Person object

if you hover over the current item you will see the JSON representation of the object.  YOu can take that string, enter it in the formula bar in dynamic content and then add ?['email'] to the end of it.  Insert that into the To blank and you'll have the email. It will look something like this

items('Apply_to_each')?['Email']


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,670)