Twilio
Let your agent answer text messages (SMS, MMS, and RCS) sent to your Twilio phone numbers.
Connect your Twilio account, and your agent answers text messages sent to your business phone numbers. Customers text you from any phone, no app needed, and get a reply in seconds.
Where to find it: open your agent and go to Channels → Twilio.
Twilio is a service that gives businesses phone numbers for sending and receiving text messages. If you don't have a Twilio account with a phone number yet, set that up at Twilio first.
What customers see
Customers send a text message to your number, as they would to a person. The agent replies by text from the same number. Each answer arrives as one complete message after the agent has finished writing it.
The agent answers messages that customers send. It doesn't start conversations, send marketing texts, or answer phone calls.
How it works
Twilio needs two things: your account details in Hourzero, and a small setting in Twilio that sends incoming texts to Hourzero.
- 1ConnectPaste your Twilio account details into Hourzero.
- 2Point TwilioTell Twilio to send incoming texts to Hourzero.
- 3Choose the agentPick which numbers this agent answers.
- 4PublishTurn on replies for Twilio.
- 5TestText your number and check the reply.
Before you start
- You're a workspace owner or admin in Hourzero. Other members can't see the setup buttons.
- You have a Twilio account with at least one phone number that can send and receive messages, a short code, or a Messaging Service.
- You can sign in to the Twilio Console. You'll copy two values from it and change one setting on your numbers.
Twilio charges too
Agent replies use your Hourzero credits. Twilio also bills your Twilio account for every text message sent and received, at Twilio's prices.
Connect your Twilio account
- In the Twilio Console, find your Account SID and Auth Token. They're in your account info on the Console's home page. The Account SID starts with
AC. - In Hourzero, go to Channels and find the Twilio row.
- Select Connect Twilio. If an account is already connected, the button says Add account instead. The Connect a Twilio account dialog opens.
- Paste your Account SID and Auth Token.
- Select Connect account. Hourzero checks the details and finds your phone numbers, short codes, and Messaging Services.
- A message confirms "Twilio account connected". Your account appears under the Twilio row, with a line like "2 of 2 numbers or services selected for this agent".
Hourzero stores your Auth Token encrypted. Treat it like a password, and don't paste it into your agent's instructions.
Send incoming texts to Hourzero
Twilio needs to know where to deliver the texts your customers send. You set this once for each number or Messaging Service the agent should answer.
-
In the Twilio Console, open the settings of your phone number (or Messaging Service).
-
Find the setting for what happens when a message comes in, and choose a webhook.
-
Paste this address:
https://hourzero.dev/api/webhooks/twilio -
Choose HTTP POST and save.
A webhook here is an address Twilio calls each time a text arrives, so Hourzero can read it and reply.
Important
Without this setting, Twilio never passes texts to Hourzero and the agent can't answer, even when everything in Hourzero looks ready.
Choose which numbers the agent answers
When you connect from an agent's Channels page, Hourzero assigns every new number and Messaging Service to that agent, unless another agent already answers it. Each number has exactly one agent, so you can give different numbers to different agents.
To check or change it:
- Under your Twilio account, select Reply settings.
- Each number, short code, and Messaging Service is listed with what it can do, like SMS · MMS. Turn on the switch for each one this agent should answer, and turn off the others.
- Select Save choices. A message confirms: "Choices saved. Publish Twilio to apply them."
Numbers that belong to another agent say Assigned to that agent and can't be switched here. To move one, turn its switch off in the other agent's Reply settings first, and publish Twilio on both agents.
Customers who are already texting stay with the agent that started their conversation, even if you move the number later.
Tip
Bought a new number in Twilio? Select Refresh next to your account, paste your Auth Token again, and select Connect account. The new number then shows up in Reply settings.
Publish Twilio
- In the Twilio row, select Edit agent. The Playground opens with Twilio selected.
- On the Overview tab, make sure Agent replies says Replies on after publishing. Select Save draft if you changed anything.
- Select Publish → Twilio. The Publish Twilio dialog shows whether the draft is saved and the connection is ready.
- Select Publish saved draft. The next time, the button says Publish latest draft.
A message confirms "Twilio published". The agent now answers new texts to your selected numbers.
Important
Connecting doesn't start replies, and neither do later changes. New instructions, a different model, or new number choices only reach customers after you publish Twilio again.
Test it for real
- From your own mobile phone, text one of your selected numbers, for example "Hi, where is my order 48213?".
- Check that you get a text back from the agent.
- In Hourzero, open Activity → Conversations and select Visitors. The chat appears with the Twilio label.
Tip
Text messages work best short. In the Playground, you can give Twilio its own instructions, like "Answer in one or two sentences and skip formatting."
Stop or disconnect
To pause the agent but keep Twilio connected, open the Playground for Twilio, turn off Agent replies on the Overview tab, save, and publish.
To remove the Twilio account from Hourzero:
- In Channels, select the trash icon next to your account.
- Read the warning and select Disconnect.
All agents stop replying through that account. Your past conversations stay saved in Hourzero.
Disconnecting doesn't change anything in Twilio. Your numbers still send texts to the Hourzero address, and your Auth Token stays valid. Update both in the Twilio Console if you no longer want to use them with Hourzero.
Troubleshooting
The Connect account button stays greyed out
Check the Account SID: it must start with AC followed by 32 letters and numbers. Also paste the Auth Token, which is a separate value.
"No numbers or services found"
Your Twilio account has no number that can send messages yet. Add a phone number that supports messaging, or a Messaging Service, in Twilio. Then select Refresh and connect again.
Texts arrive in Twilio but the agent doesn't reply
- Is the incoming message webhook set to the Hourzero address, with HTTP POST?
- Is the number switched on for this agent in Reply settings?
- Did you publish Twilio after connecting or changing anything?
- Does your workspace have credits left? Check the Usage page.
The button says "Twilio is not available yet"
Twilio isn't ready to connect in Hourzero yet. Contact your workspace administrator.