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

1 REPLY 1
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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (13,141)