SMS Texting with CallRail
I've built a HTTP call Automation that is able to send a text through our CallRail company Number, but am struggling to figure out how to capture the text message response from the client so I can put it in the comment section of the item. Any advice or solutions?
-
You can setup a webhook from CallRail to Podio WorkFlow Automation and then process the webhook data with searches.
You will need to simplify the phone numbers both in the searched app and based on the inbound phone number to a simple 10 digits with no +1 or dashes or other symbols.
I generally have a Clean Phone Calculation field with the following code:var b="";
var phone=@Phone Number;for(i=0; i<phone.map(function (obj) { return obj.value}).length;i++) {
if (phone.map(function (obj) { return obj.value})[i] != null)
{
var b = b +" "+phone.map(function (obj) { return obj.value})[i].replace(/[^\w]/gi, "")
}}
b + " ";
In PWA use something like: preg_replace("/[^\d]*/ism", "", str_replace("+1","",[token])) to make the phone number from the CallRail Webhook into a matching clean 10 digits in a variable (I call my Clean Phone.
I then search for an item in my target app in which the Calc Field Clean Phone contains (not exactly matches) the Variable Clean Phone created.
Please sign in to leave a comment.
Comments
1 comment