Build SMS Notifications, Surveys, and Outreach with Twilio and TextIt
Time to read: 6 minutes
Digital communications are key to improving program outcomes. Health workers improve birth registrations by using IVRs (Voice Surveys). Academic advisors strengthen their connection to students using SMS. Nudge campaigns improve patient outcomes in healthcare. Program officers deployed to war zones implement Needs Assessment surveys. And, across the board, teams implement digital Complaints & Feedback Mechanisms (CFM) to improve their processes.
Twilio offers the building blocks to create reliable and resilient communications over SMS, voice, and WhatsApp. And at Twilio.org, we see program teams working hard to serve their communities, often with very limited resources – and we’re excited to share our DIY solutions we learn from teams like yours.
In this post, we’ll explain how you can use TextIt’s campaign management software and Twilio Programmable SMS to set up a communication platform to instantly engage with people in 2-way communication.
Today’s solution: TextIt and Twilio SMS for Digital Engagement
Today, we will show you an example of setting up a healthy pregnancy text program. We will first send expectant mothers a broadcast message to enroll them in a prenatal program, and then send them periodic reminders to ensure healthy pregnancy (similar to a drip campaign).
We’ll show you how to register accounts with TextIt and Twilio, procure the phone numbers you’ll need, and contact your list. We’ll also run through how to time your messages, and test your flow.
Let’s dive in!
Prerequisites
- A Twilio Account - Signup here. You get some credits to start testing on a trial account, you will not need to put any payment method.
- Make a note of your Account SID and Auth Token, we will need it later.
- A 2-way SMS Twilio Number - Instructions on how to purchase a number can be found here.
- If you are not in the US, go to the SMS Geo Permission page and enable SMS for your country.
- A TextIt Account. Signup for a free account here.
Step by Step
Obtain opt-in / consent from participants
Before you create your messaging campaign, you must obtain participants' opt-in permission (user consent). The regulations for consent protect the consumer's right to privacy and differ by geography.
Upload a participant list
- Download this sample contacts file (
expectant_mothers.csv
) file with names, phone numbers, and subscriber attributes we want to track: Expectant Mother CSV for TextIt Integration
(In our case, due dates.) Please update the two rows with your data.
If you add new columns, special attributes apart from Name and Phone number need to be prefixed withField
: e.g.,Field:DueDate
- Update the downloaded file with two contacts to test your survey. These numbers will get real messages, so please make sure you have access to them and test with them before you deploy your solution broadly.
- In TextIt, Navigate to contacts
- On the Import Contacts screen, click Choose File and pick the clinic_signup.csv that you downloaded in the previous step
- Preview the contacts – by default the group is called Expectant Mothers
- The contacts are now created and you can message them, send them a survey, or open a helpline where they can reach you. For that we will create a survey (
Flow
) next.
Create 2-way Registration Flow
TextIt has a straightforward Drag and Drop UI and the registration flow can be completed in minutes. For the sake of brevity, we are sharing a starter flow we created that you can import and expand for your own purposes.
Navigate to Flows to import the registration flow. The flow will send a message to all the contacts, validate the DueDate
, and enroll them in the program.
Save this Registration Flow (registration_flow.json) file on your machine: Expectant Mother Registration Flow for TextIt
Click on the Flows -> Import button on the top right. When asked for a file, use the registration_flow.json file you saved.
Once you upload the flow, you will be directed to Add a communication channel. We will connect to Twilio next.
Connect your Flow to Twilio SMS
- Get your Twilio
Account SID
and TwilioAuth Token
by going to your Twilio Console. It should be on the landing page, see the image below:
- Ensure that you have completed the prerequisite step of buying a 2-way SMS Twilio number
- In your TextIt Account, you should already be on the Project Workspace. If not, click here and click Add Channel
- Pick the Twilio card from the options
- Enter the
Account SID
andAuth Token
you saved earlier. Then, go to Next and pick the number
- When you click Save, you will see that the number you bought from Twilio already shows up
Test your Flow
- In TextIt, Navigate to the Flows; you will see the “Expectant Mothers Registration” Flow
- Open the Flow and review. We are confirming the subscription and the Due Date. Not all the paths (
No
andOther
responses) are filled; you can practice later by completing the Flow.
- Pick our ‘Expectant Mothers Group’ for testing. You will see that you have received the message.
- You can also click the Green icon on the right to test the flow in the TextIt simulator
Schedule reminders for campaign
Now that we have a registration flow, we can create periodic reminders and messages that go out to registered participants. For our purposes, we will share week-by-week updates about pregnancy milestones along with tips for a healthy pregnancy.
We will show you how to set up the Week 14 reminder in this section. You can practice by creating other weekly reminders after.
- Inside TextIt, navigate to Campaigns from the top menu. Click on Create Campaign. Enter a name for your Campaign (e.g., Pregnancy Reminders), then select the group to send the reminders (Expectant Mothers)
- On the Pregnancy Reminders Click New Event
- Next, we will set up some scheduled reminders to remind the expectant mothers about nutrition, and other assorted tips.
Add a message similar to the following:
Week 14! Officially the second trimester! Around this time, moms-to-be think about telling friends & family the great news. @contact.name, how did you tell people?
It's far away, but there's a lot to cover before the baby arrives. Let's start with 2 tips for your carseat: 1) Install the base in the car so you can pop the carseat in & out. 2) Get a car seat that snaps into a stroller. It's so much easier. Want a specific recommendation? Reply CARSEAT
For the schedule, you can use the time relative to DueDate
. Week 14 is 189 days before the DueDate
.
Testing and Troubleshooting Tips
For testing the flows, TextIt has a Flow Simulator that you can use when creating Flows. For testing reminders or campaigns, you can test by changing the Due Date
with Last Seen On
, and then change them back. This way you will get the reminders immediately instead of waiting a few weeks
Pricing
Twilio Pricing: Twilio has flexible pay-as you go pricing so you don’t have to sign any contracts. You can look up the price of each SMS by going to the pricing page and picking the country.
If you are a Social Impact organization you are eligible for product credit and exclusive discounts on Twilio – Apply here.
TextIt is free to start, and after that the pricing is based on the number of contacts you reach. TextIt also offers discounts for various causes. If you need procurement help, both TextIt and Twilio have LTA (Long Term Agreements) with many global NGOs.
Conclusion
As you can see, you can quickly add SMS campaigns to your program!
With TextIt, you don't need to limit yourself to just sending reminders. Instead of a single message, you can also schedule flows for your contacts to collect more data on how they are doing.
You don’t need to stop with SMS, you can also integrate Twilio WhatsApp or create powerful IVRs using Twilio’s Voice channel to maximize reach and impact. We have seen organizations use TextIt in very creative ways – everything from Needs Assessments, Complaints and Feedback Mechanisms, and Post Distribution Monitoring solutions to name just a few.
If you’re looking to enhance your TextIt integration, you can expand your program with Twilio’s channels. For example, add WhatsApp if you work in geographies like LATAM and India where WhatsApp is the prominent messaging channel. Or, create IVRs by adding Twilio Voice enabled numbers, which will help you reach part of the population that is not literate. We hope this was useful and we cannot wait to see what you build!
Gunjan Gupta is the Principal Solutions Engineer at Twilio.org. Gunjan works with Social Impact organizations of all sizes to find solutions to challenging communication problems. She is committed to providing accessible solutions to the Program Management teams working on the ground. She can be reached at gugupta [at] twilio.com.
Eric Newcomer is a Co-Founder and one of the principal engineers behind TextIt. He and his team created TextIt to make it easier for organizations to quickly deploy powerful interactive messaging applications anywhere in the world without the need of a software company. TextIt support can be reached at support [at]textit.com.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.