- Add and configure the Send an SMS task
- Configure your SMS account
- Add phone numbers
- Manually create an SMS body template
Add and configure the Send an SMS task
Add and configure the Send an SMS task by performing the following steps:
- Add the Send an SMS task to a bot, as described in Add a task to a bot.
- Configure the Send an SMS task by setting the properties described in the following tables.
- When you are done, save the app by selecting one of the following:
- Save - Save the app.
- Save & verify data - Save the app and verify that it is runnable based on external dependencies.
After you save the app, you can reuse task in other bots.
Configure the Send an SMS task by using the settings described in the following tables.
Property |
Description |
Linking |
Enable or disable reuse of this component by expanding the Linking panel and toggling the Linking setting. See Reuse automation components. |
Task name |
Name of the task. It must be unique within your app. |
Table name |
Table defined in the event and used by the task. To view or edit the structure of the selected table, position your cursor in the field and click . See Tables: The Essentials for more information. Note: To use a table that is different from the table defined in the event, add a Call a process step. |
Via channel |
Account used to send the SMS message. Select one of the following values:
See Configure your SMS account for more information. |
To |
List of SMS recipients (phone numbers). Click Add to add a phone number or an expression using the Expression Assistant. Repeat to add additional phone numbers. See Add phone numbers for more information. |
Use default content? |
Toggle to indicate whether you want to use the default email content or provide customized content. If enabled, the task uses default content. If disabled, customize the content using the additional properties displayed, as described below. This property is enabled by default. |
If you disable the Use default content? property, customize the content using the additional properties displayed, as described below.
Property |
Description |
Body |
Body of the SMS message. To define the SMS body, do one of the following:
Note: The Body Template property (if specified) takes precedence over this property. Defaults to: Example: |
Body Template |
Template to use for more precise control of the email body. See Manually create an SMS body template and the Body property description (above). |
Body Template Data Source |
Data source used for the body template. |
Media URLs |
List of URLs that reference media files to be attached to the SMS messaeg. Media URLs can be drawings, images, signatures, thumbnails, and so on. Only GIF, PNG, or JPEG media file formats are supported. You can add up to 10 media URLs. Each media file must not exceed 5MB. Click Add to attach drawings, images, signatures, thumbnails, or files to be attached to the SMS message. Specify text or expressions. Repeat to add additional media URLs. Examples:
|
Expand and customize the Advanced settings, as described below.
Setting |
Description |
Inputs |
Add inputs to dynamically configure a task. For details, see Set input values dynamically in tasks.
Then, use the following expressions to access the input values from the current step: |
The following sections provide more information about configuring the Send an SMS task:
Configure your SMS account
You can use AppSheet's Chime account (United States and Canada only) or your personal Twilio account, as described in the following sections.
Use the AppSheet Chime account
To use the AppSheet Chime account, select _AppSheet_Default_SMS in the Via channel property when configuring the Send an SMS task (as described above).
Consider the following when using the AppSheet Chime account:
- The AppSheet Chime account works only in the United States and Canada.
- All Chime SMS-related charges are paid by AppSheet.
- You must be enrolled in an AppSheet Starter, Core, Publisher Pro, Enterprise Standard, or Enterprise Plus subscription plan.
- You can send SMS messages to phone numbers located in the United States and Canada.
- You cannot send SMS messages to premium-rate phone numbers having area codes that begin with 9xx.
- The SMS message body may contain at most 160 characters.
Use your personal Twilio account
Sign in to your personal Twilio account to access account information and upgrade your account (if required):
-
Sign in to your personal Twilio account.
If you do not have a Twilio account, complete the sign up process. It may ask you to verify a phone number. This is used for security purposes only. -
After you are signed in, under Account Summary (https://twilio.com/console/account/settings) locate your Twilio Account SID and your Twilio Auth Token under LIVE Credentials. (View the Twilio Auth Token using the More menu.) You will need this information when configuring SMS using AppSheet.
-
If required, upgrade your Twilio account from a trial account by clicking https://twilio.com/console/billing. You can then click add funds and turn on auto renew based on your projected usage. You can also create alerts and auto recharges, as well.
-
Choose your Twilio phone number by navigating to https://twilio.com/user/account/phone-numbers/search. From here, search for a phone number that you would like to use for your account to confirm its availability. Twilio recommends searching by area code when searching for a phone number. After you find a phone number that is available click buy.
To use a your personal Twilio account, when configuring the Send an SMS task (described above), select _Custom_Twilio_SMS in the Via channel property, and customize the Twilio settings using the additional properties displayed, as described below.
Field |
Description |
AccountSid |
Your Twilio account ID. Available under your personal Twilio Account Summary at: https://twilio.com/console/account/settings |
AuthToken |
Your Twilio account Auth token. Available under your personal Twilio Account Summary at: https://twilio.com/console/account/settings |
CountryCodes |
List of ISO 3166-1 Alpha-2 two-letter country codes used to validate phone numbers. Click Add to add an ISO 3166-1 two-letter Country Code. Repeat to add two-letter country codes for each country having a To or From phone number. |
From |
Phone number used as the source of the SMS. Specify text and expressions. See Add phone numbers for more information. |
Consider the following when using your personal Twilio account:
- All Twilio SMS-related charges appear on your personal Twilio account.
- You must be enrolled in an AppSheet Starter, Core, Publisher Pro, Enterprise Standard, or Enterprise Plus subscription plan.
- You can send SMS messages to phone numbers located in the countries you specify in your SMS automation rule.
- For your protection, you cannot send SMS messages to premium-rate phone numbers for which higher rates are charged. For example, premium-rate phone numbers in the United States often begin with 9xx. This restriction does not apply to valid, non-premium-rate phone numbers such as those within area code 912 in the United States, for example.
- The SMS message body may contain at most 1600 characters.
Add phone numbers
The following provides guidelines for adding phone numbers in the To property when configuring the Send an SMS task:
-
Enter a specific phone number, such as
4255551212
or+14255551212
.
To enter a phone number that contains special characters such as hyphens, parentheses, or spaces, you must enclose the phone number in quotes. For example:
"(425) 555-1212"
"425-555-1212"
"425 555 1212"
-
Use a field in a record that is being modified.
For example, when a new order is received, you can send an SMS message to the customer who created the order. In this scenario, enter the name of the field that contains the customer's phone number. For example, if theCustomerPhone
field in the order record contains the customer's phone number, enter the following expression:[CustomerPhone]
-
Use a field in a record that is referenced by the record being modified.
For example, when a new order is received, you can send an SMS message to the customer who created the order. Each order record might contain a reference to a customer record that contains the customer's phone number. In this scenario, enter the name of the order record field that references the customer record followed by the name of the customer record field that contains the customer's phone number. For example, if the order record field that references the customer record isCustRef
and the name of the customer record field containing the customer's phone number isCustPhone
, specify the customer's phone number by entering the expression:[CustRef].[CustPhone]
-
Use an entire column in another table.
For example, each time a new order is added, you can send an SMS message to all of the people defined in another table. In this scenario, enter the name of the table followed by the field that contains the phone number. For example, if you create a table calledPeopleToInform
that contains two columns,Name
andPhone
, each time a new order is added, you can send SMS messages to all of the people in thePeopleToInform
table by entering the expression:PeopleToInform[Phone]
Manually create an SMS body template
Note: To support the use of SMS body templates, Google must be a supported data source.
Manually create an SMS template file by creating an empty text file, entering valid content, and saving the file using a .txt
extension. For information about customizing the template, see Customize content using templates.
The following provides an example of an SMS body:
Congratulations <<[FirstName]>> <<[LastName]>>.
Your order for <<[Qty]*[Price]> shipped <<TODAY()>>.
<<If: [Expedited] = true>>
You order will arrive in one business day.
<<EndIf>>
<<If: [Expedited] = false>>
You order will arrive in three to five business days.
<<EndIf>>
The resulting SMS message contains the content with all variables and expressions evaluated and replaced with the appropriate values.
Note: You must ensure that the resulting SMS message length does not exceed the maximum SMS message length of 160 characters when using the AppSheet Chime account or 1600 characters when using your personal Twilio account.
After the template file is saved to your computer, upload it to Google Drive as follows.
- Ensure that the Convert uploaded files to Google Docs editor format option is disabled, as described in Upload .txt templates to Google Drive.
- Open Google Drive and navigate to the Google Drive folder where you wish to upload the file.
- Click New and then click File upload.
- When the file open dialog appears, navigate to the template file on your computer, select the file, and click Open.
After the template file is uploaded, use it as described in Use an existing template.
Each time you modify the SMS template you must upload the template file to Google Drive. Google Drive will retain the original DocId. AppSheet will use the last uploaded version of the template file as the attachment template.
View the SMS body template
After uploading the template, click View adjacent to the template property to view the template.
Edit the SMS body template
To edit the template:
- Download the template file from your data source to your computer.
- Edit the template file on your computer using the text editor of your choice.
- Upload the edited template file from your computer to your data source.