-
-
Save Dan-Q/0b3e02112c0378b7378acded8893fbc2 to your computer and use it in GitHub Desktop.
IFTTT filter to convert Sonarr webhooks into Slack messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let payload = JSON.parse(MakerWebhooks.jsonEvent.JsonPayload); | |
Slack.postToChannel.setTitle(payload.series.title); | |
if(payload.series.tvdbId) Slack.postToChannel.setTitleUrl(`https://www.thetvdb.com/?tab=series&id=${payload.series.tvdbId}`); | |
let message = (payload.episodes.length == 1 ? `New episode of ${payload.series.title}:\n` : `New episodes of ${payload.series.title}:\n`) + payload.episodes.map((episode:any)=>`* S${episode.seasonNumber}E${episode.episodeNumber} ${episode.title}`).join("\n"); | |
Slack.postToChannel.setMessage(message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment