Making a Voice Call through Nintex Workflow

  • 30 December 2014
  • 2 replies
  • 10 views

Userlevel 7
Badge +11

This is extending from my previous post, which was about Sending Text Messages through Nintex Workflow.

 

Here, what we want to do, is automate a voice call.  Generally, this would be used for reminders or other types of notifications, where you don't really need a human being to make the call.  Nintex Workflow is ideal for automating this process, through communication to a telephony provider, like Twilio

 

Requirements

 

The requirements are the same as the previous post, where you store the AccountSid, Auth Token and Base64 Basic Authorization token in Nintex Workflow constants.

 

The only differences here, are that the URL is a little different and the body of the web request is different.

 

Workflow

 

 

MakeCallWebRequest.png

The URL has changed, in that instead of "Messages.json" on the end, we now have "Calls.json".

So the URL looks like this :

 

https://api.twilio.com/2010-04-01/Accounts/TwilioAccountSid/Calls.json

 

Again, make sure you replace the TwilioAccountSide with your workflow constant.

 

The body of the Web Request is also different, because it's a different type of message.  There are a few parameters:

From : phone number who the call is coming from

To : phone number you want to call

Url : this is an XML file that describe the audio that will be spoken on the phone - Twilio Voice Commands

StatusCallBackMethod : set this to GET

FallbackMethod : set this to GET

Method : set this to GET

 

To test this out, I made a simple XML file that looked like this :

<?xml version="1.0" encoding="UTF-8"?>

<Response>

    <Say voice="woman" language="en">This is a reminder of an appointment on Tuesday at 2pm.</Say>

</Response>

 

What this means, is that it will make the phone call, and it will convert the text in the XML file to audio, and say "This is a reminder....".

 

Conclusion

 

You can see from above, and from the previous post that automating this is very easy.  Text messages, I would say a extremely easy to automate.  Voice messages are a little more difficult.

 

The reason I find them a little more difficult, is that the message takes a url to an XML file that would contain the text to convert to audio. This suggests that you need to have the XML files built beforehand.  Which is not always ideal.

 

But, you could make this dynamic, if you were to create the XML files on the fly in your workflow.  It would mean that you would need to store this XML file, somewhere where Twilio could see it.  If you're running this on a SharePoint farm that is hidden behind a firewall, this will not work.  You would need to look at creating the XML file, somewhere outside of there.

 

The other way to do it, would be to have a HTTP handler that you pass into the URL, where the workflow can build up the url dynamically, pass in some ID into the Query String, so that when Twilio tries to access it, it returns the dynamic XML.

 

Again, please feel free to add comments, thoughts, suggestions or questions in the comments section.


2 replies

Userlevel 5
Badge +12

Shows the powerful integration that Nintex has with existing applications and services out there.  As always, great job Vadim!

Badge +11

This is so cool! It is amazing what things can be done!

Reply