n8n
Send messages and campaigns, estimate their cost, and keep contacts and lists up to date from an n8n workflow, or start a workflow when a message is delivered or a campaign finishes. Zapier, Make and n8n covers what the three tools share.
There are two nodes: Codelia SMS for the actions, and Codelia SMS Trigger to start a workflow on an event.
Install
Coming to n8n
The Codelia SMS nodes are being published. Until they are, n8n can't find them by name. To use them before then, write to hello@codelia.studio and ask for early access.
In n8n, open Settings > Community nodes, choose Install, and enter n8n-nodes-codelia-sms.
Connect with an API key
- Create a key on the API keys screen in the portal, with the permissions below.
- In n8n, create a Codelia SMS API credential and paste the key. Leave Base URL as it is.
n8n checks the key when you save the credential. Give the nodes a key of their own, so you can revoke it without stopping anything else that uses the API.
Which permissions the key needs
Full access covers every action and trigger. To give less, choose these:
| Step | Permissions |
|---|---|
| Send SMS | Messages (Send), and Messages (Read) when you set a Maximum cost |
| Estimate cost | Messages (Read) |
| Send or schedule campaign | Messages (Send), and Messages (Read) when you set a Maximum cost |
| Add or update contact | Contacts (Read and Write) |
| Add contact to list | Lists (Write) |
| Remove contact from list | Lists (Write) |
| The Sender name dropdown | Sender names (Read) |
| The Lists and List dropdowns | Lists (Read) |
| Codelia SMS Trigger | Webhooks (Read and Write), Messages (Read) for Include message text, and Opt-outs (Read) for Contact opted out and Contact opted back in |
Authentication lists every permission a key can hold.
Actions
The Codelia SMS node's actions, by resource:
| Resource | Operation | Fields |
|---|---|---|
| Message | Send SMS | Phone numbers, Message, Sender name, Message type, Maximum cost, Unique ID |
| Message | Estimate cost | Phone numbers, Lists, Message, Sender name, Message type |
| Campaign | Send or schedule campaign | Message, Lists, Phone numbers, Sender name, Message type, Send at, Maximum cost, Metadata, Unique ID |
| Contact | Add or update contact | Phone number, First name, Last name, Email, Preferred language |
| List | Add contact to list | List, Contact ID |
| List | Remove contact from list | List, Contact ID |
- Phone numbers: separate several with commas.
- Send at: leave it empty to send now, or pick a time 5 minutes to 90 days ahead. It's read in your workflow's time zone. While it's filled in, Maximum cost is hidden: a scheduled campaign is priced when it sends, so the cost it returns is an estimate.
- Maximum cost: an amount in your organization's currency, like 5.00. We price the message first, and the node stops without sending if the price is higher. The price check counts people who opted out, like Estimate cost, so it can stop a send that would have cost less. What it costs has the details.
- Sender name: leave it as the default sender name, or choose another.
- Add or update contact: a field you leave empty keeps what the contact already has. Preferred language is a two-letter code, like en or el.
Unique ID
Fill Unique ID with something unique to the event that started the workflow, like an order number. Repeating it from the same node within 24 hours sends nothing new, in this run or a later one: the node gets back what the first one did. Reusing it with different details, like another message, is refused. Two workflows, or two Codelia SMS nodes in one workflow, can use the same Unique ID without affecting each other. If the first run was refused or failed, repeating it gets the same answer for 24 hours. Use a new Unique ID to try again. Until the workflow is saved for the first time, it only stops a retry in the same run from sending twice.
When one item sends more than one message from the same node, in a loop for example, give each message its own Unique ID, like the order number and the line number together. The same Unique ID with a different message is refused.
Without a Unique ID, Retry on fail still can't send the same item twice in one run, but running the workflow again sends again. Retrying safely explains what a repeat gets back.
Triggers
Add Codelia SMS Trigger and choose its Events: one or more of Message delivered, Message not delivered, Campaign completed, Campaign finished with failures, Campaign failed, Contact opted out and Contact opted back in. Zapier, Make and n8n says when each one starts.
- Activating the workflow creates a webhook for it with the events you chose, named "Created by n8n" and the workflow's name on the Webhooks screen. Deactivating it deletes the webhook.
- Your n8n must be reachable at a public https address.
- Each event's signature is checked before the workflow runs. One that doesn't check out starts nothing, and so does a test event sent from the Webhooks screen.
- A message event doesn't include the text of the message. Turn on Include message text to add it.
Related
- Zapier, Make and n8n: what it costs, and disconnecting.
- Authentication: API keys, and how to roll or revoke one.
- Webhooks: the events and what each one carries.