Skip to content

Instantly share code, notes, and snippets.

@taija
Created May 15, 2017 14:31
Show Gist options
  • Save taija/76c2e22cba7d07e476d0457b4e8cda53 to your computer and use it in GitHub Desktop.
Save taija/76c2e22cba7d07e476d0457b4e8cda53 to your computer and use it in GitHub Desktop.
Webhook for integrating Uptime Robot with Microsoft Teams
{
"text": " *alertDetails* - ID: *monitorID*. URL: [*monitorURL*](*monitorURL*)",
"title": "*monitorFriendlyName* is *alertTypeFriendlyName*"
}
@Teddybiers
Copy link

Can you share us what are your settings for Uptime Robot?

I use 365 Incoming Webhook and post message I placed your given JSON format. It doesn't work actually.

@deviant77
Copy link

deviant77 commented Jun 13, 2018

I got it working. Hopefully this will help someone else.

In Microsoft Teams:

  1. Add and configure the "Incoming Webhook" connector to the channel...
  2. Name = UptimeRobot (or whatever you want),
  3. Upload a UptimeRobot image to identify posts as UptimeRobot (optional).
  4. Copy the URL and add "?" to the end of it. I.e. https://outlook.office.com/webhook/xxxxxx@xxxxxx/IncomingWebhook/xxxxxx/xxxxxx?
  5. Click Done.

In UptimeRobot
Add a new Alert Contact...
Alert Contact Type = Web-Hook.
Friendly Name = Whatever you want.
URL to Notify = The URL copied above.
POST Value (JSON Format) =

{
  "text": " *alertDetails* - ID: *monitorID*. URL: [*monitorURL*](*monitorURL*)",
  "title": "*monitorFriendlyName* is *alertTypeFriendlyName*"
}

Send as JSON = Yes

Click Create Alert Contact, then Close.
Edit each monitor and add the new contact.

@DevUKco
Copy link

DevUKco commented Jun 14, 2018

Thanks for this, works a treat :)

@MorningZ
Copy link

Thanks for posting this! Super helpful.

@rexor62
Copy link

rexor62 commented Apr 8, 2023

Worked for me, Thanks! Still works three years later. It's surprising that they haven't broken that functionality yet...just give it time.

@eBebby
Copy link

eBebby commented Jun 10, 2024

I'm trying to setup the Connector, but i allways get an Error in the Workflow in Teams:

The execution of template action 'Send_each_adaptive_card' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['attachments']' is of type 'Null'. The result must be a valid array.

Any Ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment