Scripting

Call the Messenger API from scripts for advanced control or dynamic content.

Script Module

In Flow Designer you can export a complete function template of the script usage of the action. The exported snippet will be similar to the example below:

var inputs = {};
inputs['content'] = 'MESSAGE BODY';
inputs['destination'] = 'DESTINATION_HERE';
inputs['basic_auth'] = 'ENCODED_AUTH_HERE';
sn_fd.FlowAPI.getRunner().action('x_1319575_message.send_sms').inForeground().withInputs(inputs).run();

Direct API

For more advanced scripting, directly invoke our API:

curl --location 'https://servicenow.jungledrum.com/v1/sendSms' \
--header 'Authorization: Basic ENCODED_AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
   "destination_number": "+64229998888",
   "content": "Hello world!"
}'

Related Documentation