Skip to content

Instantly share code, notes, and snippets.

@cjmaxik
Last active November 5, 2025 20:55
Show Gist options
  • Select an option

  • Save cjmaxik/3044a7c84ee6a5d6b36821d55e7eb3ba to your computer and use it in GitHub Desktop.

Select an option

Save cjmaxik/3044a7c84ee6a5d6b36821d55e7eb3ba to your computer and use it in GitHub Desktop.
Proxmox - Discord notification via Webhook

Proxmox - Discord notifications via Webhook

Note

If you have error 400 when sending the notification, that means that your message is too long, since Discord has a character limit of 2000. If you don't care about the logs, remove {{ escape message }} from the description field. Otherwise, seek another way to send notifications (i.e. via Cloudflare worker that truncates the description field).

image
  1. Add Notification Target
  • Endpoint name: Discord
  • Method: POST
  • URL: https://discord.com/api/webhooks/{{ secrets.token }}
  • Headers: Content-Type: application/json
  • Body:
{
  "content": "",
  "embeds": [
    {
      "color": 14839040,
      "description": "",
      "fields": [
        {
          "name": "Severity",
          "value": "{{ escape severity }}",
          "inline": true
        }{{ #if fields.type }},
        {
          "name": "Type",
          "value": "{{ escape fields.type }}",
          "inline": true
        }{{ /if }}{{ #if fields.job-id }},
        {
          "name": "Job ID",
          "value": "{{ escape fields.job-id }}",
          "inline": true
        }{{ /if }},
        {
          "name": "Timestamp",
          "value": "<t:{{ timestamp }}>"
        }
      ],
      "title": "{{ escape title }}"{{ #if fields.hostname }},
      "author": {
        "name": "{{ escape fields.hostname }}"
      }{{ /if }}
    }
  ],
  "username": "Proxmox",
  "avatar_url": "https://www.proxmox.com/apple-touch-icon.png"
}
  • Token: <everything after webhooks/ in the URL>
  • Comment: Send notifications to Discord
  1. Add Discord to Notification Matcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment