Hi,
I am using webhook to call API, the problem is the URL value is cutting off if it contains '&' in it.
Example Json Template:
PersonId={{lead.Id:default=edit me}}&ContactCreated= {{lead.Created At:default=edit me}}&ContactModified= {{lead.Updated At:default=edit me}}&FormURL= {{lead.Form URL:default=edit me}}
URL value = https://www.abc.com/sampletext/?value1=xxxx&value2=yyy&value3=zzzz
In this URL, the value is cutting off after first Amberson occurs, like (https://www.abc.com/sampletext/?value1=xxxx).
Is there a solution to handle URL values.?
Solved! Go to Solution.
Thanks Sanford.
Updated request encoding to Form/URL and template format with double quotes. It was working Fine.
Please show screenshots of
- the full webhook definition (in Admin)
- the activity detail (click the activity ID to open the detail) for the Call Webhook activity in a lead's Activity Log
Make sure to capture the entire popup in the screenshot (expand or scroll as necessary).
In webhook payload request we are having the correct url, but when the request payload is passed to API, the payload is converted into class(object) where the url is cut off after '&' (Amberson).
PFB the screenshot of webhook and activity log
Set Request Encoding to Form/URL, not JSON. Your payload is clearly not JSON.
don't you have to 'escape' the character in json? I believe you just put /& instead?
You don't have to escape "&" in JSON. It's not JSON, though. It's being passed as Form/Url encoding (much like a query string).
what about just using HTML? & ?
Nope, not relevant in URL (URI) encoding. URL encoded ampersand is %26, but you should never be doing this yourself, just choose Form/Url in the webhook setup.
Question - I also have this same issue and changed the Set Request Encoding to Form/URL. The webhook failed and caused and error. I see there is mention of "double quotes" in the template area. Is this needed and if so, where exactly are these to be placed? Around what sections of the template code? Can someone post an example for me, please? Thanks.