web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to extract hyperli...
Power Automate
Suggested Answer

How to extract hyperlink from email body using Power Automate and write to Excel?

(0) ShareShare
ReportReport
Posted on by 15

Hi everyone,

I'm trying to use Power Automate to process incoming emails automatically. Each email contains an incident ID and a hyperlink that leads to the incident management website. I want to summarize these in an Excel table with two columns: one for the incident ID and one for the hyperlink.

Right now, I can extract the incident ID using Power Automate, but I can't figure out how to get the hyperlink from the email body. The link is embedded in a sentence like:

 

The following changes have been made to the 182364: Suspicious query incident:
Assignment group:
Click here to view the security incident: SJT00435 (this is a hyperlink)

Does anyone know how to extract this hyperlink using Power Automate? Or is there another way to achieve this?
Thanks in advance!

Categories:
I have the same question (3)
  • Suggested answer
    MS.Ragavendar Profile Picture
    6,334 Super User 2026 Season 1 on at
     
     
    check does this help you in resolving your issue, if not revert back.
     
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
  • zoey2025 Profile Picture
    15 on at
    Thank you for your response. However, it doesn’t seem to address the issue I’m facing.
  • chiaraalina Profile Picture
    1,864 Super User 2026 Season 1 on at
    Hi
     
    Is it always the same format in the email body?
     
    Then you can use something like this:

     
    Compose - Incident ID (or similar):
     
    substring(
        triggerOutputs()?['body/body'],
        add(indexOf(triggerOutputs()?['body/body'], 'to the '), 7),
        sub(
            indexOf(
                substring(
                    triggerOutputs()?['body/body'],
                    add(indexOf(triggerOutputs()?['body/body'], 'to the '), 7),
                    20
                ),
                ':'
            ),
            0
        )
    )


    Compose - Link:
     
    substring(
        triggerOutputs()?['body/body'],
        add(indexOf(triggerOutputs()?['body/body'], 'href="'), 6),
        sub(
            indexOf(
                substring(
                    triggerOutputs()?['body/body'],
                    add(indexOf(triggerOutputs()?['body/body'], 'href="'), 6),
                    200
                ),
                '"'
            ),
            0
        )
    )


     
     
     
     
    Let me know if it worked!
     
     
  • zoey2025 Profile Picture
    15 on at
    Thank you so much for your response. I tried your method today, and it worked perfectly!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard