Y.feorge
Y.feorge

Reputation: 77

Can i post rich-text message via the incoming webhook in teams?

According to microsoft docs, I can post a plain text to teams channel: curl -H "Content-Type: application/json" -d "{\"text\": \"Hello World\"}" <YOUR WEBHOOK URL> can i post a rich-text message, such as bold text?

Upvotes: 3

Views: 8194

Answers (3)

Ricardo Padua Soares
Ricardo Padua Soares

Reputation: 447

Yes, you can!

To send a message through your Office 365 Connector or incoming webhook, you post a JSON payload to the webhook URL. Typically this payload will be in the form of an Office 365 Connector Card.

You can also use this JSON to create cards containing rich inputs, such as text entry, multi-select, or picking a date and time. The code that generates the card and posts to the webhook URL can be running on any hosted service. These cards are defined as part of actionable messages, and are also supported in cards used in Teams bots and Messaging extensions. ... https://learn.microsoft.com/pt-br/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using

Upvotes: 0

Bill Bliss - MSFT
Bill Bliss - MSFT

Reputation: 3581

Yes. Try Markdown:

curl -H “Content-type: application/json” -d “{\”text\”: \”**Hello** world\”}” <YOUR_WEBHOOK_URL>

Upvotes: 1

TonyX
TonyX

Reputation: 409

Yes. HTML and markdown is supported in the incoming webhooks. try these: curl -H "Content-Type: application/json" -d "{\"text\": \"Hello <b>World</b>\"}" <YOUR WEBHOOK URL> curl -H "Content-Type: application/json" -d "{\"text\": \"Hello **World**\"}" <YOUR WEBHOOK URL>

Upvotes: 6

Related Questions