Inbound automations
An automation is a rule that runs when a message arrives on one of your numbers. An incoming text can be answered, forwarded, saved to a list or sent to your own systems without anyone touching it.
A common example is a keyword sign-up. Someone texts JOIN to your dedicated number, and the automation adds them to a contact list, saves their name as a contact, and texts back a welcome message.
You will find automations under Automations in the main menu.
How a rule is put together
Every rule has three parts.
- A trigger, which decides which incoming messages the rule applies to.
- An optional receiving number, so the rule only applies to messages that arrive on one of your numbers.
- One or more actions, which run in the order you arrange them.
Give the rule a name you will recognise later. It is what appears in the logs.
Triggers
All inbound
The rule runs for every message that arrives. This is the right trigger for forwarding everything to a webhook, an email address or a phone system.
Keyword
The rule runs when the message text matches a keyword you choose. There are four ways to match.
| Match | The rule runs when |
|---|---|
| Exact | The whole message is the keyword. JOIN matches, "JOIN please" does not. |
| Starts with | The message begins with the keyword, so "JOIN Jane Smith" matches. |
| Contains | The keyword appears anywhere in the message. |
| Does not contain | The message does not include the keyword. Useful for a catch-all rule that skips one particular word. |
- Matching ignores capitals and spacing around the message, so JOIN, join and " Join " all match.
- Keywords need to be at least two characters.
- Keywords cannot start with "stop" or "unsubscribe". Messages starting with those words always opt the sender out. More on that below.
Scoping a rule to one number
By default a rule listens on every number in your account. Pick one under Receiving number and the rule only runs for messages that arrive on that number. This is how you route two departments, two branches or two phone systems separately.
- Only your active dedicated numbers appear in the list.
- Opt-outs that come in through your opt-out link rather than as a reply are not tied to a receiving number, so they only match rules set to any number.
- Keyword rules on shared numbers can misfire. A reply to a shared number is attributed to the account that last messaged that handset, so use a dedicated number when a keyword matters.
Active hours
Tick Only run during certain hours to give a rule a start time, an end time and the days it applies to. Outside those hours the rule does not match at all, so none of its actions run and it does not stop any other rule from running.
Times use your account timezone, shown under the setting and taken from your profile.
A window can run overnight. Set the start time later than the end time and the window carries into the next morning. An auto reply set to 17:00 through 09:00 answers everything that arrives once the office closes, right up to the next working morning. The days you tick are the days the window starts on, so a message at 02:00 on Tuesday belongs to Monday's window.
Leave the tick box off and the rule runs at any hour, the default.
Actions
A rule can have up to ten actions and they run top to bottom. Use the arrows on each action card to change the order.
| Action | What it does |
|---|---|
| Auto reply | Texts the sender back |
| Forward SMS | Sends it on to Australian mobiles |
| Forward email | Sends it on to email addresses |
| Webhook | Posts it to your server as JSON |
| Forward 3CX | Posts it to your 3CX chat thread |
| Add to list | Adds the sender to a contact list |
| Save contact | Saves the sender as a contact |
| Unsubscribe | Opts the sender out, the same as STOP |
| Resubscribe | Takes the sender off your unsubscribe list |
Auto reply
The reply appears in the Messenger as the newest message in that conversation. It is an outgoing SMS and uses credits, so a reply over 160 characters costs more than one credit. See Understanding SMS parts and unicode.
- The reply goes out from the receiving number, so the conversation stays in one thread.
- A reply containing a link may take longer to arrive, because messages with links are screened before they send.
- Replies are never sent to another Mobile Message number, which stops two accounts answering each other in a loop.
- Each rule sends at most 3 replies to the same number per hour, and 100 replies in total per hour. Anything past that is recorded in the logs as skipped.
- If the account has no credits left, the reply is recorded as failed rather than held and sent later.
Personalising the reply
Add Tags drops a tag into the reply, and each tag is swapped for that detail from the sender's contact record when the reply goes out.
{first_name},{last_name},{company}and{other}- Any custom fields you have named
People who text you are often not in your contacts yet. If we have no contact for the number, or the field is empty, the tag is replaced with nothing, so write the reply so it still reads well without a name in it.
Insert Opt Out Message adds {optout}, which becomes "Opt out: Reply Stop" in the sent message. It is worth including on marketing replies. It also adds characters, so check whether it pushes your reply into a second part and costs another credit.
How often the same person gets it
Send this reply to the same person at most decides how often one person can receive this rule's reply. Choose every message, once per hour, every 4 hours, every 12 hours, once per day or once per week.
- Every message suits a keyword rule, since someone texting your keyword is asking for the reply each time. This is the default on a keyword trigger.
- A limit suits an all inbound rule, where a customer sending three texts in a row would otherwise get three identical replies. New all inbound rules start at once per day.
Replies held back this way are recorded in the logs as skipped, with the reason.
Forward SMS
Forwards to between one and five Australian mobiles, sent from the number that received the message. The forwarded text reads From 61412345678: original message here.
- Each forward is an outgoing SMS and uses credits, so a message forwarded to three people costs three sends. Cost is the number of parts multiplied by the number of people you forward to.
- The
Fromprefix adds characters, so a long message can arrive as an extra part. - You cannot forward to another Mobile Message dedicated or shared number. This is for your own mobile or a staff mobile.
- The same hourly caps as auto replies apply.
Forward email
Separate multiple addresses with commas. Under Send to you choose who gets it.
- These addresses always sends to whatever you have typed in.
- The user who sent the original message, or these addresses if unknown sends to the person whose message this reply answers. When we cannot tell who sent the original, it falls back to the addresses you have typed in. Leave those blank and nothing is sent in that case, which the log will say.
The second option is the one your inbound SMS notification email uses.
Webhook
The payload is exactly the same as the inbound webhook payload in Setting up webhooks, so anything already reading that format keeps working.
- Webhooks are retried automatically if your server does not answer, and every attempt appears in Webhook Delivery Logs.
- If you have a signing secret set up, these posts are signed the same way as any other webhook. See Verifying webhook signatures.
- Your URL must use HTTPS and be publicly reachable.
Forward 3CX
The post goes to a 3CX webhook URL in the format 3CX expects, so replies land in the right chat thread in the 3CX client. See the 3CX SMS Integration Guide.
Add to list
Choose one of your contact lists.
- If the sender is not in your contacts yet, they are saved as a contact first, which is why this action can also capture their name and email.
- If they are already on the list, nothing changes.
- If the number is on your unsubscribe list, it is not added, and the log says why.
Save contact
Creates a contact for the sender if they do not already have one. You can set a first name, last name and company to use as defaults. If the contact already exists, only blank fields are filled in, so an automation never overwrites details you already hold.
Unsubscribe
Use this for words your customers actually send, such as END, CANCEL or REMOVE.
Resubscribe
A keyword like START or JOIN counts as fresh consent to message them again. Put this action first in a rule that also adds people to a list, otherwise the person is still on the unsubscribe list when the list action runs and will not be added.
Unsubscribe and resubscribe are only available on keyword rules, and a rule can have one or the other, not both. A rule that unsubscribes someone cannot also save them as a contact or add them to a list.
Capturing a name and email from the message
On the Save contact and Add to list actions you can tick Capture the sender's name from the message and Capture an email address from the message.
When the rule matches, the keyword is removed from the front of the message and what is left is read as details.
- An email address anywhere in the remainder is saved to the contact's Other field.
- The first word left over becomes the first name, and the rest becomes the last name.
- Details already on an existing contact are never overwritten.
Worked example. A rule with the keyword JOIN set to starts with, receiving JOIN Jane Smith jane@example.com, saves Jane as the first name, Smith as the last name and jane@example.com in the Other field.
On a keyword rule the keyword is removed first, so starts with rules work best and an exact match leaves nothing behind to read. On an every inbound rule the whole message is read as the name, which suits a dedicated number you only use for sign-ups, such as asking people to text their name to subscribe.
Opt-out keywords and STOP
Built-in opt-out handling runs before automations and always wins. A reply starting with stop, reply stop, unsubscribe, opt out or optout opts the sender out whatever rules you have, and nothing you can set will change that. See How unsubscribes work.
When a message is treated as an opt-out:
- The sender goes on your unsubscribe list.
- They are cleared from your contact lists.
- Anything scheduled to them is cancelled.
- Your usual unsubscribe notification is sent.
- Webhook and 3CX actions still run, so your systems hear about the opt-out.
- Other actions are skipped, and the log records that they were skipped.
Your own opt-out keywords sit alongside the built-in words. A keyword rule with an unsubscribe action does all of the above.
The exception is the rule whose own keyword caused the opt-out. It runs all of its actions, so you can text back a confirmation and forward it on at the same time.
Priority and running order
Every rule that matches runs, unless one is set to stop processing. Priority sets the order they run in, not which one wins, so a message that matches three rules fires all three. Use the arrows in the Priority column to move a rule up or down.
If two rules both post to a webhook, your server receives two posts. That is deliberate, so keep it in mind when building broad rules such as does not contain, which will match almost every message.
Stop processing
Stop processing is a tick box on each rule, under the trigger.
- When a rule with it turned on matches, that rule runs its actions and nothing after it runs.
- Rules further down the list are not even looked at. Rules above it are unaffected, because they have already run.
- Rules with it turned on show a Stops badge in the Trigger column, so you can see where the list is cut short.
- The dry run test spells it out too, listing the rules that were skipped and which rule stopped them.
- It applies to opt-out messages as well, so a rule set to stop will stop the ones below it whether the message was a normal reply or an opt-out.
This is how you handle your keywords one way and everything else another way. Put your keyword rules at the top with Stop processing turned on, and a catch-all all inbound rule at the bottom.
Worked example. A JOIN rule that adds the sender to a list, a BOOK rule that replies with your booking link, and below them an all inbound rule that forwards everything to your inbox. With Stop processing on the two keyword rules, someone texting JOIN is added to the list and nothing lands in your inbox, while someone texting anything else falls through to the catch-all and is forwarded.
Testing a rule before it goes live
Click Test on the Automations page to try a message against your rules. Type the message text, choose which of your numbers it arrived on, and the test shows you which rules match, which ones do not and why, and what each action would do.
- The test sends nothing and changes nothing. No SMS goes out, no webhook is posted and no contact is created.
- It runs against the current moment, so a rule with active hours is shown as not running when you test it outside those hours.
- It also tells you how the message would be classified, so you can confirm whether a word would be treated as an opt-out before a customer sends it.
Automation logs
View logs on the Automations page opens a record of everything your rules have done. Each row shows the time, the automation, the action, the number that sent the message, whether it succeeded, was skipped or failed, and a short detail line explaining the outcome.
This is the first place to look when a rule did not do what you expected.
- A skipped row usually means an hourly cap was reached or the message was an opt-out.
- A failed row gives the reason, such as a list that has since been deleted.
Logs are kept for 90 days.
Limits
- 25 automations per account
- 10 actions per automation
- Keywords of at least 2 characters
- Up to 5 recipients on Forward SMS and Forward email
Automations and the API
The inbound webhook URL under Settings > API is an automation. Setting it there creates an all inbound rule with a single webhook action, shown on the Automations page with an API webhook badge, and the two stay in step. The same applies to an inbound subscription created through the API or Zapier.
Rules themselves are managed in the app rather than through the API. See Setting up webhooks for the payload and the API field.
Your inbound notification email
The Inbound SMS Notification Email on your My Profile page in the app is an automation too. See Getting email alerts for replies and unsubscribes. It appears on the Automations page as a rule named Inbound notification email with a Notification email badge, and the two stay in step, so the profile field is a shortcut for the common case.
Open the rule to scope it to one number, put it on a keyword, add active hours, or run other actions alongside the email. Deleting the rule turns those emails off, the same as clearing the field on your profile.