cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
surachar
Regular Visitor

Get value in a href of body mail

Please help me to read this value

Ex.

My email's body is 

Click link here

 

The value of "here" is hyperlink "mailto:test@gmail.com?code=11101-503I would like to get value of code. The value is 11101-503.

Pls tell me how to use Power Automate to get that value in href value.

 

Thank you so much for helping me.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@surachar,

Based on the issue that you mentioned, do you want to extract data from a href body?

Generally, we could get the body of the email through Office365Outlook.GetEmails which is in HTML text format.

I think you should get the hyperlink in the email body.

Add a Label and set the Text as below:

 

Match(
    First(
        Office365Outlook.GetEmails(
            {
                folderPath: "Inbox",
                fetchOnlyUnread: false
            }
        )
    ).Body,  /*I assume that the target message is the first message in the inbox*/
    "\d{5}\-\d{3}"
).FullMatch

2021-03-18-04.png

You could check the Match

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi@surachar,

Based on the issue that you mentioned, do you want to extract data from a href body?

Generally, we could get the body of the email through Office365Outlook.GetEmails which is in HTML text format.

I think you should get the hyperlink in the email body.

Add a Label and set the Text as below:

 

Match(
    First(
        Office365Outlook.GetEmails(
            {
                folderPath: "Inbox",
                fetchOnlyUnread: false
            }
        )
    ).Body,  /*I assume that the target message is the first message in the inbox*/
    "\d{5}\-\d{3}"
).FullMatch

2021-03-18-04.png

You could check the Match

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,051)