IFTTT Notification Service. Trigger IFTTT webhooks to receive rich notifications on a mobile phone.
451
Simple Rust app that will send POST requests to an IFTTT webhook.
This will then can create other events/notifications on a smart phone.
Notifications can be configured/scheduled from a JSON or can be manually triggered via an API request.
To use, open notify.toml and update the webhook key (See IFTTT config below).
Then just run/build the project using cargo cargo run --release (Or use docker/docker-compose).
Note: I will be uploading binaries soon™ to GitHub.
To create repeating scheduled notifications, update the JSON file data/notifications.json (See below for an example). Scheduled notifications can be disabled via the config in notify.toml.
[
{
"title": "Sample Notification 1",
"content": "Some message",
"cron": "*/1 * * * *",
"enabled": false
},
{
"title": "Sample Notification 2",
"content": "Some message 2 with an image!",
"image": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/368px-Google_2015_logo.svg.png",
"cron": "*/7 10 * * *",
"enabled": false
}
]
Notify will host a web server that can receive http requests. Web server can be configured (including disabled) within the config notify.toml.
| Endpoint | Method | Description | Response |
|---|---|---|---|
/notification | POST | Accepts incoming notification JSON and sends API request to IFTTT. | 204: No Content (Success) 400: JSON object containing error and timestamp |
/health | GET | Returns health and uptime of the service. | 200: JSON object containing uptime |
Body of POST request should be like this:
{
"title":"Title of notification",
"content":"Content of notification"
}
The service is best ran using a docker-compose file. Use the sample provided:
version: '3.3'
services:
notify:
container_name: notify
image: coombszy/notify:latest
volumes:
- ./config:/app/config
- ./data:/app/data
notify.toml for the serviceCurrently, you cannot publish an IFTTT applet if it uses the webhook functionality. So i've included instructions on how to make the services yourself:
Finally you will need to get your Webhooks key from the Webhooks Service FAQ. Insert this API key into the notify.toml config file for the ifttt_key.
If you chose a different event name in step 2, change notify.toml variable ifttt_event to the value you set.
If you are looking for the legacy version, it can been found here. And the update notes can be found here.
Some useful links
Content type
Image
Digest
Size
62.3 MB
Last updated
about 4 years ago
docker pull coombszy/notify