Troubleshooting Webhooks
2 min
how do i handle backslashes in my json data? when creating an action associated with a webhook, if you have blackslashes in your json data values, they need to be double escaped for example, your data may look like this { "devicename" "abc p12345", "console user" "abc p12345\smithf" , "device manufacturer" "lenovo", "device model" "xyx", "device asset tag" "no asset information", "battery manufacturer" "lgc", "battery name" "12586zz", "battery full capacity percentage" "101", "battery count" "1", "category" "excellent"} the \smithf needs to be double escaped in order for it to be actioned successfully the double escaping for this example is show below in the value field field value variable type variable name webhookbodyc data type json value $(replace(variable(“webhookbody”),”\\\”, “\\\\\\\”)) what if i my third party product doesn't handle underscores in authorization headers? if you want to use, for example, azure devops, with webhooks, there is an alternative format of rest api key that you can use in your authorisation header create a new request in the postman application enter the following information in the header tab select the authorization check box enter the reference id (rest api key) generated for the tenant in the value column in the format rest api key={reference id} or api key {reference id} in the same endpoint request window, enter the endpoint request payload details and click the send button or press the enter key for more information, see using the rest api key docid\ uaqtdeghj3ebw29q0gop8
