Okta Workflows How-To: Send stylized messages with MS Teams
Bryan Barrows
Posted on October 14, 2022
Okta Workflows makes it easy to build automations that notify or alert your teams with connectors to services like Slack and MS Teams.
Someone recently asked, "Why can't I add line-breaks to my MS Teams messages?"
As it turns out, we need to leverage the Custom API Action card so that we can specify that our content is HTML, rather than text.
With the default Send Message to Channel card, our content is sent as text and line-breaks are ignored. Writing our message in HTML allows us to include line-breaks, lists, headers, style our text with fonts & colors, and more.
We can use the Text - Compose card to write our HTML message.
We can use a pair of Object - Construct cards to construct our request payload. We create a message object that contains our message content and specifies our contentType as html. We then nest the message object in an object called body.
Feel free to download my example, import it and try it out - just update the Relative URL in the Custom API Action to point at your own Team and Channel:
Download steps:
right click "view raw" in the panel above on the right
click "Save Link As"
be sure the filename ends in .flow
or check out my other guides and Workflows content (more coming soon!) here: