Send SMS with FlowScript

Compatibility:IdSurvey 7IdSurvey 8

With IdSurvey you can automatically send an SMS in any page of the questionnaire.

To do this you need to create a Flowscript with the sendsms() function.

sendsms(from, to, message);

In addition, you can save the result of the dispatch in a custom field using this syntax:

{CustomField} = sendsms(from, to, message);



  • Be sure to have SMS credit available in your account.
  • The phone number of the recipient has to have the international prefix included.
  • A telephone number or a name of up to 11 characters without spaces or special characters can be entered as sender. For some countries it is necessary to use an authorized telephone number registered with the competent authorities.
  • Thanks to FlowScript it is possible to set a condition to send the SMS only under certain circumstances. For example, if the respondent has selected a certain answer.
  • Any apostrophes contained in the text of the message must be written before the back-slash (\’) character. This prevents flowscript from interpreting the apex as the end of the string.
  • You can send the SMS to a specified recipient or recall the contact field dynamically.


Step 1

Open the flowscript editor by clicking on the gear of the desired page. In this example we add the flowscript to the last page of the questionnaire.

send sms with flowscript


Step 2

Write the full subject line and text function of the SMS. In this case we use the {mobile} field of the contact as recipient.

{sms_result}=sendsms('+15551234567', {mobile}, 'Ciao, thank you for joining our survey.');

The SMS will be sent to your contact phone when you click the next button on the page with flowscript.

The result of the delivery will be saved in the custom sms_result field.

Send SMS with Flowscript