Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

How to Send SMS Messages from Process Builder

Process Builder(link takes you to an external page) is a popular tool for building automated workflows in Salesforce. Twilio for Salesforce exposes two global Process Builder actions, Twilio Send SMS and Twilio Send to Studio, that you can use to send out automated SMS messages when certain conditions are met. Common uses of Process Builder include:

  • SMS notifications.
  • Appointment reminders.
  • Customer satisfaction surveys.

Process Builder actions

process-builder-actions page anchor

Twilio Send SMS Message allows you to send a text message from Process Builder. This Apex class is useful for single-message use-cases such as alerts and notifications.

Twilio Send to Studio allows you to initiate SMS and Voice chatbots using Twilio Studio(link takes you to an external page), Twilio's drag-and-drop visual editor. This Apex class is useful for initiating longer conversations that might require if...then branching.



How many licenses do I need if I'm using Process Builder?

The answer to this question depends on which users are running your automation flow. See "How many licenses do I need?" in the FAQ for more details.

Send SMS messages with Process Builder and Twilio for Salesforce

send-sms-messages-with-process-builder-and-twilio-for-salesforce page anchor

Ready to get started sending simple SMS alerts? Follow the instructions in the video below.

Send Autoresponder SMS messages with Process Builder and Twilio for Salesforce

send-autoresponder-sms-messages-with-process-builder-and-twilio-for-salesforce page anchor


This functionality is available from v4.92 onwards.

If you are trying to send an SMS as a reponse to an incoming message from a customer, you need to set it up in a slightly different manner to get around the Salesforce limitations.

For example, when a customer confirms an appointment by sending an SMS to your Twilio for Salesforce number, and you want to automatically respond with "Thank you! your appointment is confirmed", perform the following steps:

  1. Set up a process builder to trigger when a new Twilio Message record is created:

    Trigger - New Twilio Message Record.
  2. Set up the criteria to check if the message is an Incoming message. Use the Direction field on the Twilio Message Object, and check for Inbound as the corresponding value for the field:

    Twilio Incoming Message Check.
  3. Set up a schedule:

    Set up a Schedule.

    It may look like the autoresponder message will be sent after an hour, but that's not the case. If you follow this guide, your autoresponder messages will be sent within minutes of receiving the message from the customer.

  4. Configure the Message response. You can get the phone number from the Message record itself. Use the From field to get the number. And set up the message body, as per your business case:

    Configure the Message response.

Twilio Send SMS Message Parameters

twilio-send-sms-message-parameters page anchor
MessageThe body of the SMS message that you would like to send. This can be static, a field reference, or a formula (useful for templated messages). Note the message length determines the number of segments.
To Mobile NumberThe phone number you want to send the message to. This can be static, a field reference, or a formula.
From Mobile NumberThe phone number you want to send the message from. This can be static, a field reference, or a formula.

Send to Studio with Twilio for Salesforce

send-to-studio-with-twilio-for-salesforce page anchor

Interested in crafting interactive bot conversations with your users? Learn how you can launch SMS bots using Twilio Studio and the Salesforce Process Builder in this video:

To configure the Twilio Send to Studio Apex class, provide the following values:

From NumberThe phone number you want the Studio flow to be sent from. Currently we only support sending from a specific number, not a messaging service. This might mean your chat bot will contact a user from a new number.
Studio URLThe Rest API URL that will call your Studio flow. Example: To find your Studio flow API URL, click on the gear icon in the top-right corner of the flow's trigger.
To Mobile NumberThe number that the chat bot will send messages or make calls to.
Parameters(Optional) You can also include additional Salesforce data as context parameters in key/value pairs. This is useful if you want your chat bot to address the recipient by first name, or reference other information from Salesforce within your Studio flow under {{}}.

Rate this page: