Skip to main content

webhook

Web Hooks

Examples. Prefix: UN_WEBHOOK_, Header: [[webhook]]
  • Using the config file:
################
### Webhooks ###
################
# Sends a webhook when an extraction queues, starts, finishes, and/or is deleted.
# Created to integrate with notifiarr.com.
# Also works natively with Discord.com, Telegram.org, and Slack.com webhooks.
# Can possibly be used with other services by providing a custom template_path.
###### Don't forget to uncomment [[webhook]] and url at a minimum !!!!
[[webhook]]
url = "https://notifiarr.com/api/v1/notification/unpackerr/api_key_from_notifiarr_com"
## Provide an optional name to hide the URL in logs.
## If a name is not provided then the URL is used.
name = ""
## Do not log success (less log spam).
silent = false
## List of event ids to send notification for, [0] for all.
## The default is [0] and this is an example:
events = [1, 4, 6]
## ===> Advanced Optional Webhook Configuration <===
## Used in Discord and Slack templates as bot name, in Telegram as chat_id.
nickname = "Unpackerr"
## Also passed into templates. Used in Slack templates for destination channel.
channel = ""
## List of apps to exclude. None by default. This is an example:
exclude = ["readarr", "lidarr"]
## Override internal webhook template for discord.com or other hooks.
template_path = ''
## Override automatic template detection. Values: notifiarr, discord, telegram, gotify, pushover, slack
template = ""
## Set this to true to ignore the SSL certificate on the server.
ignore_ssl = false
## You can adjust how long to wait for a server response.
timeout = "10s"
## If your custom template uses another MIME type, set this.
content_type = "application/json"
  • Using environment variables:
## Web Hooks
UN_WEBHOOK_0_URL=https://notifiarr.com/api/v1/notification/unpackerr/api_key_from_notifiarr_com
UN_WEBHOOK_0_NAME=
UN_WEBHOOK_0_SILENT=false
UN_WEBHOOK_0_EVENTS_0=1
UN_WEBHOOK_0_EVENTS_1=4
UN_WEBHOOK_0_EVENTS_2=6
UN_WEBHOOK_0_NICKNAME=Unpackerr
UN_WEBHOOK_0_CHANNEL=
UN_WEBHOOK_0_EXCLUDE_0=readarr
UN_WEBHOOK_0_EXCLUDE_1=lidarr
UN_WEBHOOK_0_TEMPLATE_PATH=
UN_WEBHOOK_0_TEMPLATE=
UN_WEBHOOK_0_IGNORE_SSL=false
UN_WEBHOOK_0_TIMEOUT=10s
UN_WEBHOOK_0_CONTENT_TYPE=application/json

This application can send a POST webhook to a URL when an extraction begins, and again when it finishes. Configure 1 or more webhook URLs with the parameters below. Works great with notifiarr.com. You can use requestbin.com to test and see the payload.

Config NameVariable NameDefault / Note
urlUN_WEBHOOK_0_URLNo Default / URL to send POST webhook to.
nameUN_WEBHOOK_0_NAMENo Default / Provide an optional name to hide the URL in logs.
silentUN_WEBHOOK_0_SILENTfalse / Hide successful POSTs from logs.
eventsUN_WEBHOOK_0_EVENTS_0[0] / List of event ids to send notification for, 0 for all.
nicknameUN_WEBHOOK_0_NICKNAME"Unpackerr" / Passed into templates for telegram, discord and slack hooks.
channelUN_WEBHOOK_0_CHANNELNo Default / Passed into templates for slack.com webhooks.
excludeUN_WEBHOOK_0_EXCLUDE_0[] / List of apps to exclude: radarr, sonarr, folders, etc.
template_pathUN_WEBHOOK_0_TEMPLATE_PATHNo Default / Instead of an internal template, provide your own.
templateUN_WEBHOOK_0_TEMPLATENo Default / Instead of auto template selection, force a built-in template.
ignore_sslUN_WEBHOOK_0_IGNORE_SSLfalse / Ignore invalid SSL certificates.
timeoutUN_WEBHOOK_0_TIMEOUT"10s" / How long to wait for server response.
content_typeUN_WEBHOOK_0_CONTENT_TYPE"application/json" / Content-Type header sent to webhook.

Notes for Web Hooks

  • Nickname should equal the chat_id value in Telegram webhooks.
  • Channel is used as destination channel for Slack. It's not used in others.
  • Nickname and Channel may be used as custom values in custom templates.
  • Name is only used in logs, but it's also available as a template value as {{name}}.
  • Built-In Templates: pushover, telegram, discord, notifiarr, slack, gotify.