A simple shell script to notify via IFTTT (ifttt.com) of Synology NAS events (via shell script calls).
This script enables a basic IFTTT integration to Synology NAS. If you want to be informed about the activities of your NAS which is not turned on all time, you can configure at startup and shutdown task events to call this script. Each call can send a different and individual message.
The script is run with the message to be sent - nothing else ;)
- Notify via IFTTT
- Easy setup
- Use of simple functions from Busy Box
- Automatic initialization when configuration is changed
- Simple solution
- Use on different NAS possible
- Easy maintenance
- Expandable
- not all events are supported (yet ;) )
- NAS (Synology with Busy Box)
- own volume (recommended)
- SSH access (recommended)
- Scheduler (e.g. Cron) with possibility to execute shell scripts
- Installation on a Synology with DSM 6.x
- Copy shell script and configuration file to shared volume (e.g.
control
) an your NAS. Remember the path to the shell script (e.g./volume1/control/syno_notify/
) - Rename and edit the default configuration
syno_notify.config.sample
file tosyno_notify.conf
- Enter your IFTTT magic key to variable
IFTTT_KEY
within the configuration file - Proceed with scheduler configuration.
(here: Synology DSM 6.x and system boot up event)
- Login to NAS.
- Define a new triggered task at
Boot-up
up to execute these commands at NAS startup - Define a message to be sent (see picture 2)
chmod 775 /volume1/control/synonotify/syno_notify.sh
/volume1/control/syno_notify/syno_notify.sh "System started"
You must run this task/script as root, as some commands are not allowed as users.
- Done ;)
- Create an account with IFTTT (ifttt.com)
- Log on to IFTTT at the backend
- Click profile image and run "create" in menus
- Define the "if" statement
- Search for and select "webhooks"
- Select "receive a web request"
- Name your event (e.g.
syno_event
) - Define the "that" statement
- Search for and select "notifications"
- Select "send a notification from the IFTTT app"
- Define the message
{{Value1}} (occurred {{OccurredAt}})
- Click "create action"
- Define magic key to config file (IFTTT_KEY) *)
- Define name of event (see 7.) to config file (IFTTT_EVENT)
- Done.
*) Your magic key is viewable via ifttt.com -> profile -> my services -> webhooks -> settings -> URL