Slack notifications Wiki Page - personal script update

If folks are using Slack, I thought this would be a good topic on how to add “Snag” notifications as well.

The script here: https://github.com/Sonarr/Sonarr/wiki/Sonarr-notifications-in-Slack-using-curl doesn’t include an option for a “Snag” event. I took the script there and changed it slightly to notify on snags as well:


#!/bin/bash
if [ “$sonarr_eventtype” == “Grab” ]
then
curl -X POST --data-urlencode “payload={“username”: “Sonarr”, “icon_emoji”: “:ghost:”, “text”: “$sonarr_eventtype: $sonarr_release_title”}” $1
else
curl -X POST --data-urlencode “payload={“username”: “Sonarr”, “icon_emoji”: “:ghost:”, “text”: “$sonarr_eventtype: $sonarr_series_title S$sonarr_episodefile_seasonnumber E$sonarr_episodefile_episodenumbers ($sonarr_episodefile_quality)”}” $1
fi

note: each curl line is a full line, not wrapped