Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Teams webhook - Send emojis in notifications

Using slack webhooks I can send an emoji using the shortcode in the message:

curl -X POST --data-urlencode "payload={\"channel\": \"#my_notification\",
\"username\": \"webhookbot\", \"text\": \":punch: commit blah deployed ok\",
\"icon_emoji\": \":ghost:\"}" https://hooks.slack.com/services/SOMELONGSTRING

Now we have moved to MS Teams, so I'm setting up the same thing using the incoming webhook connector, however it seems to do the text formatting on the client side pre-request rather than like slack which does it on client side post request rendering. So this webhook:

curl https://outlook.office.com/webhook/guid-guid-guid/IncomingWebhook/guid/guid 
--header 'Content-Type: application/json' 
--data "{ \"Text\": \":punch: commit blah deployed ok\", \"Title\" : \"api deployment\"}" 

shows up with the literal :punch: instead of a cool 👊 emoji? I've tried setting the TextFormat = markdown but that didn't make eny difference.

How can I get emojis into my teams notifications (using strings) and prove to my colleagues that teams doesn't suck?

I should point out I know I can use the emoji icon on my Mac, however the notification is sent from jenkins and I dont really want to muck around with the shell encoding etc to make that work.

like image 591
stringy05 Avatar asked Nov 19 '18 23:11

stringy05


People also ask

How do Teams react to emojis?

button and select any emoji you want. To react to a message in Teams for personal and small business use, hover the cursor over the message, then choose the appropriate reaction from the selection menu. The message sender will receive a notification that you reacted to their message.

How do you add emojis to Microsoft Team status?

Add emojis to Microsoft Teams using the Teams emoji panel First, the account admin must enable emojis. After that, anytime you need to use an emoji, all you need to do is click the smiley icon just below the message tray in a chat or channel. The Teams emoji panel will open up for you to select your preference.

How do you send a message to a team on Webhook?

To send a message through your Incoming Webhook or Office 365 Connector, post a JSON payload to the webhook URL. This payload must 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, multiselect, or selecting date and time.


1 Answers

You can use the hex codes(& #x1F642;) for sending emoji in Microsoft Teams. You can get these he are few which you can try: https://apps.timwhitlock.info/emoji/tables/unicode

We have backlog item to simplify sending emoji programmatically.

like image 189
Wajeed-MSFT Avatar answered Nov 09 '22 08:11

Wajeed-MSFT