Creating webhooks to interact with third-party systems

Return to top

75 Comments

  • Jacob the Moderator
    Community Moderator
    Zendesk Luminary

    This announcement seems relevant to a lot of comments here:
    Announcing API key authentication and custom headers for webhooks

    0
  • Andrew France

    Hi all

     

    I am new to webhooks, I can successfully send the json to a 3rd party system but my json file is empty. From the documentation it appears I need to add placeholders into the json format when creating the webhook. Am I correct in my thinking, if so what would an example look like?

    Andrew

    0
  • Dane
    Zendesk Engineering
    Hi Andrew,

    This will entirely depend on the format of JSON will be accepted by it. As for slack the payload is like the payload below.
     
    {
    "ticket_id": "{{ticket.id}}",
    "status": "{{ticket.status}}",
    "updated_at": "{{ticket.updated_at_with_timestamp}}",
    "subdomain": "{{ticket.account}}",
    "ticket_latest_comment": "{{ticket.latest_comment}}",
    "updated_by": "{{current_user.name}}"
    }
    0
  • Ankit Jain

    When devs/we read this or want to try out webhooks, devs don't have an HTTP endpoint to review incoming payloads from their instance of Zendesk. It takes some time to deploy an HTTP endpoint to inspect all types of incoming payloads. As zendesk is popular, the following information shall help fellow developers. For the authors, this suggestion should be moved to "Testing a webhook" section.

    ---

    Typically when you want to start with webhook developments, you would like to know some or all possible payloads that zendesk can send. You shall need an HTTP endpoint to capture and review these incoming payloads. I suggest some HTTP bin kind of tools which are very popular and handy to get started in no time.

    1. Beeceptor - https://beeceptor.com/ - Gives you an HTTP domain that you can enter in Zendesk and start receiving payloads. Using its mock feature you can respond with custom payloads/failures as well. Quite handy to start webhook development

    2. RequestBIN - https://pipedream.com/requestbin - Gives you an HTTP endpoint to capture any incoming request. It always send 200 OK status. 

    0
  • Sharuk Ahmad

    Hi All - I am trying to setup a webhook to automatically CC one end user each time a ticket is submitted. My initial problem is that I keep getting the following msg each time I am trying to test the webhook. Any help would be appreciated.

    Response Body: {"error":"Couldn't authenticate you"}

    My current Webhook setup:

    Endpoint URL*: https://myorg.zendesk.com/api/v2/tickets/{{ticket.id}}.json

    Request Method: PUT

    Request Format: JSON

    Authentication: Basic authentication

    Username: myemail.org/API Token

    Password: API Token

    Note:  I created a new API Token for Webhook

     

     

    0
  • Peter Hochstrasser

    Hi

    The syntax for the Token is /token, not /API

    0
  • Caroline Scott

    Can anyone on this thread help me with an issue? I have several teams who want to be able to create a chaser to LIGHT AGENTS (or any agent type). We have lots (1000s) of light agents and they do not log in to Zendesk to update tickets, they respond via email. Currently we cc them into a ticket to ask via internal notes for advice/information and we would like to be able automatically contact them to remind them to reply after so many days. We are moving to the Followers experience very soon so we will be using the followers field to contact them instead of the CC field. 

    I am not a developer, I do not have access to a developer, I also am not confident in using the API. I have raised this need with Zendesk several times now with no solution that I can implement easily.

    0
  • Peter Hochstrasser

    Hi Caroline Scott

    It would be best if you find a way to do this in Zendesk using built-in functionality (Yes, that's me who uses lots of webhooks and API scripts to implement things Zendesk has "forgotten" to add for years).

    The main challenge here is that there's no functionality to send a mail TO the light agents instead of just CCing them (it doesn't matter if you're on Followers or not).

    Do you have numbers, e.g.,

    • how many tickets are open in your Zendesk instance, on average?
    • what percentage of these have light agents involved?
    • how many light agents are involved per ticket, on average?

    Depending on these numbers, 

    • if they are high (say, 1000's of tickets, 30% Light Agents involved, 2 LA's per Ticket) use a Zendesk-internal solution, i.e. a plugin or some clever triggers maybe even with Webhooks, such that the notifications are generated on the Zendesk servers.
    • if they are low, you can look at an outside-of-Zendesk solution, because neither the number of API requests nor the amount of data to be moved is critical.

    The API is pretty nice to use, but if you're on your own with no coding experience, you might want to look around for a partner who would be able to implement a solution for you. Usually, the Zendesk Reps are pretty helpful in that respect.

    Let me add a word of caution: You have a problem, and you need a solution. Therefore, try to sketch the solution as precisely as possible - otherwise, it's hard to get a good solution implemented within a reasonable timeframe and budget.

     

    0
  • Bernard Ugalde

    Can anyone confirm if a light agent can authenticate for webhooks? We downgraded a system account from Agent to light agent, and now the activity for the webhook shows the following:

     
     
     
    0
  • JR Lausin
    Zendesk Customer Care
    Hi Bernard,
     
    You must be an admin or an agent in a custom role with permission to create webhooks. 
     
    Please check this article.
     
    https://support.zendesk.com/hc/en-us/articles/4408839108378-Creating-webhooks-to-interact-with-third-party-systems#topic_qbn_v4w_dpb
    0
  • Simon Pledger

    Hi everyone

    I wish to have a webhook call an SSL endpoint on my local development machine, whose target webapplication uses a self signed certificate. 

    The webhook fails and the activity page reports " x509: certificate signed by unknown authority".

    Is there a way to configure  Zendesk to allow webhooks to call SSL endpoints with self signed certificates.

    In contrast, URL Targets work fine and I have never had issues with them calling self signed certificate SSL endpoints. So I am a little puzzled why this restriction only seems to exist on webhooks. It is sadly preventing me from doing any local development and prototyping at the moment

    Thanks in advance for any help

    Simon

     

    0
  • Peter Hochstrasser

    Hi Simon Pledger

    The problem here is that the Zendesk infrastructure is public, and, to my knowledge, you as a user of a Zendesk subdomain do not have a way to add your own certificates (or trust chains). Therefore, you are required to have a "real" certificate that Zendesk can authenticate against a standard set of CA certificates and intermediate certificates.

    A cheap (free) and safe way to get such a certificate is to use Let's Encrypt on your end, so on your local web service. Since Zendesk uses this scheme itself, it is very likely that this will work ;-).

    Yours truly
    Peter

     

    0
  • Simon Pledger

    Hi Peter

    Thanks for your helpful reply and advice. I'll certainly explore Let's Encrypt going forward.

    In the mean time I have actually managed to workaround the problem by opening an additional non secure http port on my same webapplication server and changing my webhook to call the http version of the endpoint instead. Zendesk isn't too happy about me using an http endpoint in my webhook and puts a warning under the field :-) ... but it does now work, and circumvents the ssl validation issue for my local testing.

    Best regards

    Simon

    0
  • Ivan Miquiabas
    Zendesk Customer Care
    Hi Peter and Simon, 
     
    Thanks for reaching out! 
     
    What Peter said was exactly the best explanation regarding this question. Thank you also for sharing your workaround. Although it does send a fair warning. Please do reach out to us again if you encounter any issues, rest assured we can create a ticket on your behalf and assign it to one of our advocates! 
     
     
    Cheers! 
    0
  • Madhanprabhu Thangadurai

    Hi all

    Do webhooks support bearer tokens (first time), i.e. adding the token for the first time in Admin Center -> Apps and Integrations -> Webhooks -> Create Webhook ? Also does it refresh the tokens automatically when it expires ?

    0

Please sign in to leave a comment.

Powered by Zendesk