Socially Versed

guide

How to Set Up Twilio Auto-Replies for Text Messages and Calls

A step-by-step guide to configuring a Twilio number to automatically reply to texts with your office number and play a call announcement, covering Harvest and GoHighLevel integration considerations, opt-out handling, testing, costs, and how to undo the setup.

S
Socially Versed
Oct 23, 202612 min readUpdated Nov 22, 2026
How to Set Up Twilio Auto-Replies for Text Messages and Calls

You can configure a Twilio phone number to automatically reply when someone texts it and play a message when someone calls. For example, texts can receive "Please call our office," while callers hear the office number before the call disconnects.

For a simple, always-on response, Twilio's hosted TwiML Bins are a practical option. TwiML is a small set of XML instructions that tells Twilio what to do. You do not need to operate a separate web server for this setup.

This guide covers ordinary SMS and inbound voice calls. It does not set up WhatsApp, a missed-call text-back, or a complete voicemail inbox.

First, Decide Whether Twilio or Harvest/GHL Should Handle the Number

If your number is connected to Harvest, a GoHighLevel subaccount, confirm who manages its phone service before changing Twilio settings.

HighLevel depends on incoming-message and voice webhooks to receive and process Twilio events. Replacing those handlers with your own TwiML Bins can bypass HighLevel for the affected channel. Incoming messages may stop appearing in Conversations, and existing call handling or workflows may stop running. Changing SMS routing and changing voice routing are separate operations.

If you manage the number directly in your own Twilio account, follow the TwiML Bin steps below.

If Harvest manages the number or the underlying Twilio account, ask Harvest to configure it or provide the necessary account access.

If you want to keep GHL conversations, workflows, and call handling, implement the response inside Harvest/GHL rather than replacing its incoming handlers.

If you want Twilio to take over only SMS or only calls, change only that channel after confirming the effect on the existing integration.

Do not assume your number is accessible in a personal Twilio account just because the platform uses Twilio infrastructure. Ask Harvest whether it uses agency-managed Twilio or LeadConnector Phone for your subaccount. GoHighLevel's Help Center covers its Twilio webhook configuration in detail.

Before proceeding: save the current voice and messaging handler types, URLs, request methods, selected applications or flows, and any Messaging Service integration settings you will change. These are your rollback settings. Do not change shared service routing without checking which other numbers it affects.

What You Need

Access to the Twilio account or subaccount that actually owns the number.

A number with SMS capability for texts and Voice capability for calls.

Your business name and correct office phone number.

A mobile phone on another number for testing.

An account that can send production messages and receive calls.

For U.S. texting, an automatic reply is still an outbound application-generated message. U.S.-bound messages from a Twilio local 10-digit number require the applicable approved A2P 10DLC registration; an incoming customer text does not remove this requirement. Toll-free messaging requires verification, and unverified or pending toll-free numbers are blocked from sending to the U.S. and Canada.

Trial accounts have restrictions; for example, SMS replies can be limited to verified recipient numbers. Do not interpret a trial test as proof that production messages will deliver to everyone.

Create the Text Auto-Reply

Step A: Open TwiML Bins

Sign in to the Twilio Console.

Select the account or subaccount that owns the number.

Find TwiML Bins under Developer tools, or use the Console search.

Click Create a new TwiML Bin or the plus button.

Give it a friendly name, such as Office SMS Auto Reply.

Console layouts can vary. Use the feature names in this guide if your navigation looks different. Twilio documents TwiML Bins as a hosted way to return instructions for incoming messages and calls.

Step B: Paste this response

Replace the editor contents with:

<?xml version="1.0" encoding="UTF-8"?> <Response> <Message>Thanks for contacting BUSINESS NAME. This number is not monitored. Please call our office at OFFICE PHONE. Reply STOP to opt out.</Message> </Response>

Replace BUSINESS NAME and OFFICE PHONE with your actual information. Keep the XML tags intact.

The message goes back to the person who texted you. Without explicit to and from attributes, Twilio uses the incoming sender as the reply recipient and the receiving Twilio number as the reply sender. This example uses the default US1 region; Twilio documents that the messaging Message verb is not supported in IE1 or AU1.

Use & for an ampersand inside XML text. For example, write Smith & Sons. TwiML tag capitalization matters.

Save or create the Bin, resolve any validation errors, and copy its URL if you plan to use the Webhook option.

Step C: Attach it to the number

Open your phone-number management page. Depending on the Console version, look for Phone Numbers, then Manage, then Active Numbers, or Numbers and senders.

Select the intended Twilio number.

Open its configuration and find Messaging.

At A message comes in, select TwiML Bin or TwiML, then select Office SMS Auto Reply.

Save the number's configuration.

If that dropdown does not offer a Bin selector, choose Webhook, paste the Bin URL, choose HTTP POST, and save. The inbound handler must return messaging TwiML; a delivery-status callback is not the setting for an auto-reply.

Step D: Check for a Messaging Service override

If the number belongs to a Messaging Service, inspect that service's Integration or incoming-message settings.

Defer to sender's webhook uses the incoming handler configured on the individual number.

A service-level incoming webhook can handle the message instead.

Some configurations create a Conversation rather than using the individual number's handler.

For this number-level setup, use Defer to sender's webhook only after confirming that the change is appropriate for the whole service. Keep the number in the registered sender pool when required for your messaging registration; removing it is not the solution to a routing override.

Step E: Preserve opt-out handling

Keep Twilio's opt-out protections in place. An office redirection should not override STOP, START, or HELP handling.

If your Messaging Service has Advanced Opt-Out enabled and passes OptOutType to your handler, Twilio has already sent the keyword response. Do not send another reply for that request.

In that configuration, use this Bin template in place of the plain XML above:

<?xml version="1.0" encoding="UTF-8"?> <Response> {{^OptOutType}} <Message>Thanks for contacting BUSINESS NAME. This number is not monitored. Please call our office at OFFICE PHONE. Reply STOP to opt out.</Message> {{/OptOutType}} </Response>

This uses TwiML Bin Mustache templating: the Message section is included when OptOutType is absent or empty. Twilio documents both request-parameter templating and the Advanced Opt-Out parameter. Validate and test the template in your actual routing configuration.

Behavior to understand: for ordinary incoming texts that reach this handler, the static response runs each time. It does not remember that someone already received the message. If you want one reply per customer per day, you need stored state and additional logic, such as a CRM workflow or a Function with a database. Do not use an in-memory variable as durable cooldown storage.

Create a Call Announcement That Directs Callers to the Office

Step A: Create a second TwiML Bin

Name it Office Call Announcement, and paste:

<?xml version="1.0" encoding="UTF-8"?> <Response> <Say language="en-US"> Thank you for calling BUSINESS NAME. This number is not monitored. Please call our office at 3 1 7, 5 5 5, 0 1 2 3. Again, that number is 3 1 7, 5 5 5, 0 1 2 3. Thank you. </Say> <Hangup/> </Response>

Replace the sample digits with your real office number. Spacing the digits can make them easier to understand, but listen to an actual test call and adjust the punctuation or use a recording if needed.

The Say verb reads the text aloud. The Hangup verb ends the call after the announcement.

Step B: Attach the voice Bin

Open the same phone number's configuration.

Find Voice or Voice and Fax.

For ordinary programmable voice routing, use the Webhooks/TwiML configuration if the Console asks for a configuration type.

At A call comes in, choose TwiML Bin or TwiML.

Select Office Call Announcement.

Save and call the number from another phone.

Alternatively, select Webhook, paste this voice Bin's URL, choose HTTP POST, and save. Do not accidentally use the SMS Bin URL for voice calls. Twilio documents assigning a Bin through the incoming-call dropdown and using its URL as a webhook.

This setup answers the call, plays the announcement, and disconnects. It does not ring your office, transfer the caller, or let them leave a message.

Optional: Play Your Own Recorded Greeting

To use your voice, record a clear MP3 or WAV and host it at a stable HTTPS URL that Twilio can fetch without an interactive login. Replace the voice Bin with:

<?xml version="1.0" encoding="UTF-8"?> <Response> <Play>https://YOUR-DOMAIN.example/audio/office-greeting.mp3</Play> <Hangup/> </Response>

Replace the example URL with the real audio-file URL. A webpage containing an audio player or a sharing page is not necessarily a direct audio URL. Check that the host returns the file with a supported audio content type. Twilio's Play verb retrieves and plays the media.

If the URL has query parameters containing ampersands, encode them as & inside the XML.

Announcement Versus Voicemail

A message that says "Please call our office" is an announcement. A voicemail system also records the caller's response.

Twilio can collect voicemail using the Record verb, but a usable setup also needs post-recording behavior, a way for staff to retrieve recordings, and any desired notifications or retention settings. A Twilio recording does not automatically become a Harvest/GHL voicemail. For your goal of simplifying communication, the announcement-and-hangup option avoids creating another inbox.

If you want callers automatically connected to the office instead, that is call forwarding and needs a different voice flow.

Test Before Relying on It

Text from another mobile number: expect one office-direction reply for that ordinary incoming message.

Text again: another reply; the basic Bin has no cooldown.

Test from a second sender: the reply also works for that sender, subject to account and carrier restrictions.

Call the number: the correct business name and office number, followed by disconnect.

Listen to every digit: the office number is clear and accurate.

Test STOP, then START on your own test phone: opt-out and opt-in behavior is preserved, with no extra office reply to an Advanced Opt-Out event.

Inspect Harvest/GHL if integration matters: confirm which events still reach it and that no second automation sends a duplicate reply.

Review Twilio logs: check incoming events, outgoing replies, delivery status, and any errors.

Send an actual SMS rather than an iMessage-only exchange. Tests incur normal applicable usage charges.

Troubleshooting

Text arrives but no auto-reply: check the correct account and number, SMS capability, saved incoming handler, Messaging Service override, and XML validation.

Reply exists in logs but is failed or undelivered: open its error details. Check registration, toll-free verification, opt-out status, trial limitations, account balance, and destination permissions.

Caller hears an application error: check the correct voice Bin URL, valid XML, and any audio URL or content-type errors.

Caller still reaches an old greeting: voice routing may still point to the previous app, flow, or webhook. Confirm the saved setting on the correct number.

Texts no longer appear in GHL: your new incoming-message handler may have replaced HighLevel's webhook. Restore the original routing or move the auto-reply into GHL.

Customers receive duplicate replies: inspect all active paths, including GHL workflows, AI replies, Studio flows, and webhook integrations. Also check keyword responses.

Reply repeats after every customer message: expected for the static Bin. Add a cooldown using a system with durable state.

Saved settings unexpectedly revert: ask the managing provider whether its provisioning or synchronization is resetting the routing.

For SMS, open Monitor, then Logs, then Messaging and inspect the incoming message and separate outgoing reply. For calls, review the call logs and associated errors or request details, and see Twilio's voice troubleshooting guide. A sent status is not the same as confirmed delivery.

Costs and Upkeep

This setup does not eliminate Twilio charges. Budget for number rental, applicable incoming and outgoing messaging charges, carrier fees, inbound voice usage, and any registration or verification fees. Recording and storage can add costs if you build voicemail.

SMS pricing depends on destination and message segments. Long messages or Unicode characters can increase segment counts; keep the response concise and check the final text. Use current Twilio pricing rather than assuming a flat fee.

Identify your business and keep the reply relevant to the incoming inquiry. An inbound message should not be treated as blanket permission to send future promotional campaigns. Follow Twilio's Messaging Policy and your registered use case.

Review the office number whenever it changes. Keep the Twilio number active if people still use it; releasing the number ends your control over this response.

How to Undo the Setup

Restore the handler types, URLs, methods, selected apps or flows, and service settings you recorded before making changes. Save and test both channels again. If Harvest manages the integration, have its support team restore the correct routing.

Deleting a Bin alone does not restore the prior integration.

Copy-and-Send Request for Harvest Support

Please confirm whether my subaccount uses agency-managed Twilio or LeadConnector Phone. I want incoming texts to this number to receive an automatic reply directing customers to our office, and incoming calls to hear an announcement with that office number before disconnecting. Please preserve our existing GHL integration where possible, retain opt-out handling, and prevent duplicate auto-replies. We do not need voicemail recording or automatic call forwarding.

Official Documentation

Twilio: Get Started with TwiML Bins

Twilio: TwiML Bins overview

Twilio: A2P 10DLC registration

Twilio: Messaging Services

Twilio: Message verb for messaging TwiML

Twilio: Say verb

Twilio: Hangup verb

Twilio: Play verb

Twilio: Record verb

Twilio: Voice troubleshooting

Twilio: Messaging Policy

Twilio: Studio auto-responder tutorial

HighLevel Help Center

Socially Versed helps service businesses set up customer communication systems like this every day. Learn more about what Socially Versed offers, or explore our website design and digital services.

Published by

SV

Socially Versed

Socially Versed covers local businesses, creators and community across Indiana. Discover trusted pros, events and stories that matter.

Share this article

Get more local spotlights like this

Join the Insider Club for new businesses, events & promotions — delivered free.

Related Stories

We value your privacy

We use cookies for essential functionality, plus analytics and advertising to improve your experience. You can accept all, or reject non-essential tracking. See our Cookie Policy.