cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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 Team
Community Support Team

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

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

1 REPLY 1
Community Support Team
Community Support Team

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

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

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
Users Online
Currently online: 331 members 6,675 guests
Please welcome our newest community members: