Geek Culture
Published in

Geek Culture

How to send Message Notification on Microsoft Teams channel — Rest API & Webhook

Step By Step Guide to setup MS Team Webhook & Rest API

First, we need to open the channel, where we need to add the communication webhook.

On the channel, click on 3 dots(kebab menu) and click on Connectors

Search for Incoming webhook

Enter webhook name and upload icon image:

Click on create and then it will generate the webhook URL.

Message:

JSON Message Format:

{ "text": "My Test Message example"}

JSON Message + IMAGE Format:

{
"@type": "MessageCard",
"text": "My Test Message example",
"sections": [
{
"images": [
{
"image": "{BASE-64-IMAGE}"
}
]
}
]
}

Example:

Sending HTML Table Message:

{"text":"<b>Test Suite</b><table border=1><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr><td>AlfredsFutterkiste</td><td>MariaAnders</td><td>Germany</td></tr><tr><td>CentrocomercialMoctezuma</td><td>FranciscoChang</td><td>Mexico</td></tr><tr><td>ErnstHandel</td><td>RolandMendel</td><td>Austria</td></tr><tr><td>IslandTrading</td><td>HelenBennett</td><td>UK</td></tr><tr><td>LaughingBacchusWinecellars</td><td>YoshiTannamuri</td><td>Canada</td></tr><tr><td>MagazziniAlimentariRiuniti</td><td>GiovanniRovelli</td><td>Italy</td></tr></table>"}

OUTPUT:

--

--

--

A new tech publication by Start it up (https://medium.com/swlh).

Recommended from Medium

How to organize a self-contained Python project

How we can dynamically load the variable file named the same as OS_name and use the variable name…

Lawyers in Utah

lawyers in utah

Everything you need to know about hackathons as a beginner

Everything I Have Learned From My First Month In A Coding Bootcamp.

Fundamentals of High-Level Synthesis Part 3: From Concurrency to Parallelism (Map Pattern)

React vs Angular vs Vue: Who wins in 2019?

Run Machine Learning program on Docker Container in GUI mode

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Dhoundiyal

Abhishek Dhoundiyal

Principal QA Manager at MakeMyTrip https://stackoverflow.com/users/5372079/abhishek-dhoundiyal

More from Medium

Terms in API Development

Connecting WinForms C# to MySQL

Practices to Speed up Xamarin App Development

Developer’s Block