Push notifications to your users without your own app
You have a script, a service or a bot, and the people who need to know what it does are not at your terminal: your team, your players, your users. A phone app of your own would reach them, but building and publishing one is a project of its own. Here are the usual ways, what each costs, and how it works with Shale.
The usual ways
Build your own app
A push to a phone goes through Apple's and Google's push services, and only to an app installed from the App Store or Google Play. That means a developer account with each, the store reviews, an app to keep up to date and a server that stores every device's push token. It is the right way when the app is your product. For a few notifications it is a lot.
Web push
A website asks for permission, and the browser receives pushes through its vendor's push service. No store, but you need a site with a service worker and a server that keeps the subscriptions, every person has to allow it in their browser, and on an iPhone or iPad it works only for a site added to the Home Screen.
A Telegram bot
A bot sends a message with one HTTPS call, free and quick to set up. Your people need Telegram, and each has to start a chat with your bot first: the bot can only write to chats it knows.
ntfy, Pushover and similar
Made to notify yourself from a script: one request, a notification on your own phone. They can reach others too (an ntfy topic, Pushover's groups), but each person installs that app and subscribes, and what they get is a list of notifications, nothing around it.
How it works with Shale
Shale is one app for a person's communities and the tools they follow. You don't build an app: the people you want to reach follow your module in theirs, and your script sends with one request.
- In a team in the app, add a notification channel.
- Under Incoming webhooks, choose Add webhook. It runs Publish
notifications; in its Field mapping, fill the title from
/titleand the text from/bodyof what you send. The app shows the secret address once. - Send from anything that can make a request:
curl -fsS -H 'Content-Type: application/json' \
-d '{"title":"Deploy finished","body":"api 4.2.0 is live"}' \
https://api.shale.app/hooks/Xv3kP9qLm2Tz7RbW4yHs8NcE1uJd6GfA5oQnRiVt0wK
The answer is 202. A form works as well as JSON. The address here is a
made-up example (its token is 43 characters, like a real one); yours is the
one the app shows.
Who gets it:
- Your team's members get a push right away, and on Discord or Telegram if they connected those.
- The people of your community, when the channel is bound to it as notifying: they agreed to its notifications when they joined, and get a push too.
- Anyone who adds your channel once you make it public: they get a push right away too, on Android, iPhone, iPad and Mac, like your members, and each post in their Inbox.
Limits
- 60 calls a minute and 5,000 a day per address, 64 KB per call.
- A wrong address answers
404, the same as one that never existed. You can have a call signed with HMAC-SHA256 and a secret, and replace the address or the secret at any time. - Through a community of more than 500 people who agreed, only a manager's posts (or their automations') push them, at most 10 times in 24 hours. Every post still reaches their Inbox.
- The people you reach need the Shale app (Android, iPhone, iPad, Mac, Windows). It is not out yet: get one mail when Shale is released.
Only for yourself
To reach just your own phone, add the module Push per curl. It gives you a private address, and its title is all it takes:
curl -fsS -d "title=Backup done" https://api.shale.app/hooks/Xv3kP9qLm2Tz7RbW4yHs8NcE1uJd6GfA5oQnRiVt0wK
What else Shale does for scripts, agents and services: Shale for developers.