Question received from a community member regarding usage of Microsoft Graph to create teams messages in Power Automate:
“Is it possible to add a URL link to a Teams message when using the HTTP action with Microsoft Graph to send a message in Power Automate?”
With the standard teams action, we can use the text editor for this, but with the HTTP one it might not be that obvious, but yes, we can add URLs it is and it’s very simple.
We simply need to add to the body of the request the property:
"contentType": "html"
So for example similar to my previous post, you can use the message body similar to the below, and use an HTML anchor (a) tag:
{
"importance": "urgent",
"body": {
"contentType": "html",
"content": "This is an <b>urgent</b> message, please reply to me ASAP!!!!!
<br/><br/>
Please read this article before replying:<a href="https://www.microsoft.com">Microsoft</a>" },
}
Using the Power Automate action “Send a Microsoft Graph HTTP request”:
And when the action is executed in a Flow, the user will get the message with proper HTML formatting (bold, line break, and the link):
Conclusion
By simply adding one extra property to your request body you can easily send Teams messages with HTML content using Power Automate & Microsoft Graph.
References
Send chatMessage in a channel or chat – Microsoft Learn
chatMessage resource type – Microsoft Learn
The post Quick tip: Sending links on Teams Chats created using Microsoft Graph HTTP in Power Automate appeared first on michelcarlo.