[GH-ISSUE #201] Allow for optional additional data in integrated alerts #144

Closed
opened 2026-02-25 23:41:20 +03:00 by kerem · 1 comment
Owner

Originally created by @S1M0N on GitHub (Nov 14, 2018).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/201

Available integrations for alerts are wonderful, and I'm pleased to see Discord in there as well. However it would be nice to be able to add additional data in the payload for those alerts, such as being able to mention a specific user or group in Discord. This can be done by appending the UUID of the user to the content field in the payload JSON. For example, my Discord UUID is 236140136725741568 (don't worry it's safe for me to post this here) and can be added to the webhook as a mention by entering in the content section like this: <@236140136725741568> . Same for a Group, for example I have an Admin group on one of my Discord servers with a UUID of 512373976358453248, so it can be mentioned by adding <@512373976358453248> to the content section, but will only mention on that server.

This same principal works for emotes as well, as an example, my server has an emote of :SOVModShield: when a user uses it, but a bot/webhook needs to use <:SOVModShield:482569662333452288> to post it as well, again only in the server that "owns" the emote.

A simple option when adding the integration to included addition Content data, in a simple text box, would be reasonable for this addition. Also, being able to name each Discord (or other) integration uniquely would be beneficial.

Below is an example JSON payload for a webhook that would support this content section:

{
  "username": "Webhook Username",
  "avatar_url": "URL To Avatar you want",
  "content": "Text message. Up to 2000 characters.",
  "embeds": [
    {
      "author": {
        "name": "Author Name",
        "url": "URL To Content",
        "icon_url": "Icon URL"
      },
      "title": "Title",
      "url": "https://google.com/",
      "description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`",
      "color": 15258703,
      "fields": [
        {
          "name": "Text",
          "value": "More text",
          "inline": true
        },
        {
          "name": "Even more text",
          "value": "Yup",
          "inline": true
        },
        {
          "name": "Use `\"inline\": true` parameter, if you want to display fields in the same line.",
          "value": "okay..."
        },
        {
          "name": "Thanks!",
          "value": "You're welcome :wink:"
        }
      ],
      "thumbnail": {
        "url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg"
      },
      "image": {
        "url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg"
      },
      "footer": {
        "text": "Woah! So cool! :smirk:",
        "icon_url": "https://i.imgur.com/fKL31aD.jpg"
      }
    }
  ]
}
Originally created by @S1M0N on GitHub (Nov 14, 2018). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/201 Available integrations for alerts are wonderful, and I'm pleased to see Discord in there as well. However it would be nice to be able to add additional data in the payload for those alerts, such as being able to mention a specific user or group in Discord. This can be done by appending the UUID of the user to the `content` field in the payload JSON. For example, my Discord UUID is `236140136725741568` (don't worry it's safe for me to post this here) and can be added to the webhook as a mention by entering in the `content` section like this: `<@236140136725741568>` . Same for a Group, for example I have an `Admin` group on one of my Discord servers with a UUID of `512373976358453248`, so it can be mentioned by adding `<@512373976358453248>` to the content section, but will only mention on that server. This same principal works for emotes as well, as an example, my server has an emote of `:SOVModShield:` when a user uses it, but a bot/webhook needs to use `<:SOVModShield:482569662333452288>` to post it as well, again only in the server that "owns" the emote. A simple option when adding the integration to included addition Content data, in a simple text box, would be reasonable for this addition. Also, being able to name each Discord (or other) integration uniquely would be beneficial. Below is an example JSON payload for a webhook that would support this `content` section: ``` { "username": "Webhook Username", "avatar_url": "URL To Avatar you want", "content": "Text message. Up to 2000 characters.", "embeds": [ { "author": { "name": "Author Name", "url": "URL To Content", "icon_url": "Icon URL" }, "title": "Title", "url": "https://google.com/", "description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`", "color": 15258703, "fields": [ { "name": "Text", "value": "More text", "inline": true }, { "name": "Even more text", "value": "Yup", "inline": true }, { "name": "Use `\"inline\": true` parameter, if you want to display fields in the same line.", "value": "okay..." }, { "name": "Thanks!", "value": "You're welcome :wink:" } ], "thumbnail": { "url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg" }, "image": { "url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg" }, "footer": { "text": "Woah! So cool! :smirk:", "icon_url": "https://i.imgur.com/fKL31aD.jpg" } } ] } ```
kerem 2026-02-25 23:41:20 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@cuu508 commented on GitHub (Oct 22, 2021):

You can use the <@userid> syntax in check's "Description" field – see an example here: https://github.com/healthchecks/healthchecks/issues/578

<!-- gh-comment-id:949414332 --> @cuu508 commented on GitHub (Oct 22, 2021): You can use the `<@userid>` syntax in check's "Description" field – see an example here: https://github.com/healthchecks/healthchecks/issues/578
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#144
No description provided.