sendrail

n8n node for Sendrail: send SMS and verification codes (OTP), check numbers, manage opt-outs and receive delivery and reply events

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0
Author: Sendrail

Documentation

n8n-nodes-sendrail

n8n community node for Sendrail, an SMS API with its own network of GSM gateways.

  • Sendrail node: send SMS (text or stored template), send and check verification codes (OTP), check a phone number, manage the opt-out list, read replies, get the account's credit. Usable as a tool of an AI Agent node.
  • Sendrail Trigger node: starts a workflow when a message reaches its final status, a reply or missed call arrives, or somebody opts out with STOP.

Install

In n8n: Settings → Community Nodes → Install, package name n8n-nodes-sendrail. See the n8n guide.

Credentials

Create an API key in the Sendrail dashboard under Keys and put it into a Sendrail API credential.

Start with a test key (sr_test_…, type "testovací" when creating the key): every operation works and answers the same, but nothing is sent and nothing is charged. A message becomes sent after about three seconds; a number ending in 0000 always fails, so you can try the error branch too.

Operations

Resource Operation
Message Send Text or stored template with variables. Options: idempotency key, dry run, bulk.
Message Get, Cancel Status of a message; cancel before it leaves.
Message Get Many (inbound) Latest replies and missed calls. Inbound must be switched on for the account.
Verification Send, Check, Get One-time code by SMS. valid is true exactly once.
Number Check Validity, country, kind and price without sending. Free.
Opt-Out Get Many, Add, Remove Numbers the account must not write to.
Account Get Credit, plan, limits and usage of the key.

Tips:

  • Set an Idempotency Key on Send (for example order-{{ $json.orderId }}-ready). When an execution is retried, the person does not get the text twice.
  • Mass mailings (newsletters, campaigns) must have Bulk switched on.
  • Check a verification code in the workflow; never send the code itself back to the person being verified.

Trigger

  1. Add Sendrail Trigger, choose the events, activate the workflow.
  2. Copy the Production URL into the "Webhook" field of your API key in the Sendrail dashboard and save. Sendrail has one webhook address per key.
  3. Copy the key's signing secret ("Podpisový klíč webhooku") into Signing Secret. Requests without a valid X-Sendrail-Signature are then refused.

The output item has event and the fields of the message or event, for example {"event": "message.final", "id": "msg_…", "status": "sent", …}.

Sendrail repeats a delivery that was not acknowledged, so the same event can arrive more than once.

Resources

Development

npm install --ignore-scripts
npm test        # builds and runs test/smoke.js (no network)

License

MIT

Discussion