Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PRcPIygarYr+IH84ovViTf
Power Automate - Building Flows
Answered

Send an email that includes the link, when a new message is added in Microsoft Teams

Like (0) ShareShare
ReportReport
Posted on 21 Sep 2023 15:34:04 by 16

Hi All, I've successfully created a flow to send an email to my team when a message is posted.

But is it possible to include the URL to the teams message in the email as well?

Currently the body of the email only includes the name of the sender; importance; and the body of the message.

I'm hoping it can also include the direct link to the teams chat; please help! 🙂

  • romey2000 Profile Picture
    16 on 22 Sep 2023 at 20:20:59
    Re: Send an email that includes the link, when a new message is added in Microsoft Teams

    sorry I spoke too soon and have spent way too many hours trying to figure this out - seems like there should be a simpler solution! lol

    This is a new flow that I tried to create...

    romey2000_0-1695413967716.png

     

    The email produces this... any idea why? The hyperlink points to the URL for the channel...

    romey2000_1-1695414047513.png

     

  • creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on 21 Sep 2023 at 19:44:52
    Re: Send an email that includes the link, when a new message is added in Microsoft Teams

    @romey2000 If my solution helped you and solved your problem. Please mark it as a solution so others who may have the same question as you can find it! Thx!

  • romey2000 Profile Picture
    16 on 21 Sep 2023 at 18:25:25
    Re: Send an email that includes the link, when a new message is added in Microsoft Teams

    thank you!

  • Verified answer
    creativeopinion Profile Picture
    10,396 Super User 2025 Season 1 on 21 Sep 2023 at 16:53:39
    Re: Send an email that includes the link, when a new message is added in Microsoft Teams

    @romey2000 

     

    View the Message Outputs

    If you insert the Message dynamic content from the When a new channel message is added action and run a test, you can view the outputs of what is returned.

    creativeopinion_1-1695314943832.png

     

    The link to the message can be accessed using the webUrl key. 

     

    creativeopinion_0-1695314835877.png

     

    Get the Message URL

    Insert another Compose action. Insert an expression, type in a question mark, square brackets and single quotes.

    ?['']

     

    In between the single quotes, enter the key. In this case, it's webUrl. You must ensure the text matches the key. 

    creativeopinion_3-1695315083933.png

    Place your cursor at the start of the expression. Tip: Press the up arrow key. 

     

    Select the Message dynamic content.

    creativeopinion_7-1695315155558.png

     

    Run a test. This will return your URL. You can use this in your email now. 

     

    Add Link to Email

    Highlight your link text in the Send an Email (V2) action, click on the link button. You won't be able to select the dynamic content here. Enter any text (this is just temporary) into the Link Target field and press add.

     

    creativeopinion_0-1695315273468.png

     

    Click the Code View button. 

     

    creativeopinion_1-1695315332433.png

     

    Highlight the text you entered for the Link Target (it will be the text between the double-quotes). Insert the Outputs from the Compose action that is holding your message URL. 

     

    creativeopinion_2-1695315360268.png

    Should look like this.

     

    creativeopinion_8-1695315201470.png

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉Watch my tutorials on YouTube
    👉Tips and Tricks on TikTok

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,695 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started