Webhook via Postman is working, but not via Zapier Webhook action
Hey guys,
has anybody had the case where a webhook works just fine via Postman but not via Zapier? I’m trying to add a comment in Zendesk, and it simply won’t work. I don’t even get an error message, the comment just never arrives in Zendesk. Postman works just fine, with the exact same code, same credentials, everything identical. Am I missing anything?
Best
Johannes
Page 1 / 1
Hi @Johannes
Can you post how your Webhook is configured in the Zap?
Can you link to the Zendesk API documentation you are using for this?
Hi @Troy Tessalone ,
thanks for your reply.
Here’s the webhook. As you can see a very standard one.
here’s the screenshot. Using a PUT request on a webhook app Action.
Thanks
J
Hi @Johannes
I would set data pass through to False and try again as you do not want your inputted data to be overwritten from whatever was returned in step 6.
Hi @Johannes
I would set data pass through to False and try again as you do not want your inputted data to be overwritten from whatever was returned in step 6.
Thanks @GetUWired , but that didn’t do the trick. My code looks alright, as it has been confirmed by Zendesk. I’m just surprised that I seem to be the only one with that problem. Can it be a user account problem?
@Johannes
Have you also tried specifying your content type header? Content-Type: application/json
Beyond that it also looks like author_id should be an integer not a string as there are not double quotes around the value.
Also, possibly try setting unflatten to false but that really shouldn’t do anything since you are sending raw data and not form data.
Let me know if none of that works and I’ll throw out some other suggestions
Hi @GetUWired
Thanks for your input. I ran the code you provided above as a Python Action in the Code app in Zapier, but I’m getting the following error message:
Traceback (most recent call last):
SyntaxError: invalid syntax (<string>, line 8)
This is my code:
Are you able to test this on your end? I’m starting to wonder if it’s my Zendesk account.
Hi @Johannes
My apologies. That was not intended to be a code for you to attempt to run in Zapier. That was a screenshot taken from the API docs you linked in your above message. (https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/). It is not valid Python code. I was adding it because in your above message you stated the request you are making in Zapier is:
{ "ticket": { "comment": { "body": "Why via Postman, but not Zapier", "author_id": "376848464420" } } }
But the docs show that author_id is of type integer which shouldn’t be wrapped in double quotes.
The custom request function is brutally unforgiving in its formatting. It may be better to make a PUT request action and use double underscores to indicated nesting as opposed to using a custom request action. https://zapier.com/help/doc/how-get-started-webhooks-zapier
It is not something we can troubleshoot on our end as I wouldn’t have valid credentials to your Zendesk. If you’d like direct support please send us a message and I would be happy to hop on a zoom call with you.
Thanks,
Tim @Getuwired
Hey Tim @GetUWired,
I tried so many things by now, I believe a Zoom Call would be great. I talked to your support already, but they didn’t offer this. How can I request a call with you?
Best
Johannes
I will send you a private message
So this issue can be closed, the request was missing ‘Content-Type’ header. Adding that in resolved the issue.