cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-line webhook string value changes to empty string " " as data pill

JayMappus
Deputy Chef III
Deputy Chef III

Hi,

I'm working on my first recipe. A webhook trigger has a payload with a variable name of "transcript". "Transcript" has a value string such that when I use the resulting data pill later the value is an empty string " " yet in the payload it was a multi-line string shown way below. When I use the resulting data pill as "text" rather than "formula" the value is " ".

I've tried gsub to replace line breaks and carriage returns but gsub claims the value is nil. 

Webhook Payload Value

transcript: "Lead: https://www.chatleadspro.com/l/1234

@Carlos R: Carlos R has connected

@Carlos R: Hi, alyssa. Thanks so much for reaching out to us. I'm Carlos R, a Live Chat Specialist with McDonald's

@Carlos R: Before we get started and in case we get disconnected can I get your phone number with area code and email address?

Alyssa Test: Hi, this is a test for the webhook updates.

Alyssa Test: please send through the following Alyssa Test: 333-123-1234 Alyssa Test: alyssa@testchat.com

@Carlos R: Ok, just so I’m sure your number is (333) 123-1234 and email address is null

Alyssa Test: yes, thank you

@Carlos R: Great, I am going to send this message right now.

@Carlos R: Thanks for talking with me. ",

 

Thanks in advance for any help.

Jay

2 ACCEPTED SOLUTIONS

gary1
Executive Chef II
Executive Chef II

Hi Jay, do you have other values in the payload and are they appearing as expected in your recipe? Just trying to rule out if the issue is related to the webhook and the entire payload, or if it's specific to only the "transcript" key/value. If Workato is reporting the transcript value as nil, then it's likely the issue is further upstream.

View solution in original post

JayMappus
Deputy Chef III
Deputy Chef III

Problem solved. I deleted the webhook payload field "transcript" from the payload schema and then added it back. Works like a charm. garyl thanks for making me look upstream to the webhook.

View solution in original post

6 REPLIES 6

gary1
Executive Chef II
Executive Chef II

Hi Jay, do you have other values in the payload and are they appearing as expected in your recipe? Just trying to rule out if the issue is related to the webhook and the entire payload, or if it's specific to only the "transcript" key/value. If Workato is reporting the transcript value as nil, then it's likely the issue is further upstream.

Thank you garyl. It appears specific to only the "transcript" key/value. Below is the payload with sensitive data replaced. I've been able to use dates, phone numbers, email and names key/values without issue. Just the "transcript" is the issue. I've tried "slice"ing it down to 10 character but I still get a "nil" error.

{
"payload": {
"sessionId": "xxxxxxxx",
"leadId": "xxxxxxxx",
"dateTime": "2023-06-19 14:38:05",
"date": "2023-06-19",
"time": "14:38",
"siteUref": "xxxx",
"siteUuid": "xxxxxx",
"siteName": "McDxxxxx",
"siteDomain": "mcxxxxx.com",
"visitorUuid": "0xxxxx",
"visitorName": "Alyssa Test",
"visitorFirstName": "Alyssa",
"visitorLastName": "Test",
"visitorPhone": "(333) 123-4444",
"visitorEmail": "alyssa@testchat.com",
"visitorLocation": "Vacaville, California",
"visitorCity": "Vacaville",
"visitorState": "California",
"original": null,
"page": "https://www.chatxxx.com/xxx",
"referrer": "https://platform.clientxxxx.com/",
"reason": null,
"device": null,
"transcript": "Lead: https://www.chatxxxx.com/x/xxxxxxxx\n\n@Carlos R: Carlos R has connected\n\n@Carlos R: Hi, alyssa. Thanks so much for reaching out to us. I'm Carlos R, a Live Chat Specialist with McDonald Worley. \n\n@Carlos R: Before we get started and in case we get disconnected can I get your phone number with area code and email address? \n\nAlyssa Test: Hi, this is a test for the webhook updates.\n\nAlyssa Test: please send through the following\n\nAlyssa Test: 333-123-1234\n\nAlyssa Test: alyssa@testchat.com\n\n@Carlos R: Ok, just so I’m sure your number is (333) 123-1234 and email address is null \n\nAlyssa Test: yes, thank you\n\n@Carlos R: Great, I am going to send this message right now. \n\n@Carlos R: Thanks for talking with me. ",
"rejectLeadUrl": "https://www.chatleadspro.com/chat/lead/xxxx/xxxxxxx",
"ga_gclid": null,
"msclkid": null,
"Campaign": "McXXXX Chat",
"Company": "McXXXX",
"email_distribution__c": "clientupdate@xxxxxxx.com, don@xxxxxxx.com, leads@xxxxxxxx.com",
"OrgID": "14xxxxx",
"Owner_Agency__c": "xxxxxx",
"contact_status": "Something Else"
},
"params": {},
"headers": {
"accept": "*/*",
"accept_encoding": "gzip, deflate",
"content_length": "2012",
"content_type": "application/json",
"user_agent": "python-requests/2.25.1",
"x_amzn_trace_id": "Root=1-6490aexxxx",
"x_correlation_id": "0ea78xxxxx",
"x_forwarded_for": "xxxxx",
"x_forwarded_port": "xxx",
"x_forwarded_proto": "https",
"x_request_id": "0ea7819xxxxxx"
}
}

JayMappus
Deputy Chef III
Deputy Chef III

I can paste the payload value as text into the field and it works. it can have /n included or new lines put in manually - either works. Examples below.

Works with below string pasted as text

Lead: https://www.chatlexxxx.com/l/c33f3xxxxxx\n\n@Carlos R: Carlos R has connected\n\n@Carlos R: Hi, alyssa. Thanks so much for reaching out to us. I'm Carlos R, a Live Chat Specialist with McDonald Worley. \n\n@Carlos R: Before we get started and in case we get disconnected can I get your phone number with area code and email address? \n\nAlyssa Test: Hi, this is a test for the webhook updates.\n\nAlyssa Test: please send through the following\n\nAlyssa Test: 333-123-1234\n\nAlyssa Test: alyssa@testchat.com\n\n@Carlos R: Ok, just so I’m sure your number is (333) 123-1234 and email address is null \n\nAlyssa Test: yes, thank you\n\n@Carlos R: Great, I am going to send this message right now. \n\n@Carlos R: Thanks for talking with me. 

Works with below string with new lines (return key) added manually

Lead: https://www.chaxxxxxxx.com

@Carlos R: Carlos R has connected

@Carlos R: Hi, alyssa. Thanks so much for reaching out to us. I'm Carlos R, a Live Chat Specialist with McDonald Worley.

@Carlos R: Before we get started and in case we get disconnected can I get your phone number with area code and email address?

Alyssa Test: Hi, this is a test for the webhook updates.

Alyssa Test: please send through the following

Alyssa Test: 333-123-1234

Alyssa Test: alyssa@testchat.com\n\n@Carlos R: Ok, just so I’m sure your number is (333) 123-1234 and email address is null

Alyssa Test: yes, thank you

@Carlos R: Great, I am going to send this message right now. \n\n@Carlos R: Thanks for talking with me.

 

JayMappus
Deputy Chef III
Deputy Chef III

Problem solved. I deleted the webhook payload field "transcript" from the payload schema and then added it back. Works like a charm. garyl thanks for making me look upstream to the webhook.