cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Extract Email Address from Link in HTML

Our organization would like to use PowerApps to generate an automatic reply to a standard inquiry form received via email. The problem is that the reply-to address delivers to an unmonitored mailbox of the company where the lead originated. A "CLICK HERE" link contains the actual email address where the automatic reply should be sent. 

 

How can we extract the contact's email address from the "CLICK HERE" link to generate an email?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Extract Email Address from Link in HTML

Hi @DAS1 :

Do you want to get the email address contained in the hyperlink text ("CLICK HERE")?

I assume my understanding is correct.

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

The key is to get the hyperlink in the email body.

First of all ,Thanks for @WarrenBelz 's solution.

I've made a test for your reference.

1\Add a label control and set it's Text ptoperty to:

 

Left(Match(
        First(Office365Outlook.GetEmails({folderPath:"Inbox"})).Body,  /*I assume that the target message is the first message in the inbox*/
        "(?<=mailto:).*?(?=CLICK HERE)"
    ).FullMatch,Len(Match(
        First(Office365Outlook.GetEmails({folderPath:"Inbox"})).Body,
        "(?<=mailto:).*?(?=CLICK HERE)"
    ).FullMatch)-2)

 

1.jpg

I think these links will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-len

https://docs.microsoft.com/en-us/connectors/office365/

Best Regards,

Bof

 

 

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Extract Email Address from Link in HTML

Hi @DAS1 ,

Put this in the HTML (replace with your names)

<a href='mailto:" & Address@YourEmail.xxx & "'>Click here</a>

note the second quote set is "' - double-single quotes.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Microsoft
Microsoft

Re: Extract Email Address from Link in HTML

Hi @DAS1 :

Do you want to get the email address contained in the hyperlink text ("CLICK HERE")?

I assume my understanding is correct.

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

The key is to get the hyperlink in the email body.

First of all ,Thanks for @WarrenBelz 's solution.

I've made a test for your reference.

1\Add a label control and set it's Text ptoperty to:

 

Left(Match(
        First(Office365Outlook.GetEmails({folderPath:"Inbox"})).Body,  /*I assume that the target message is the first message in the inbox*/
        "(?<=mailto:).*?(?=CLICK HERE)"
    ).FullMatch,Len(Match(
        First(Office365Outlook.GetEmails({folderPath:"Inbox"})).Body,
        "(?<=mailto:).*?(?=CLICK HERE)"
    ).FullMatch)-2)

 

1.jpg

I think these links will help you a lot:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-len

https://docs.microsoft.com/en-us/connectors/office365/

Best Regards,

Bof

 

 

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,318)