Skip to content

Instantly share code, notes, and snippets.

@Log1x
Last active November 28, 2023 21:15
Show Gist options
  • Save Log1x/af2c1a9613d155477295f20eece406a3 to your computer and use it in GitHub Desktop.
Save Log1x/af2c1a9613d155477295f20eece406a3 to your computer and use it in GitHub Desktop.
Uptime Robot Discord Webhook

Uptime Robot Webhook for Discord

Screenshot

Configuration

  • Alert Contact Type: Web-Hook

  • URL to Notify: https://discordapp.com/api/webhooks/CHANGEME/CHANGEME?

    • Must end with ?
  • Send as JSON (application/json).

  • Send default variables as POST parameters

{
"embeds": [
{
"title": "*alertDetails*",
"footer": {
"text": "Timestamp: *alertDateTime*"
},
"thumbnail": {
"url": "https://i.imgur.com/00zpqHE.jpg",
"height": 16,
"width": 16
},
"fields": [
{
"name": "ID",
"value": "*monitorID*"
},
{
"name": "Name",
"value": "*monitorFriendlyName*"
},
{
"name": "Destination",
"value": "*monitorURL*"
},
{
"name": "Type",
"value": "*alertTypeFriendlyName*"
}
]
}
]
}
@FadedThaAHo
Copy link

How can I use it for https://repl.it/??

@1day2die
Copy link

Is this still up to date? dosent seem to work

@Log1x
Copy link
Author

Log1x commented Sep 12, 2021

Is this still up to date? dosent seem to work

still working on my end

@1day2die
Copy link

1day2die commented Sep 12, 2021

it was a problem with uptime robot. It does not work with "ö, ä ,ü " etc. thanks for this code man. amazing

@lt-kraken
Copy link

Was already wondering why I didn't get a notification, turns out that the body is actually a requirement and doesn't default to something. Thanks for providing the message body :)

@faderzz
Copy link

faderzz commented Aug 5, 2022

unfortunately for the latter there's no way to do a conditional here to control the embed color.

as far as the mention you should be able to add @username into one of the fields, but I'm not sure if it will work.

Hey, I found a workaround, it should be possible to add a message field above the embed like the screenshot

image

You can do this by using adding "content": "your message", above "embeds": [
e.g.
{
"content": "@everyone bot down",
"embeds": [
...

To mention a user you can add <@USERID> to the text field and replace "USERID" with the ID of the user or a role if you wanna do that

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