Send SMS message
This Trigger sends an HTTP request to SMS Gateway server, which sends SMS message to recipient. You need to have a valid account with SMS service provider to facilitate this service. To use this Trigger, select:
- Enable retry checkbox if you want to enable retry options for the
trigger. By default, this option is disabled. If you select the Enable
retry checkbox, you must input values into the following mandatory fields.
- Status Codes — Set status code on which you want the HTTP retries to happen. It can be a comma separated values of status codes as well as a range of status codes. For example, 302-400,500.
- Number of Retries — Set the number of retries allowed for the trigger. The maximum number of retries must not exceed 3.
- Retry Interval — Set the interval
(ms) between two subsequent retries. The maximum retry timeout value (Retry Interval * Number
of retries) can be configured using
MaxHttpRetryTimeoutInMins
shared.property. Default value ofMaxHttpRetryTimeoutInMins
is 1 min.
- Template for URL used to reach SMS Gateway. This template typically should
include:
- Login credentials for your SMS account
- Address of SMS sender
- Phone number of SMS recipient
- Text of SMS message
- Request type: HTTP GET or HTTP POST
- Timeout (in ms) for HTTP request
The following example shows a URL template which reaches to Clickatell SMS Gateway (https://www.clickatell.com/):
http://api.clickatell.com/http/sendmsg?user={!#SETTINGS.sms_user}&password={!#SETTINGS.sms_password}& api_id={!#SETTINGS.sms_api_id}&MO=1&from={!#SETTINGS.sms_from}&to={!cell_phone#value}& text=Your+verification+code+{!ver_code}
Please note:
- SMS credentials (user name, password, API ID, sender's phone number) are stored in Settings object. Template tokens for these fields are used in URL instead of actual values.
- Template token for recipient's phone number uses #value suffix to remove any formatting.
- Explicitly provided text message must use URL encoding.
- HTTP response will include ID of sent message or error code.
Note: Result of Send SMS message request is stored in shared variables, see HTTP triggers.