3 Ways to Send Teams Message with a Clickable Link in Power Automate

Do you need to add a clickable link in your Teams messages sent from Power Automate?

Power Automate allows Teams to send automated messages but for added convenience, you might want to include a clickable hyperlinks to your message.

This can be used to help direct users to a particular web address or even a file in SharePoint.

This post is going to show you how to create a link in both messages and adaptive cards sent from Teams.

Link in Teams Message with Link Button

The Post message in a chat or channel action from the Teams connector has a button that allows you to create links in your messages.

This is a very straight forward way to add clickable links to your messages.

Here’s how to create a link in the Post message in a chat or channel action.

  1. Add the Post message in a chat or channel action to your flow.
  2. Select either Chat or Channel for the Post in option. Depending on which option you choose you can then select the chat or channel in which you want to send the messages.
  3. Add the text you want to send including any anchor text for your link. The anchor text is the text you want the user to see as the clickable hyperlink.
  4. Highlight the section of the message that will be the anchor text. In this example the word link will be the anchor text for the hyperlink.
  5. Click on the Link button in the editor menu. This will open a menu that allows you to edit the link.
  1. The Link Title should contain the previously selected text, but you can edit this here if needed.
  2. Add the URL for the link in the Link Target.
  3. You can check or uncheck the option to Open link in a new window. Even if you leave this unchecked the link will open in a new window on both desktop and web versions of Teams.
  4. Click on the Add button.

Your Teams message will now have a clickable hyperlink!

Link in Teams Message with HTML Code

The Post message in a chat or channel action also has an HTML code editor mode that will allow you to build your own links with HTML.

Here’s how to create a link in the HTML editor.

  1. Add the Post message in a chat or channel action to your flow.
  2. Select either Chat or Channel for the Post in option.
  3. Click on the Code button in the message editor menu. This turns the input into a code editor where you can directly add HTML code for your messages. The HTML will then render in your Teams message.
<a href="https://www.powertechtips.com/">link</a>
  1. Use the <a> tag such as the above in your message to create a clickable link.

Your message should now have a clickable link!

Link in Teams Card with Link Markup

Teams also allows another type of interactive message to be sent from Power Automate.

You can build adaptive cards that allow you to display complex displays and collect user input. You might also want to include a link within these cards.

You won’t be able to create your links in the same way with HTML. These will require a special link markup within the adaptive card JSON.

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "Adaptive Card"
        },
        {
            "type": "TextBlock",
            "text": "This is a [link](https://www.powertechtips.com/)",
            "wrap": true
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2"
}

For example, the above simple adaptive card JSON includes a link to this site with some anchor text.

[link](https://www.powertechtips.com/)

The above syntax creates the link with the anchor text link and the URL https://www.powertechtips.com/.

Conclusions

Creating hyperlinks within Teams messages can increase the utility of your Team message automations.

You can create these links in the HTML editor for regular messages or with special markup in adaptive card messages.

Have you used links in your Teams messages yet? Let me know in the comments below!

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and freelance consultant and trainer specializing in Excel, Power BI, Power Automate, Power Apps and SharePoint. You can find other interesting articles from John on his blog or YouTube channel.

Related Articles

Comments

0 Comments

Get the Latest Tech Tips

Write For Us

Are you a tech enthusiast with a talent for writing great content? Come write for us!

Follow Us

Follow us on social media to stay up to date with the latest in tech!