Connect Quriobot to Messagebird (for sending Text messages as a response)

You can now easily send text messages as a response to your customers on Quriobot, with the service called Message bird you easily set up a Webhook workflow and configure that as a response connection!

Here’s how to do that:

Step 1: Create a Messagebird account and make sure you top it up with SMS credits on the Messagebird website.

Step 2: Create a new Webhook to SMS Flow with their Flow Builder:

Step 3: Add your variables in your Messagebird Flow:

-For the first Webhook step recepient and message are automatically configured.

-On the second, Send SMS, you configure the originator (your number), and your flow is ready to be saved and publilshed!

-After Publishing you will be presented with your Webhook URL, which you need tp copy-paste in the Quriobot Control Room where you configure the JSON Webhook Response Connection

****Step 4: Copy-pasting the webhook to the JSON Webhook Response Connection and add the Variables in the JSON webhook body

- You configure the Variables on the Advanced tab

****Result: That’s it, after running and finishing your bot, the response connection will be triggered and the recipient will receive a Text message!

What if you’d like to send a scheduled message?

You can use a special scheduledDate-time parameter to the JSON body:

{
       "message": "{{message}}",
       "recipient": "{{recipient}}",
       "scheduledDate-time": "{{scheduledDateTime}}"
}

Where the bot variable scheduledDateTime is a script variable like:

function(callback, variables)  {
var dayIncrement = 1;

if (quriobot.moment().day() === 5) {
    // set to monday
    dayIncrement = 3;
} else if (quriobot.moment().day() === 6) {
    // set to monday
    dayIncrement = 2;
}

var value = quriobot.moment().add(dayIncrement, 'days').format()
callback(value)
}

which sets the scheduled date to the next business day

Edit this page

Tags
See also