Creating webhooks with the HTTP target

Have more questions? Submit a request

38 Comments

  • OT

    I tried clicking on the 'Integrating with Slack' link in the examples, but it says I'm not authorised to view the page.  Is the example available elsewhere?

    0
  • Jessie Schutz

    Hi Ola!

    It looks like that article has been archived. I'm going to follow up with our Docs team to find out what's going on!

    0
  • Charles Nadeau

    It should work now. The post used to be part of a community topic about a beta feature. We archived the topic after the feature was released. I moved the post back into a public topic.

    0
  • Jessie Schutz

    Thanks, Charles!

    0
  • Rahulg

    Is there any way to remove signature from latest public comment data???

    0
  • Dennis Lynn

    Hi Rahulg,

    Could you tell me a little more about your use-case here? I'd like to help, but I'm not sure what you're hoping to achieve. Thanks in advance!

    0
  • Jehan

    Incomplete documentation. No example for "Form Encoded" targets.

    0
  • Nicole - Community Manager

    Thanks, Jehan. We'll let documentation know that this needs an update. 

    0
  • Nathan Anderson

    Does anyone have an example for integrating with Asana?  I want to create an Asana task when a ticket is closed in Zendesk.

    0
  • Nicole - Community Manager

    Hey Nathan - 

    It looks like Asana has an integration for creating tickets. I'm not sure whether it can be configured to create a task when a ticket is closed, but it does look like it can create a task when a new one is opened. 

    0
  • Scott Russell

    Can someone explain how Target Failures are displayed? Is it the last trailing X days,  last X failure events, etc.? Thanks!

    0
  • Kiran Madhav

    Hi Scott,

    Please follow below

    Admin --> Channels --> API --> Target Failures

     

    Here you can see all the target failure and reason.

    Thanks,

    Kiran.

    0
  • Jessie Schutz

    Thanks for jumping in, Kiran!

    0
  • Raoul de Grunt

    Hello,

    Can you please elaborate on the Basic Authentication option of the webhook? We have created a webhook to update a Zendesk ticket (to add a CC and custom field value) and we want to use a wildcard for the authentication user and the token for the password.

    Can I define "{{ticket.assignee.email}}\token" as username, with the token as the password?

    Thank you for answering

    0
  • Jessie Schutz

    Hey Raoul!

    I don't actually know the answer to your question, but I'm going to check with some colleagues to see if I can find some info for you! Stand by!

    0
  • Josh Rosenthal

    Hey Raoul!

    To step in and help Jessie on this one, you can't pass in that placeholder as a wildcard in your target/trigger workflow. It will pass over the placeholder string and not the value that would replace it in a ticket.

    That said, I also wanted to warn you that we don't recommend updating tickets using a target directly, as it's very likely you'll encounter conflicts when trying to update a ticket this way.

    I hope that clarifies that a little bit!

    0
  • Raoul de Grunt

    Hello Jessie and Josh,

    Thanks for the feedback. For now we will use the trigger/webhook as we created it, with a fixed username.

    We are aware that using this method is not optimal and can lead to conflicts. The reason that we used this method is because it is not easy to achieve our desired behaviour via normal trigger actions. We believe we are safe, as we change a custom field value and add an email to the CC, which are both not used in any other trigger or automation.

    Just to give a sketch of our implemented behaviour: We have set the assignee to 2 fields: a custom field 'Last Worker' and add it to the CC. We do this, because we configure our system to unassign tickets after a period of assignee inactivity and an engineer can easily find back what they have been working on.

    If we were to do this in a trigger we would need to create a trigger per assignee, which means creating a trigger for every new support engineer. 

    FYI: We are looking into creating a script that will create a Zendesk agent and matching trigger, plus can delete a user and the matching trigger. Then we can get rid of this construction.

    0
  • Jessie Schutz

    Thanks for sharing your use case, Raoul! It's a really interesting workflow. Even though placeholder token won't work for you, I'm glad you found something that works. :)

    0
  • Charles Wood

    Speaking of placeholders in HTTP targets -- we are successfully using placeholders in the URL, but I am wondering if conditionals would work?

    0
  • Alejandra Soni

    Are internal notes also shown in the webhooks? Or only official replies?

    0
  • Keith @ Zendesk

    Hey Charles,


    That question is going to require a Ticket to get an answer.  I'll be contacting you by email.

    Thanks!

    0
  • David Lim

    I'm interested in creating a hook where when a new ticket is created to pass along the requester's email address to a HTTP target. I will look up the requester's email address for customer information to put into the ticket.

    From this documentation, I can see how I can pass the ticket info to my HTTP target, but I vaguely remember that the Tickets API can't see newly created tickets. There's a 15-minute delay.

    Is there a workaround? Thanks in advance.

    0
  • Charles Wood

    I don't think that's the case, David. I used to have a job check for new tickets every 5 minutes (this was for an internal resource that couldn't be a webhook). There may be a delay, but it's certainly not 15 minutes.

    0
  • Rommel Manalo

    Are there any work-around for essentials license? As of now i'm working for the same 10min cron jobs that pull for tickets and customers.

    If only zendesk is generous enough to open the API for webhooks for customer and tickets change, i can integrate my internal account software here easily. I think zendesk will be more competitive with other tools with this feature, or else I will create my own ticketing tool, and i'll put this on github as open source, I'll compete with you directly. 

     

    So i suggest to open it up, so it will be 1 lesser treat for your business. :)

    0
  • Jessie Schutz

    Hi Rommel!

    I'm afraid there's no work around for folks on the Essential plan. You'd need to upgrade to Team in order to use this solution.

    0
  • Dmitry Kreisserman

    Suppose we have a ticket with Hyperlink within the comment. We are sending an HTTP webhook to the external system upon each public comment added. So we would like to export that comment to another system.

    The problem is that the Hyperlink is passed as a plain text in the comment__body. Can we override it somehow?

    Our JSON:

    {
    "event": "comment",
    "action": "public",
    "comment": {
    "author": "{{ticket.latest_comment.author.name}}" ,
    "body": "{{ticket.latest_comment}}",
    "created_at": "{{ticket.latest_comment.created_at_with_time}}",
    "id": "{{ticket.latest_comment.id}}",
    "public": "True",
    "url": "{{ticket.latest_comment.url}}",
    "ticket_url": "{{ticket.url}}",
    "ticket_title": "{{ticket.title}}",
    "ticket_external_id": "{{ticket.external_id}}"
    }
    }

     

    we tried also to use all other options but none of them supplied a hyperlink migration: ticket.latest_comment_rich, ticket.latest_comment_formatted

    By the way, despite your wiki, attachments work in both cases: ticket.latest_comment_rich, ticket.latest_comment_formatted.

    "Code Block" doesnt work in ticket.latest_comment_rich

    1
  • David Lim

    @dmitry So, do you have two external systems?

    1. The target of your webhook that is sent the comment
    2. The external system that you want the comment exported to

    How I'd approach the problem would be that the target of your webhook should remove the comment via regular expression before sending it off to export.

    1
  • Marty Whitby

    Just sharing this community post as the request is valuable for the features in this post. The HTTP requests are restrictive without being to add headers.

    https://support.zendesk.com/hc/en-us/community/posts/115000453227-Feature-request-Webhooks?page=1#community_comment_360004294193 

    0
  • Brett - Community Manager

    Thanks for sharing Marty!

    We'll pass this information over to the appropriate team to help provide visibility :)

    If our Product Managers have any questions they'll reach out directly in that feedback post.

    Cheers!

    0
  • Nivi Mor

    Is there a way to trigger a webhook when an article is updated?

    0

Please sign in to leave a comment.

Powered by Zendesk