Reputation: 7067
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.
Upvotes: 10
Views: 11228
Reputation: 3158
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.
Upvotes: 16