notify
A dead simple Go library for sending notifications to various messaging services.
Go library that lets you send messages to Telegram, Discord, Slack, email, and 15+ other platforms from a single API call, without writing separate integration code for each service.
Notify is a Go library that lets you send messages to multiple messaging platforms from a single, consistent API. Instead of writing separate integration code for each service you want to reach, you configure each one through a shared interface and then call one Send function to deliver your message across all of them at once.
The basic flow is: create a service object (for example, Telegram), tell it which chat or channel to send to, register it with the notifier, and then call Send with a subject and message body. You can register as many services as you like, and they all receive the same message when you trigger a send.
The library supports a wide range of messaging services out of the box: Telegram, Discord, Slack, Email (via SMTP), Amazon SES, Amazon SNS, Firebase Cloud Messaging, Google Chat, Mailgun, Line, Matrix, Plyer, RocketChat, SendGrid, Pushbullet, Microsoft Teams, Mattermost, and others. Each service is implemented as a separate Go package under the service/ directory, so you only import what you actually use.
The project started as a personal tool for the author's own notification needs and grew into a general library. The README notes that it is not suitable for critical production scenarios because it depends on third-party client libraries and external service APIs that can change. Using the library to send spam may result in bans on the affected platforms.
Installation is a single go get command. The library follows the pattern used by many logging libraries: global convenience functions are available, but the recommended approach is to create a local Notify instance and pass it through your application rather than relying on the global state.
Where it fits
- Send deployment alerts to a Slack channel and a Telegram group simultaneously with one function call
- Build a monitoring script in Go that notifies your team on Discord and by email when a server goes down
- Add multi-channel notifications to a Go CLI tool with a single go get command and a few lines of setup
- Route the same alert to Microsoft Teams, Mattermost, and Google Chat without maintaining three separate integrations