Skip to content

Instantly share code, notes, and snippets.

@m-p-3
Last active June 4, 2019 16:19
Show Gist options
  • Save m-p-3/2589c79796b37d48ca281b89d888daf1 to your computer and use it in GitHub Desktop.
Save m-p-3/2589c79796b37d48ca281b89d888daf1 to your computer and use it in GitHub Desktop.
IFTTT Maker Webhook for Deluge notifications when a new torrent is created
#!/bin/bash
IFTTT_KEY="#####"
IFTTT_TRIGGER="deluge_add"
TORRENT_ID="$1"
TORRENT_NAME="$2"
TORRENT_PATH="$3"
/usr/bin/curl -X POST -H "Content-Type: application/json" -d '{"value1":"'"${TORRENT_ID}"'","value2":"'"$TORRENT_NAME"'","value3":"'"$TORRENT_PATH"'"}' https://maker.ifttt.com/trigger/$IFTTT_TRIGGER/with/key/$IFTTT_KEY
@m-p-3
Copy link
Author

m-p-3 commented Aug 8, 2017

You'll be able to create an IFTTT applet using Maker's Webooks and a specific trigger (ie: deluge_add in this instance) and either use Value1, Value2, or Value3 in your applet on IFTTTT.

Value1 = Torrent Hash
Value2 = Torrent Name
Value3 = Torrent Path used to store the torrent's data on the client

For example, using the notification action will allow the mobile IFTTT app to show a notification of a new torrent using their push services.

You could also create a copy called deluge_finish.sh, change the trigger and make another IFTTT applet to send you another notification when a torrent is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment