Open Source SMS Marketing with Mautic – Twilio Integration

SMS, also known as text messages, are a common communications medium supported on every mobile phone, from the most inexpensive feature phone, to the latest flagship iPhone or Android device. In 2019, there were over 5 billion mobile subscribers around the world, and practically all of them have the capability to receive SMS messages. Even though over the top messaging apps such as WhatsApp or Telegram are getting more popular, there is no better way than conventional text messaging, to universally reach everybody with a cell phone number. Almost all carriers allow receiving texts for free, and the cost per text to the marketer is just 3/4 US cent outbound to any US phone number – if using the Twilio SMS gateway.

Mautic is a full-featured, open source marketing automation tool, which allows you to consolidate all of your contacts into a single application to coordinate your marketing activities, whether the channel is email, SMS, or website content. Unlike subscription-based marketing automation tools, there are no hard limits or pricing tiers that will cause your marketing costs to rise as soon as you exceed a certain threshold of contacts (if you choose to host Mautic yourself).

The Twilio integration is plugin bundled with Mautic which connects with Twilio, a pay-as-you-go service, that allows you to send SMS programatically to 221 countries (and counting) internationally. With the power of Mautic, you can go beyond sending SMS broadcasts indiscriminately to your contacts, to building campaigns that incorporate decision trees and targeting based on contact fields.

Sign up for a Twilio account. Using this link, you can get $15.50 in test credit (with no credit card required) and $10 in live credit when you upgrade your account:

Get a free trial Twilio number.

Obtain your Twilio Account SID and Auth Token.

In the Mautic dashboard, click the Gears icon on the top right-hand corner, and select Plugins. Click the Twilio plugin which appears in the gallery. If you do not see it, click Install/Upgrade Plugins.

Copy the Twilio Account SID and Auth Token into the Enabled/Auth tab of the modal window which pops up.

Switch to the Features tab and enter the Twilio phone number under Sending Phone Number, then click Save & Close.

Verify the phone number(s) you plan to use to receive SMS messages in trial mode.

Ensure the country or countries which you plan to send text messages to, are enabled in the Messaging Geographic Permissions.

In the Mautic dashboard, click the Gears icon on the top right-hand corner, and select Custom Fields. Create a custom field of data type Select, and give it a label such as SMS Consent. Under Options, click Add a value and specify the label and value, “Yes”. Set it as Published = Yes and Required = Yes in the right sidebar. Then click Save & Close.

Create a new Mautic form from the Components > Forms section of the left navigation bar. Name this form SMS Subscribe and change the Successful Submit Action to Remain at form. In the Redirect URL/Message, you can write a message that’s displayed to the user (in their browser) once they’ve opted-in, such as “Thanks for subscribing to our SMS updates!”

Switch to the Fields tab of the Mautic form editor and add the following. All form fields should be set to Required = Yes. When done customizing the form fields, set the form to Published = Yes and click Save & Close.

– a Text field with the label First Name, mapped to the contact field First Name
– a Phone field with the label Phone, mapped to the contact field Phone Number
– a Checkbox field with a hidden label SMS Consent, mapped to the custom field SMS Consent, with the following options:

Create a new Mautic text message from the Channels > Text Messages section of the left navigation bar. Give the text message an internal name of Welcome SMS and write the text message you wish to be sent to the recipient. You can use Mautic tokens such as {contactfield=firstname} to personalize the message based on each contact’s details. A single SMS message has a character limit of 160 characters. If you create a text message that is more than 160 characters, it will be split up into multiple texts when it is sent to the contact. Click Save & Close.

Create a new Mautic campaign from the Campaigns section of the left navigation bar. Hit the + New button, give the campaign a name such as SMS Subscription, then click Launch Campaign Builder.

In the campaign builder, you will build your campaign flow which involves adding a Contact Source (Campaign Form) and a Campaign Action (Send Text Message). Once you have completed your simple SMS campaign, the flow chart should look like this.

– the Contact Source should be mapped to the SMS Subscribe Mautic form created earlier, which means any contacts who fill in that form will automatically qualify for this campaign.

– the Action should be Send Text Message and the Welcome SMS Mautic text message created earlier should be selected from the drop-down.

Click Close Builder in the Campaign Builder once done, set the campaign to Published = Yes. Also, set Allow contacts to restart this campaign = Yes so users who have previously opted out can re-subscribe, and receive the welcome SMS again. Then, finally click Save & Close to save the overall campaign.

Now you’re ready to test your SMS campaign by opting-in your test phone number from the Mautic form. Log out of your Mautic dashboard (or use a browser window in Incognito/private browsing mode) and visit the URL where your Mautic form resides,, where is the base URL of your Mautic instance, and 1 is the form ID of the SMS Subscribe form you created.

You can find the form ID by navigating to Components > Forms in your Mautic dashboard.

Once the cron job to trigger the campaign runs on your Mautic server (which usually takes anywhere from 2 – 15 minutes), you should receive the welcome SMS message from your Twilio number, to the mobile number given in the form.

If you’ve got this far, you’ve successfully set up your first SMS campaign using the Twilio integration in Mautic. For further learning and experimentation, you can add additional Send Text Message campaign actions to create an engagement sequence to push promotions and website content to your marketing contacts.

Autoize and our partners, can help you get started with Mautic, set up the Twilio integration for Mautic, and customize targeted campaigns via text message. Contact us today.

Mautic, SMS Marketing, Twilio
Previous Post
How to Use Minio as a S3 to Cloud Storage Gateway
Next Post
Backup MX Configuration for Mailcow – Don’t Miss an Email


  • hello I have follow all the step as you show the link above ” ” . I able to create from on my website and that’s save all the contact to mautic. and my campaign also run but unfortunately i haven’t get any welcome sms from mautic. I used Twilio trial version for Malaysia number.

    • Please ensure that you have all the recommended cron jobs enabled on your Mautic server. We have not personally tried using Twilio with a Malaysian number – most of our clients market to the United States or Canada. If you have all cron jobs in place and nothing that indicates an issue in the Mautic error log, we would suggest trying to contact Twilio Support. You may need to first upgrade your account to have sending privileges in some international markets. If you require direct troubleshooting for your Mautic instance, please contact us about our paid support services.

Comments are closed.