cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jesor
Microsoft
Microsoft

How to extract an attribute from Export Email (V2) properties

Hi, I'm using the Export Email (V2) action to get all of the contents of an email that comes into an inbox based on criteria.  I am able to get the return of all of the values, but I cannot figure out how to get a specific attribute, the 'Reply-To' attribute to be on it's own so I can use that value.

 

What returns is a bunch of things, and that 'Reply-To' field I need to use again in a bunch of other properties of the email.

Ex of the 'Reply-To' returned values: 
Reply-To: "First Last" <contoso@live.com

 

In short, the problem I'm trying to resolve, is that when an email comes in from SharePoint Online as an access request via an external user, I need to be able to gather that user's email address and log it into a sharepoint list and add date to the created day so we know when to remove them from the site collection.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Jesor 

 

 

first create a Compose action 

rename it to NewLine

and use following expression

decodeUriComponent('%0A')

Untitled.png

then use expression below in a new Compose action

split(body('Html_to_text'),outputs('NewLine'))

 
this will give you an array of every item in the message body
 
then use Filter action and search where text begins with Reply-To
 
This is a complete hack to get the data if it is not available as a direct dynamic content action
 

Regards,

Reza Dorrani

 

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

7 REPLIES 7
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Jesor 

 

Is that not the To field property?

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi @RezaDorrani,

 

Nope, the To property can be accessed easily, but in this case when SharePoint sends an access request email to the admin, you will get the From line as, no-reply@sharepoint.com.  This email address though, when you reply to the email, will flip to whatever the property of the Reply-To is, so you will be not replying to the 'no-reply@sharepoint.com' alias, but you will instead be replying to the actual email value of the Reply-To field.  It's like a reroute. 

 

I'm trying to somehow extract that value from all of the properties that are returned from that Export Email (V2) function to get that Reply-To value to use for other purposes.

RezaDorrani
Dual Super User II
Dual Super User II

Hi @Jesor 

 

do you see this value hidden or available in any of the properties exposed by export mail

The return response from the 'Export Email (V2)' only gives you back the body of the email, thus the backend properties of everything about that email, including where it's from, how it's routed, etc.

 

Below is a screenshot of the body's return.  It's not structured in a way that attributes can be pulled, so other processing seems like it needs to be done before it can be used.  You'll see on line 76 of this instance that the Reply-To property is addressed.  I had to do some alteration of the actual values to mask for privacy reasons, but the return is still in a similar format.

 

returnEmailPropertiesFlow.png

Sorry for multiple messages at once split up, here is the flow set up, I take the message ID from dynamic field to push into the Export Email so I can identify the specific email to grab properties from.

messageID.png

RezaDorrani
Dual Super User II
Dual Super User II

Hi @Jesor 

 

Sorry I am not able to get reply-to in my post response

 

Not sure what is different

 

Can you check the properties of export email and see if you get it anywhere?

Hi @Jesor 

 

 

first create a Compose action 

rename it to NewLine

and use following expression

decodeUriComponent('%0A')

Untitled.png

then use expression below in a new Compose action

split(body('Html_to_text'),outputs('NewLine'))

 
this will give you an array of every item in the message body
 
then use Filter action and search where text begins with Reply-To
 
This is a complete hack to get the data if it is not available as a direct dynamic content action
 

Regards,

Reza Dorrani

 

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,417)