HESK Slack & Discord Webhooks
Get instant ticket alerts in Slack or Discord every time a new support ticket is created in HESK. Drop-in PHP script — no framework, no coding required.
HESK Discord Webhook
HESK Discord integration — real-time ticket notificationsPost a rich Discord embed to any channel the moment a new HESK support ticket is created. Each alert shows the ticket subject, submitter name, message preview, priority (color-coded), track ID, and a direct link to view the ticket in HESK.
- Rich Discord embeds with all key ticket fields
- Priority color coding (🔴 Critical · 🟠 High · 🟡 Medium · 🟢 Low)
- Direct link to ticket in HESK admin
- Configurable category filter (alert only for specific categories)
- Configurable priority filter
- Custom bot name & avatar URL
- First-run watermark — no flood of old tickets
- Respects Discord rate limits (500ms delay)
- Error logging via PHP error_log()
HESK Slack Webhook
HESK Slack integration — real-time ticket notificationsPost a structured Slack message attachment to any channel or DM the moment a new HESK ticket arrives. Formatted with Slack's attachment API for clean, readable ticket alerts with colored sidebars matching the ticket's priority.
- Slack attachment format (colored sidebar by priority)
- Priority labels (:red_circle: Critical · :orange_circle: High · etc.)
- Ticket title as clickable link to HESK admin
- Configurable category filter
- Configurable priority filter
- Custom bot name, icon URL or emoji (e.g. :ticket:)
- First-run watermark — no flood of old tickets
- Error logging via PHP error_log()
How it works
Drop the file into your HESK root
Upload hesk_discord_webhook.php (or the Slack version) into the same directory as your HESK hesk_settings.inc.php. The script reads HESK's existing config automatically — no extra database setup.
Edit the configuration constants at the top
Open the file and fill in your webhook URL, site URL, and any optional filters. All configuration lives in plain define() constants at the top of the file — no external config files.
Add a cron job to run it every minute
Add * * * * * php /path/to/hesk/hesk_discord_webhook.php to your crontab. The script maintains a watermark file to track which tickets have been posted — it will never re-post the same ticket.
That's it. New HESK tickets → instant Discord/Slack alerts.
Configurable Options
| Option | Default | Description |
|---|---|---|
WEBHOOK_URL | — | Your Discord or Slack incoming webhook URL |
BOT_NAME | "HESK Tickets" | The display name for the bot in Discord/Slack |
AVATAR_URL | — | Optional image URL for the bot avatar (Discord) or icon (Slack) |
HESK_SITE_URL | — | Your HESK install URL — used to build direct ticket links |
MSG_PREVIEW | 300 chars | Max characters of the ticket message body to show in the alert |
CATEGORY_FILTER | [] (all) | Alert only for specific HESK category IDs. Empty = all categories. |
PRIORITY_FILTER | [] (all) | Alert only for specific priorities (0=Critical, 1=High, 2=Medium, 3=Low) |
BATCH_LIMIT | 10 | Max tickets per cron run — prevents alert floods on first run |
Want the full stack?
Bundle the HeskAPI license with Discord or Slack for just $99 — that's a $9 saving. Only available at the time of initial purchase.
Webhook FAQ
CATEGORY_FILTER and PRIORITY_FILTER arrays at the top of the script to restrict alerts to specific categories or priority levels.error_log(). The watermark is still updated, so the script does not retry failed alerts on the next run — this prevents duplicate posts on intermittent failures.