Creating an SMS Notification

Last edit: Mar 20, 2020

This guide will help you create an SMS Notification to send a text message to a newly signed up user using our Twilio integration.


To follow the steps in this tutorial, you should understand the concept of notifications. You'll also use the sign-up form you created in a previous tutorial. As you'll use our Twilio integration, you need to ensure that the to number is formatted according to Twilio's phone number format guideline.


Creating an SMS Notification is a three-step process:

Step 1: Extend sign up form with mobile number

As you haven't collected the mobile phone number in the sign-up form yet, as a first step, extend the sign-up form forms/developer/sign_up.liquid:

      presence: true
      phone_number: true

<label for="mobile_number">Mobile number</label>

<input name="{{ }}"
  value="{{ form.fields.mobile_number.value }}"

{% if form.errors.mobile_number %}
  <p>{{ form.errors.mobile_number }}</p>
{% endif %}

On the production site, you have to take into consideration that users might not know their country code, or what a country code is. For simplicity in this example though, assume that the user provides correct input.

Step 2: Create SMS Notification

Create a notification file in notifications/sms_notifications/welcome_user.liquid:

to: '{{ form.mobile_number }}'
delay: 0
enabled: true
trigger_condition: true
Hello {{ form.first_name }} via sms.

Step 3: Add SMS Notification to sign up form

Add the SMS Notification you created to the sign-up form.

The SMS notification name is a path of the file relative to the sms_notifications directory, without extension.

For notifications/sms_notifications/welcome_user.liquid - the bolded part is the name (physical_file_path).

  - welcome_user


We do not send real text messages on staging by default. Because any error with sending real text messages on staging might be more costly than sending emails. If you want to test SMS on staging, please change enable_sms_and_api_workflow_alerts_on_staging flag to true in your Partner Portal instance configuration.

Next steps

Congratulations! You have created an SMS Notification. Now you can learn about creating an API Call Notification.


We are always happy to help with any questions you may have.