Native bee for Beehive that sends SMS messages via the seven gateway.
- Native Beehive Bee - Compiled into the Beehive binary as a regular bee
- Templated Messages - Interpolate event payloads via Go template syntax (
{{.timestamp}}etc.) - Multiple Recipients - Comma-separate phone numbers, or reference seven contact-book groups
- Go 1.18 or newer to rebuild the Beehive binary
- A clone of muesli/beehive
- A seven account with API key (How to get your API key)
go get github.com/seven-io/beehiveAdd the import to hives.go:
import (
// ...
_ "github.com/seven-io/beehive"
)Then download dependencies and recompile:
go mod download
makeAdd a seven bee to your Beehive conf.json:
{
"Bees": [
{
"Name": "seven SMS Example Bee",
"Class": "sevenbee",
"Description": "A bee to demonstrate seven with Beehive",
"Options": [
{ "Name": "api_key", "Value": "YOUR_SEVEN_API_KEY" },
{ "Name": "from", "Value": "+490123456789" },
{ "Name": "to", "Value": "+490123456789,+456789012345" }
]
}
]
}| Option | Description |
|---|---|
api_key |
seven API key. Sign up and get one for free. |
from |
Sender ID. Up to 11 alphanumeric or 16 numeric characters. |
to |
Comma-separated recipient list. Phone numbers, contact-book entries or group names. |
Send an SMS. The text option supports event interpolation:
{
"Actions": [
{
"Bee": "seven SMS Example Bee",
"Name": "sms",
"Options": [
{
"Name": "text",
"Type": "string",
"Value": "The current time is {{.timestamp}}"
}
]
}
]
}Need help? Feel free to contact us or open an issue.