Summary
In this documentation, we will cover:
- Enabling Zendesk synchronization settings in Discourse
- Configuring a Zendesk webhook
- Setting up a Zendesk trigger
Enabling Zendesk synchronization settings
To begin, you will need to enable a specific setting in Discourse and provide a secure token.
-
Navigate to Admin Settings: Go to your Discourse site and navigate to the Admin settings page at
/admin/site_settings. -
Enable Sync Setting: Find and enable the
sync comments from zendesksetting. -
Provide Webhook Token: In the
zendesk incoming webhook token, generate and add a random secure string. This token will be used later for configuring Zendesk’s webhook.
Setting up a Zendesk webhook
Follow these steps to configure a webhook in Zendesk:
-
Access Webhooks Page: Navigate to the Webhooks section in Zendesk under Apps and integrations → Webhooks.
- Example URL:
https://<instance_name>.zendesk.com/admin/apps-integrations/webhooks/webhooks
- Example URL:
-
Create a Webhook:
- Click the Actions button in the upper right corner.
- Select Create Webhook.
- Fill in the webhook details, ensuring you replace
<discourse.example.com>with your Discourse site’s URL.
-
Test the Webhook:
- Click the Test Webhook button.
- Select ‘Custom Test’ from the dropdown.
- Replace the JSON with the following, inserting your token:
{
"ticket_id": "{{ticket.id}}",
"topic_id": "{{ticket.external_id}}",
"email": "{{current_user.email}}",
"token": "INSERT TOKEN HERE"
}
- Hit Send Test. Expect a
400 Bad Requestas a positive signal with the HTML page displayed indicating success.
Setting up a Zendesk trigger
Configure a trigger in Zendesk to automate actions:
-
Access Triggers Page: Go to the Triggers section in Zendesk under Admin → Objects and Rules → Business Rules → Triggers.
- Example URL:
https://<instance_name>.zendesk.com/admin/objects-rules/rules/triggers
- Example URL:
-
Create a Trigger:
- Click Add trigger.
- Name it “Discourse Sync” and set the category to “Notifications”.
- Configure the conditions and actions as depicted below.
- Use the same JSON body as in the test webhook step, again replacing “INSERT TOKEN HERE” with your token.
- Save the Trigger: Once configured, make sure to save the trigger.
Last edited by @jessii 2024-10-29T18:59:23Z
Check document
Perform check on document:





