# Receive SMS notifications

This how-to covers how to make use of the SMS Action Type to receive text message notifications when someone interacts with one of your apps.

# Create the action

Follow the steps below to create an action for sending SMS notifications.

# Step 1: Choose a workspace

Start by making sure you're in the desired workspace. Hover over the menu bar dropdown to choose.

An expanded dropdown containing a list of available workspaces in the Routegy admin app

# Step 2: Open the new action dialog

Select the Actions tab within the workspace view and click the + New Action button. This will launch a modal for creating new actions.

Highlighting the actions tab and 'New action' button within the Routegy admin app

# Step 3: Select the SMS action type

From the action creation model, select SMS from the Action type dropdown list.

An expanded dropdown containing a list of available action types with 'SMS' highlighted in the Routegy admin app

# Step 4: Configure the action

Enter a name, description (optional) and desired phone number. You can also customize a text Message format by providing your own Jinja2 template (opens new window) that follows the Routegy templating guide. Phone Number can be set to a static value (e.g. 555-555-5555) or to any variable available in the templating context. For instance, if your app pattern includes an element named phone_number nested in a fieldset named contact_info, you can just enter contact_info.phone_number, and Routegy will send a text message to a phone number collected by your app from a user.

TIP

If you don't provide a country code, it will default to 1. See wikipedia (opens new window) for more details.

Once the action is configured, click on + Create action to complete the process.

The completed SMS action in the 'New action' dialog with the 'Create action' button highlighted in the Routegy admin app

# Attach the action to an app

Follow the steps below to attach the SMS action created above to one or more apps.

# Step 1: Choose an app

Select the Apps tab within the workspace view and select the app you wish to send SMS notifications.

Highlighting the Apps tab and selection of a 'Coffee machine' app within the Routegy admin app

# Step 2: Open the app editor

From the app model, click on the Edit button.

A 'Coffee machine' app in the app editor with the Edit button highlighted in the Routegy admin app

# Step 3: Add your new action

From the app edit model, type in the name of your SMS action in Actions list. The name will autocomplete as you type.

The SMS action being added to a 'Coffee machine' app using the app editor in the Routegy admin app

# Step 4: Save your changes

Click on the Save changes button and you're done!

Highlighting the 'Save changes' button in the app editor in the Routegy admin app

# Step 5: Wait for app interactions

Now that your app is configured, you just wait until someone interacts with it. Once they do, you'll receive an SMS that looks something like this.

An SMS created by an interaction with a Routegy app named 'Coffee machine' using the SMS action and associated template defined earlier in this tutorial