{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21683,"path":"integrate-applications/integration-hub/zendesk-spk-webhook.md","title":"Set up a webhook","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up a webhook\n\nConfigure a webhook to subscribe to Zendesk with a ServiceNow callback URL.\n\n## Before you begin\n\nRole required: admin\n\n## Procedure\n\n1.  Register a Zendesk webhook in ServiceNow to notify ServiceNow when certain events occur in Zendesk.\n\n    1.  Log in to your ServiceNow instance as an admin.\n\n    2.  Navigate to **Zendesk Spoke** &gt; **Webhook Registries**.\n\n    3.  Click **New**.\n\n    4.  Provide a name to identify the webhook registry record for **Name**.\n\n    5.  Click the Generate Token related link.\n\n        A secret token is generated and displayed. This values is also updated in **Token**.\n\n    6.  Right-click the form header and click **Save**.\n\n    7.  Click **Create Webhook**.\n\n        A confirmation message is displayed that the webhook creation is initiated and value of **Webhook ID** is populated.\n\n2.  In the Zendesk account, set up event-based rules that run every time a ticket is created or updated.\n\n    1.  Log in to the Zendesk account.\n\n    2.  Navigate to Zendesk Admin Center.\n\n    3.  Navigate to **Objects and rules** &gt; **Business rules** &gt; **Triggers**.\n\n    4.  Click **Add trigger**.\n\n    5.  On the form, fill these values.\n\n<table id=\"table_owm_ndb_hxb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nTrigger name\n\n</td><td>\n\nName to identify the trigger.\n\n</td></tr><tr><td>\n\nCategory\n\n</td><td>\n\nRequired event category. Select **Tickets**.\n\n</td></tr><tr><td>\n\nConditions\n\n</td><td>\n\nTrigger conditions.Under **Meet ANY of the following conditions**, provide these conditions:\\[Omitted image \"zendesk-trigger-condition.png\"\\] Alt text: Trigger conditions.\n\n</td></tr><tr><td>\n\nActions\n\n</td><td>\n\nSelect **Notify active webhook** for **Notifications** and select the ServiceNow webhook.In **JSON body**, enter:\n\n```\n{ \n\"id\":\"{{ticket.id}}\", \n\"priority\":\"{{ticket.priority}}\", \n\"status\":\"{{ticket.status}}\", \n\"subject\":\"{{ticket.title}}\", \n\"description\":\"{{ticket.description}}\", \n\"due_at\":\"{{ticket.due_date}}\", \n\"requester\":\"{{ticket.requester.name}}\" \n}\n```\n\n</td></tr></tbody>\n</table>    6.  Click **Create**.\n\n        A confirmation message is displayed that the trigger is created.\n\n\n## Result\n\nThe webhook is setup. When a ticket is created or updated in Zendesk, the details are stored in your ServiceNow instance. To access the Zendesk tickets in your ServiceNow instance, navigate to **Zendesk Spoke** &gt; **Webhook** &gt; **Tickets**.\n\n"}}