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

Read content from a link in a the body of an email

Hi,

 

We have a clunky IT approval system that involves clicking a link in an email that generates a new email that basically says Approved and ref: xxxxxxx 

 

Can anyone help me extract that info from the initial link so I can build an approval flow and approve these things on my phone on the go? 

 

This is the data from the link: The data I need is highlighted

 

 mailto:dummy@domain.com?subject=%5BRITM0177771%5D&body=Enter%20comments%20below%3A%0A%0A%0A%0A%0A%5BApproved%5D%0A%0APlease%20do%20not%20modify%20the%20subject%20of%20the%20email%20or%20reference%20number%0A%0ARef%3AMSG6562322%20

 

This is how the link in the email looks like:

 

Capture.PNG

 

Kind regards,

Frank

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Anonymous,

 

First of all, I am not sure what kind of mail you are going to extract from.

Or I don't know what your email contains, and I don't understand what it means from your description.

You could create such a Flow first, configure When a new email arrives as a trigger, then use Html to text to get the contents of the email body, and then provide a screenshot of the Html to text outputs so that I can know what to do with the content.

Like:

8.PNG

I tested it on my side according to my understanding and received an email with a hyperlink. The address of the hyperlink is the data you provided. Like:

5.PNG

Then I extracted the body of this email and extracted the data from your highlight.

Email:

last(split(first(split(body('Html_to_text'),'?')),'['))

Ref:

concat('Ref',replace(last(split(body('Html_to_text'),'Ref')),']',''))

6.PNG

Result:

7.PNG

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

2 REPLIES 2
Community Support
Community Support

Hi @Anonymous,

 

First of all, I am not sure what kind of mail you are going to extract from.

Or I don't know what your email contains, and I don't understand what it means from your description.

You could create such a Flow first, configure When a new email arrives as a trigger, then use Html to text to get the contents of the email body, and then provide a screenshot of the Html to text outputs so that I can know what to do with the content.

Like:

8.PNG

I tested it on my side according to my understanding and received an email with a hyperlink. The address of the hyperlink is the data you provided. Like:

5.PNG

Then I extracted the body of this email and extracted the data from your highlight.

Email:

last(split(first(split(body('Html_to_text'),'?')),'['))

Ref:

concat('Ref',replace(last(split(body('Html_to_text'),'Ref')),']',''))

6.PNG

Result:

7.PNG

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

New Member

Hi Bary,

Great help how can I extract the subject the same way? 

What would be the expression?

 

I'm completely new to the Power Automate trying to learn which is the best place to learn to understand what expression does what?


Thanks for your help

 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (18,882)