July 28, 2021
HOW TO: REDCap + Twilio Module
What is REDCap+Twilio Module?
• Twilio is a third party web service that has been integrated into REDCap to send survey invites/messages to participants via text.
• All the participant data is stored in REDCap (names, emails, phone numbers). Twilio is used to send the text + survey link.
• When the respondent touches the link, their browser opens on their smart phone and they complete the survey in the secure website or read any messaging you provide.
• The message text is defined by the study team and must be reviewed and approved by the IRB. PHI/PII is typically not approved or allowed in the text of the text message.
Before Getting Started:
- ALL text content MUST be IRB approved before use with study subjects.
- Study subject must provide consent either in writing or verbally to communicate via text message.
- Subject approval must be documented in the study file.
- The detailed plan for text message communication must be clearly described in the protocol summary.
Privacy and Security Policy: Obtaining Consent to Text Patients and Research Subjects
Contact email@example.com for more information.
HOW TO Get Started:
1. Set up a Twilio Account
- Go to Twilio.com and create an account (Note: Twilio trial accounts should not be used. EDC Support cannot enable such accounts in REDCap projects).
- Set up a payment method, such as a credit card or PayPal
- Purchase a phone number; numbers are $1/month
- You can select between local or toll-free numbers
- For information on the cost of each call or each SMS message, visit your Twilio account to view the rates. The approximate cost is $0.008 per call
- Turn off the Request Inspector feature
- This feature stores data on Twilio’s servers and is not HIPAA compliant. Twilio cannot be enabled in a REDCap project if this feature has not been previously disabled.
- You can find it via this path:
- Dashboard->Programmable Voice->Settings
2. Request REDCap + Twilio Module
Send EDC Support (firstname.lastname@example.org) an email requesting that Twilio be enabled in your REDCap project. The following information must be provided:
- Account SID and Authorization token (found on the Account Settings page)
- Twilio Phone Number (found on the Dashboard page)
- Name or PID of the REDCap project you would like Twilio enabled in.
3. Configure Twilio in your REDCap project
After Twilio has been enabled, a new box will display on the Project Setup page
Configure Twilio settings:
- Choose a language and a voice (male/female)
- There are three survey invitation types to choose from:
1.Survey as webpage – Similar to sending out a REDCap survey invitation via email, the survey URL will be provided by SMS instead.
2.Survey as voice call
3.Survey as SMS conversation - (This option NOT valid for IRB-led research projects). Only REDCap administrators are allowed to enable the Twilio option to initiate a survey as an SMS conversation. Much like email, SMS is not considered a secure form of communication, so you may not want to administer surveys as SMS conversations if the participant will be submitting identifying information (PHI or PII) unless you have been granted special permission from the participant to do so. Given such sensitive privacy issues, only EDC Support can enable this feature.
Once the method for sending invitations is set:
- Append survey instructions for voice calls, if necessary
- Select default invitation type throughout your project
- (Optional) Designate a phone number field (Similar to designating an email field that gets automatically piped to the Participant List.
- Decide how to handle overlapping SMS invitations
Send out survey invitations via Twilio
Public Survey URL
- Participant List and/or Automated Survey Invitations
- Can enter a phone number and/or email address
- Select the participant’s preference when adding them to the Participant List
- You then have the option of sending out the invitations through the Participant List via email, SMS, or the participant’s preference.
- It is Mass General Brigham Policy that the research study create language in the text message invite allowing for an opt-out method for participants from receiving further text messages.
- This can be accomplished by the participant responding to the SMS survey invite with the word "Stop" or any of the words defined in the Twilio > Features > Advanced Opt-Out for your project:
- All future text invites are halted from reaching the participants device.
- REDCap's automated survey invites will still attempt to send until the participant's number is removed from the project. The REDCap Survey Invitation Log will only indicate errors and not that the Participant actually opted out. A feature enhancement is coming soon to indicate PARTICIPANT OPTED OUT in v9.9.2
- You can find the list of participants who opted out in the Twilio Message Logs > download as a csv file. Twilio only keeps STOP and START action data.
- COMPATIBILITY: Most of REDCap's survey features still function much the same when taking a survey via SMS or as a voice call. This includes the enforcement of required fields, field validation, branching logic, using the Survey Queue for multiple surveys (only works with Auto-Start enabled), survey email notifications and confirmations, the Participant List, Automated Survey Invitations, survey Stop Actions, and computer adaptive tests (CATs) downloaded from the REDCap Shared Library. One of the few survey features that is not compatible is the Survey Login feature.
- COST: In order to use the Twilio SMS and Voice Call services in a REDCap project, you will have to connect your project to your Twilio account by entering your Twilio credentials into REDCap during the setup process. And as REDCap makes calls and/or sends SMS messages using this service, all charges to your Twilio account will be made based upon its usage. This is not done by REDCap but is done internally by Twilio as you use its services. In this way, no monetary transactions are made by REDCap, and thus it is your responsibility to maintain the funds in your Twilio account in order to ensure that the service continues to work for your REDCap project. If your Twilio account runs out of funds, the Twilio services in REDCap will cease to function. For information on the cost of each call or each SMS message, visit your Twilio account to view the rates.
- PRIVACY & SECURITY INFO: It is important to understand that this feature utilizes the third-party service Twilio.com, which means that all voice calls and SMS messages will be routed through Twilio's servers. However, REDCap goes to great length to ensure that voice call records and SMS transcriptions do not stay in Twilio's logs but are removed shortly after being completed. This is done for security and privacy concerns (e.g., HIPAA), in which your survey participants' phone numbers and their survey responses do not get permanently logged on Twilio's servers but instead remain securely in REDCap.
To learn more about using Twilio SMS and voice call services in REDCap, please email email@example.com.