cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Devinm501
Level: Powered On

Extracting one value from an array using Select

Hi, I am fairly new to flow and was wondering if someone could help.

 

I am trying to create an email notification for when there have been changes in a sharepoint list, the emails have only to be sent to certain people associated with this list. I cant seem to extract the email address from all the information being pulled down.

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

So i am looking to only take the Email from this information. Here is what my flow looks like so far:Capture2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Capture3.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

So from this i am wanting to extract the email and then have it inserted into the 'Send an Email' as it will change for each person. Is this possible? any help would be appreciated.

 

Regards,

 

Devin

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Extracting one value from an array using Select

Hi @Devinm501,

 

I want to know if the output in your first screenshot refers to the Email of Author (Created By) or the Email of Editor (Modified By).

52.PNG

You seem to want to get the email address of the Author contained in all the Filter array, and then fill these email addresses in TO field of Send email action.

You might try a way to store all your email addresses in an array, then use Union() function to remove duplicate email addresses and then configure them in the To field.

I only use Author Email address to provide examples here:

53.PNG54.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Extracting one value from an array using Select

Hi @Devinm501,

 

I want to know if the output in your first screenshot refers to the Email of Author (Created By) or the Email of Editor (Modified By).

52.PNG

You seem to want to get the email address of the Author contained in all the Filter array, and then fill these email addresses in TO field of Send email action.

You might try a way to store all your email addresses in an array, then use Union() function to remove duplicate email addresses and then configure them in the To field.

I only use Author Email address to provide examples here:

53.PNG54.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Devinm501
Level: Powered On

Re: Extracting one value from an array using Select

Hi Barry,

 

Thank you for the reply, i will try this now. As for your question about the Author or Editor i am looking for neither the one i am looking for is the email from this part of the output: 

 

"@odata.etag":"\"2\"",

"ItemInternalId":"1",

"ID":1,

     "Name":{

     "@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

     "Claims":"i:0#.f|membership|devin@.com",

     "DisplayName":"Devin",

     "Email":"Devin.Miller@.com",

     "Picture":

     "Department":null,

     "JobTitle":""

},

 

as the author isnt a valid email we need and also the editor can change throughout, we only want the email for people marked as "Communications Lead" within the list. Will this method work for this? I have set up the flow to first find the people marked as this and am going to try your method to then take all emails from the users in the output.

 

Regards,

 

Devin

 

Community Support Team
Community Support Team

Re: Extracting one value from an array using Select

Hi @Devinm501,

 

"only want the email for people marked as "Communications Lead"" is also configurable. I just provided an example. I don't have the same action as you. You can configure Filter array to be what you want.

Then it seems that you also need to change Author in items (‘Apply_to_each’)[‘Author’][‘Email’] to Name.

 

Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Devinm501
Level: Powered On

Re: Extracting one value from an array using Select

Hi Barry,

 

This has worked perfectly thank you,

 

Although my condition 2 is somehow coming back with 'false' even though there have been changes made: 

 

@and(greaterOrEquals(triggerBody()?['Stage'], 5), lessOrEquals(triggerBody()?['Stage'], 8))

 

I have changed the stage from 5 to 6 and yet it is still coming back as false, where as before it was recognising the change. Has this got anything to do with its position in the flow now that there are new sections added?

 

Regards,

Devin.

Community Support Team
Community Support Team

Re: Extracting one value from an array using Select

Hi @Devinm501,

 

This should not be the method I provided that caused the error to happen.

Was this condition working properly before?

You could output the value of the Stage first and then observe if it meets the criteria.

Consider configuring the Condition under Get items and then configuring all of the following actions in If yes.

Take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Devinm501
Level: Powered On

Re: Extracting one value from an array using Select

Hi Barry,

 

That worked perfectly thank you for the help.

 

Devin

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 (4,751)