To send an SMS from Node-RED, build the request in a function node, pass it to an HTTP request node set to POST against https://api.tryready.com/v1/messages, and put your API key in an X-API-Key header. Then add a switch node on msg.statusCode, because Node-RED doesn't treat a 4xx answer as an error. That one detail is where most flows go wrong.
There's no Ready node to install. The core HTTP request node is the whole integration, and the same shape works for any provider with a REST API. We make Ready, so the examples use only the request shape we document. This guide covers the key, the function node, the HTTP node settings, status handling, retries that can't double-send, and a safe way to test.
What you need before you wire the flow
- An API key, kept out of the flow file. Node-RED can read it from an environment variable.
- A card on file and a number of your own. Both are required to send. The number is $2 a month.
- Consent you can show. Every request carries
consent_attested: true, your promise that the recipient agreed to texts. Set it only for people who did. - A trigger that carries a phone number: an HTTP in node, an MQTT message, a database poll, an inject node on a timer.
Every text is charged from the first one, at $0.0075 per segment plus a $0.0045 carrier fee per segment. An account can send up to 500 texts a calendar month until its 10DLC registration is approved, so register early. If you only want to build the flow first, create a test key (Settings, Developers, Environment: Test). It simulates every send with nothing charged. Our 10DLC explainer covers why registration matters.
Keep the key out of the flow
A flow export is a JSON file people paste into forums and commit to repos. Don't put the key in a node property that ends up in it.
Two options work. Start Node-RED with an environment variable such as READY_API_KEY and read it in the function node with env.get("READY_API_KEY"). Or use a credential field on a node that supports one, and set a credentialSecret in your settings.js so the credentials file is encrypted. Either way, treat the editor as sensitive: anyone who can edit a flow can send texts billed to you, so put the editor behind a login.
Build the request in a function node
Put the request-building logic in one function node in front of the HTTP node. It validates the number, sets the headers and builds the body as an object, so Node-RED does the JSON escaping.
const phone = String(msg.payload.phone || "").trim();
if (!/^\+?[0-9]{10,15}$/.test(phone)) {
node.warn("bad phone, not sending");
return null;
}
msg.headers = {
"X-API-Key": env.get("READY_API_KEY"),
"Content-Type": "application/json",
"Idempotency-Key": msg.payload.orderId + "-shipped"
};
msg.payload = {
to: phone,
body: "Your order #" + msg.payload.orderNumber + " has shipped.",
consent_attested: true
};
return msg; A few notes on that code:
tois E.164, like+12125550199. A 10-digit US number is treated as +1. Our guide to E.164 formatting for SMS APIs covers the odd cases.- Leave
fromout. Ready picks the number: the one this contact already texts with, otherwise your primary number. - Returning
nulldrops the message, so a bad row never reaches the API. - The body is an object, never a string stitched together. A name with a quote in it can't break the JSON.
Configure the HTTP request node
Drop in an HTTP request node and set these fields:
| Field | Value |
|---|---|
| Method | POST |
| URL | https://api.tryready.com/v1/messages |
| Payload | Send as request body |
| Return | A parsed JSON object |
| Headers | Leave empty, the function node set msg.headers |
| Use authentication | Off, the key travels in the header |
With Return set to a parsed JSON object, the answer lands in msg.payload and the HTTP status in msg.statusCode. The exact response fields are in the messages API docs, so read them there rather than guessing from a blog post.
Check the status code, not just errors
This is the trap. The HTTP request node only throws to a catch node on network failures, such as a timeout or a refused connection. A 401, a 409 or a 429 comes out of the normal output as a successful message with a statusCode on it. A flow that only wires a catch node will show green while every text fails.
Add a switch node after the HTTP node that routes on msg.statusCode:
| Condition | Route to |
|---|---|
| 200 to 299 | Success: write the message ID to your own record |
| 429 | Delay, then back into the function node with the same idempotency key |
| 409 | Read the error body. Quiet hours and idempotency conflicts mean different things |
| Any other 4xx | Log and stop. The input is wrong and a retry fails the same way |
| Network error (from a catch node) | Same path as 429 |
Opt-outs and numbers on your Ban list are refused up front and aren't charged. Treat that answer as final and mark the row so the flow skips it next time. The error codes page lists what each answer means.
Retry without texting twice
Node-RED has no built-in retry, so you build a small loop: a function node that increments msg.attempt, a delay node, and a switch that stops after three tries. The rule that makes the loop safe is the Idempotency-Key header.
Build the key from something stable in your data, such as an order ID plus what the message is. Don't use msg._msgid or a random UUID made inside the flow. A fresh value on every pass means a timeout that actually did send gets sent again. With a stable key, a repeated request is recognized and Ready doesn't text twice. If the same order can legitimately get the same text twice, add what differs, like a shipment number.
Our posts on idempotency keys and retries and failure handling go deeper on which failures to retry.
Quiet hours and rate limits
Two answers show up in real flows. An API text is held only if the recipient's window opens within 6 hours. Otherwise it isn't sent and you get a 409 QUIET_HOURS_BLOCK. Either route that to a long delay and resend, or add hold_until_allowed: true to the body, which holds the text up to 24 hours like a campaign text. Our guide to handling the quiet hours 409 shows both.
If a trigger can fire in bursts, such as a database poll that returns 400 rows, put a delay node in rate limit mode in front of the function node. Pick the queue option rather than dropping intermediate messages, since dropping would silently lose texts. For one message to many numbers, POST /v1/messages/bulk takes to as an array with at most 100 recipients per call, and a split node plus a join node in batch mode can build those arrays. See the bulk messages docs.
Test it with a debug node and a test key
Run the whole flow with a test key first. A test key simulates POST /v1/messages and POST /v1/messages/bulk: nothing is sent or charged, and each result has a test-msg- id. Writes it can't simulate answer 403 test_key_not_allowed. Attach a debug node to the HTTP node's output and set it to show the complete message, so you can see statusCode and the body together.
Then check these before you switch to a live key:
- Run the same inject twice and confirm the idempotency key makes the second request a repeat, not a second text.
- Send one real text to a number you own.
- Feed in a bad number and confirm the function node drops it.
- Unplug the network briefly and confirm the retry loop stops after three tries.
A test key proves your flow is shaped right. It doesn't prove delivery, so keep one real send in the checklist. The sandbox and test numbers guide explains what each layer can and can't prove.
Where Node-RED fits, and where it doesn't
Node-RED is a good fit for glue: a sensor reading, an MQTT message or a webhook turns into a text, with a few steps in between. If your trigger is an app Ready already connects to, a built-in automation can do it with no flow at all. And if the texting is core to a product with many customers, a queue in your own backend is the sturdier home. The same pattern, in a no-code builder, is in our guide to sending SMS from n8n workflows.
Pricing is on the pricing page, and if you expect large volume, talk to us.
The short version
Build the body in a function node, send it with the HTTP request node, and route on msg.statusCode so a 4xx can't hide behind a green flow. Use a stable Idempotency-Key, keep the API key in an environment variable, and test with a test key before a real send. When you're ready, the API quickstart walks through creating a key and making a first send.
Accounts opened before November 12, 2026 keep their signup prices, shown under Billing.