Signalgrid provides a simple API to developers, sysadmins, and ops teams for sending push notifications to iOS, Android, Browsers and more. https://signalgrid.co/ Co-authored-by: Christian Hesse <[email protected]>
3.5 KiB
Send notifications via Signalgrid
ℹ️️ Info: This module can not be used on its own but requires the base installation. See main README for details.
Description
This module adds support for sending notifications via Signalgrid ↗️. A queue is used to make sure notifications are not lost on failure but sent later.
Requirements and installation
Just install the module:
$ScriptInstallUpdate mod/notification-signalgrid;
A Signalgrid account is required, that will give you client key and channel.
Configuration
Configure SignalgridClientKey and SignalgridChannel with the client key
and channel from your Signalgrid account.
Edit global-config-overlay, add the required settings and reload the
configuration:
:global SignalgridClientKey "your-client-key";
:global SignalgridChannel "your-channel";
ℹ️ Info: Copy relevant configuration from
global-config(the one without-overlay) to your localglobal-config-overlayand modify it to your specific needs.
Usage and invocation
There's nothing special to do. Every script or function sending a notification will now send it via Signalgrid.
But of course you can use the function to send notifications directly. Give it a try:
$SendSignalgrid "Subject..." "Body...";
A link can optionally be specified:
$SendSignalgrid "Subject..." "Body..." "https://example.com/";
Alternatively this sends a notification with all available and configured methods:
$SendNotification "Subject..." "Body...";
To use the functions in your own scripts you have to declare them first. Place this before you call them:
:global SendSignalgrid;
:global SendNotification;
In case there is a situation when the queue needs to be purged there is a function available:
$PurgeSignalgridQueue;
See also
- Signalgrid documentation ↗️
- Send notifications via e-mail
- Send notifications via Gotify
- Send notifications via Matrix
- Send notifications via Ntfy
- Send notifications via Telegram