Do you have a need to automate some telephony using Nintex Workflow?
This could include sending text message reminders or notifications, or making voice calls where your workflow can notify a person of an upcoming event, a reminder of an appointment or that a package is ready to be picked up.
Nintex Workflow can be used to perform these functions via third party integration, such as communicating to Twilio. You can read more about what Twilio offers on their site. If you want to try this out, Twilio allows you to sign up for a trial account to make sure you can get this working from your workflow.
This post will be about how to get Nintex Workflow to send messages to Twilio so that it can send a text message to the destination on your behalf.
Firstly, you will need an account at Twilio. Part of that, is that you will get AccountSid and an API Authentication Token. These are required for successful requests to be sent to Twilio.
There is also an important part of sending messages that is required, and that is the Basic Authorization token. This is made up of the AccountSid and the API Authentication Token, separated by a colon and then converted to Base64 format.
What I recommend, is that you store all of these in Nintex Workflow constants.
Since I mentioned you need the Basic Auth Token in Base64, you may be wondering how to get that. Go to any online Base64 encoder site (Base64Encode.com) and just do the conversion there. Remember to put your decoded format like this:
Run the encoding, then copy and store it in your Workflow Constant.
You're now ready to build a workflow to talk to Twilio to send text messages.
Building the workflow is actually the easy part. To send a message, it's one action. The Web Request action.
Firstly, we need the url for the Web Request. It looks like this :
Most the url will be the same, except the "TwilioAccountSid", is the workflow constant we made. This will give Twilio and idea as to what account you're dealing with.
For the action, we are performing a POST.
Expand the Add Headers section, because we need to add the Authorization header here.
Name : Authorization
Value : Basic [Base64AuthorizationToken]
Make sure you replace the [Base64AuthorizationToken] with your constant that you created at the Base64 encoding site.
Finally, the actually body of the message that is sent to Twilio. It's comprised of a From phone number, To phone number, the body of the text message and set the MmsOnly to false.
It will look like this :
As you can see, for the Body, I've actually insert a Title field from the current item my workflow is running on. This lets me dynamically create the text message and have the workflow send it.
Feel free to add comments to this post, if you have some ideas or questions.
My next post will be about making calls from Nintex Workflow.