Table of Contents
1. Webhooks at a Glance
2. Setting Up a Web Hook in Zendesk Admin Center
3. Testing Your Web Hook
4. Using Triggers and Automations to Notify Your Web Hook
5. Setting Up a Web Hook Using the Zendesk Webhooks API
6. Using Webhooks to Create Issues on GitHub
7. Conclusion
Webhooks at a Glance
Webhooks are a way to send information to a specified URL automatically in response to events. This happens by way of user-defined HTTP callbacks.
Webhooks are used by automations and triggers in Zendesk when a ticket meets specific conditions. For example, you could create a webhook to alert your team in Slack whenever an urgent ticket is created, or you could update a card in Trello with common updates received on a ticket in Zendesk.
Creating webhooks in Zendesk is super easy, whether that be in your admin center or via the webhooks API. After creating the business rules that will execute the action to notify your webhook, you simply need to set up the webhook by entering a name, description, and endpoint URL. Next, you'll select the request method and request format, and lastly you'll select the authentication type required for the request. And that's all there is to it, your webhook is ready to be associated with the appropriate automation or trigger.
Setting Up a Web Hook in Zendesk Admin Center
1. Navigate to the WebHooks page in the Admin Center
1. Go to the **Admin Center** > **Apps & Integrations** > **Webhooks**.
2. If this is your first time opening the Webhooks page, you'll see the **Getting Started** page, which outlines creating a webhook and converting HTTP targets to webhooks. If you're seeing the Getting Started page, go ahead and click **Create Web Hook** at the bottom. Otherwise, click **Actions** at the top right and select **Create Web Hook**.
3. This brings us to the configuration page for our webhook. This is where you'll enter all the required information such as name, endpoint URL, request method, and authentication.
2. Enter the required information
* **Name:** A descriptive name for your webhook.
* **Endpoint URL:** The URL where the data will be sent to integrate with a third-party service.
* **Request Method:** The HTTP method that will be used to send the data to the endpoint URL.
* **Request Format:** The format of the data that will be sent to the endpoint URL.
* **Authentication:** The type of authentication that will be used to send the data to the endpoint URL.
3. Test your webhook
Before creating the webhook, you can test it to make sure everything is working correctly.
1. Click the **Test Web Hook** button.
2. A pane will appear off to the right with a few different options and fields.
3. In the **Test Event Source** field, you can either leave it as **Sample Support Ticket** with a mock ticket payload, or you can select **Custom Tests** and write your own request body in the field below.
4. Since we have a placeholder present in our endpoint URL, you'll also see a field to enter a value for that here. As mentioned earlier, this value is dynamically generated from the ticket data, but since this test is not associated with a real ticket, it doesn't have a value to pull. So we'll go ahead and add a test value here.
5. Click **Send Test**.
6. You should see the response status appearing along with a response body and response headers.
If everything went well, you'll see a 200 status returned.
4. Use triggers and automations to notify your webhook
Once you've created your webhook, you can use triggers and automations to notify the webhook when certain conditions are met. For example, you could create a trigger that notifies the webhook when a ticket is created with a specific tag.
1. Go to the **Triggers** page in the Admin Center.
2. Click **Create Trigger**.
3. In the **Trigger Name** field, enter a descriptive name for the trigger.
4. In the **When** field, select the conditions that will trigger the action. For example, you could select **Ticket is created** and **Ticket has tag**.
5. In the **Then** field, select the action that will be taken when the conditions are met. For example, you could select **Notify active webhook**.
6. In the **Webhook** field, select the