[HN Gopher] Sending notifications programmatically: let me count...
___________________________________________________________________
Sending notifications programmatically: let me count the ways
Author : rl1987
Score : 82 points
Date : 2022-03-09 10:07 UTC (12 hours ago)
(HTM) web link (www.trickster.dev)
(TXT) w3m dump (www.trickster.dev)
| unamashana wrote:
| If you are building an app just for yourself, or a small team.
| you can leverage our product MagicBell
| (https://www.magicbell.com), and get in-app, push, text, and
| Slack notifications in one API call.
| buu700 wrote:
| Tangentially, I recently used mouse emulation on a timer to
| manipulate Firefox into sending a push notification with a URL to
| a mobile device for a partially faked out internal demo.
| criddell wrote:
| In the past, I always used my carrier's email-to-sms bridge.
|
| https://www.lifewire.com/sms-gateway-from-email-to-sms-text-...
| egberts1 wrote:
| It is good for that purpose if you are the recipient and know
| what is your carrier. But multiple recipients, not so much.
| criddell wrote:
| Good point.
| thembodev wrote:
| In addition to what's mentioned here, if you don't need to read
| any data back to your application, you can just generate a
| webhook url for a discord server and send json messages there.
| It's very easy to set up if you just want to keep yourself
| informed about what's going on.
|
| If I remember right it's the same message object format as the
| full api, the only real limitation is that it's oneway only
| communication.
| londons_explore wrote:
| telegram messaging is the same. You can send a message to a
| group or individual with a simple get request to a URL.
|
| That URL is: ttps://api.telegram.org/bot[bot_id]/sendMessage?ch
| at_id=[chat_id]&parse_mode=Markdown&text=[message_contents]
|
| Get the bot_id by sending "/newbot" to a telegram user named
| botfather.
|
| Get the chat_id as described here:
| https://stackoverflow.com/questions/32423837
| troygoode wrote:
| Great article. All of this complexity is the reason I started
| Courier (YC S19) [0], which we just launched on HN [1] a few days
| ago. :-)
|
| We take the approach of essentially offering an abstraction layer
| that lets you route to one or more channels based on data related
| to the notification event instead of having to hardcode the
| integration at the callsite. This has the added benefit of also
| letting you pull the template abstraction into the same space (so
| you don't go crazy manually maintaining HTML templates for email,
| plain text for SMS, BlockKit for Slack, etc. etc.)
|
| FYI we support integrations for nearly all of the channels
| mentioned here: email (via SMTP, SendGrid, SES, and others),
| Discord, SMS (via Twilio and others), web push, WhatsApp (via
| Twilio WhatsApp), Slack, & PagerDuty. And many others...
|
| [0]: https://www.courier.com/
|
| [1]: https://news.ycombinator.com/item?id=30527757
| amelius wrote:
| I'm using the Pushover app for this. Very easy to interface with.
| You can even send images.
| MattJ100 wrote:
| Handy examples. If you need flexibility with regards to output
| channels, Apprise is undoubtedly a good choice. There are also
| dedicated projects such as https://ntfy.sh/ and
| https://gotify.net/ (both self-hostable).
|
| If you have XMPP, you can also send notifications to XMPP
| directly via sendxmpp (of which there are actually many
| incarnations:
| https://wiki.xmpp.org/web/User:MDosch/Sendxmpp_incarnations ) or
| via a webhook/HTTP API such as https://slickmsg.com/
| binwiederhier wrote:
| Eyyy, that's my project. Hurray. Thanks for mentioning it.
| davidmorris wrote:
| Hi, it's only a small thing, but E.164 format does not include
| the +. If it includes the plus then it is E.123 format. The
| Twilio page explaining E.164 formatting is wrong.
| mknsri wrote:
| Care to elaborate? I've recently had to research E.164 and
| haven't come across this being mentioned. In fact I remember
| more sources claiming that the plus-sign is a required part of
| the format
| davidmorris wrote:
| Yes sure! E.164 is the international standard as set by the
| ITU. Its a bit like an RFC. The original can be found in
| English here: https://www.itu.int/rec/T-REC-E.164-201011-I/en
|
| The normal public telephone numbers we use are "International
| ITU-T E.164-number for geographic areas" and all E.164
| numbers consist of the digit 0 to 9 only and no other
| characters. Spaces, symbols prefixes or suffixes do not form
| part of the number.
|
| Section 12 explains that when a local code should be called
| in order to make an international call (e.g. dialling 00 from
| the UK or 011 from the USA) then E.123 suggests using the
| symbol + before the E.164 number. This symbol can be used
| when displaying the number to a human so the human can
| understand that they should replace the + with their local
| code to call internationally.
|
| There's also a bit in section B.7 which describes CLIs and
| denotes that a CLI Should only be "the full international
| ITU-T E.164-number, i.e., country code (CC), national
| destination code (NDC) and subscriber number (SN). No other
| information, such as prefixes or symbols (e.g., "+"), should
| be included"
| mxuribe wrote:
| I've historically used mailjet's api for automating the sending
| of little emails to myself for my own personal stuff...But lately
| have only been using matrix. In essence i have a private room
| with myself and a bot, and simply send matrix messages to that
| room. Its pretty quick and easy, and i can access the messages
| from any matriux app/client anywhere that i have internet
| connection...and since matrix is like email in that it is
| federated...i'm theoretically not as impacted by cloud Saas
| outages...unless of course my own matrix homeserver gets
| hit...but then again, this is only for my personal stuff.
| cstuder wrote:
| I like Apprise, one single Python library / CLI tool, to send
| notifications via a lot of services:
| https://github.com/caronc/apprise
| gts514 wrote:
| this is exactly what I came to the comments to look for - I
| want to be able to integrate against one API and let _that_
| handle the onwards notifications. thanks!
| buro9 wrote:
| Send to the Prometheus alertmanager and utilise the provided
| notification channels.
|
| Then when you wish to reconfigure the channels you use for
| different notifications you can do so in a zero code way.
|
| Alertmanager is available in Grafana Cloud as part of the
| alerting stack that is standard, so if you're using Grafana Cloud
| you already have Alertmanager. Alternatively it's free with
| Prometheus.
___________________________________________________________________
(page generated 2022-03-09 23:02 UTC)