These steps, in order, are:
- Setting up Incoming Hook in Slack Channel.
- Setting up Outgoing HTTP Zendesk Integration.
- Setting up a Zendesk Trigger for Sending Slack Notifications.
- Testing the Integration.
Setting up an Incoming Hook on the Slack Channel.
Go to the Create Slack Webhook page to start the process and log in to your organization if you have not logged in already. Next, select the Channel that you want the notifications to go to. In this case, I am going to target my personal channel to receive notifications. Click on ‘Add Incoming WebHooks integration’ after selecting the channel.
Once the webhook is ready, copy the Webhook URL for use in the next steps.
In the ‘Integration Settings’ section, you can customize the title and logo for the hook to make it more memorable.
When you are done customizing the webhook, click on the ‘Save Settings’ button at the end of the page and your webhook is ready to use.
Setting Up Outgoing HTTP Zendesk Integration
First, go to your organization’s page and navigate to the Extensions page through Support Admin/Settings/Extensions. The URL should look something like this:
https://<<company_name>>.zendesk.com/agent/admin/triggers</company_name>
Click on the add target button to start creating a new target that can post messages to Slack.
Select HTTP Target option from different types of targets.
Add an identifying title (e.g. Zendesk Tickets) on the HTTP target form. The URL on the form should be the Webhook URL created in the step above. Select POST as the method and JSON for the content type. Next, select Create target in the menu next to the Submit button. Finally, click Submit to create the target.
The HTTP target is now ready to use. Now we need to create a trigger and send data to the target.
Setting Up a Zendesk Trigger for Sending Slack Notifications
Go to the Triggers page in Zendesk, which should be under Admin/Business Rules/Triggers. The URL should look like this:
https://<<company_name>>.zendesk.com/agent/admin/triggers</company_name>
Click on Add trigger to start the setup.
Add any meaningful trigger name (e.g. Ticket Created). Add condition(s) for the trigger (e.g. Ticket Is Created).
Add Actions for the trigger. Select action as Notify Target and target as Zendesk Ticket (or whatever name you have used for the HTTP target). Since the goal here is to send ticket data to Slack, we will add the ticket title to the JSON body as shown below.
Click the Create button to get the trigger ready.
You can add more data to the message if you want. The details of available parameters can be checked by clicking on View available placeholders link.
Testing the Integration
Finally, we can test the integration by creating a ticket using the Zendesk widget in the Contact Us section.
Clicking on Send should trigger a notification to the Slack channel, which should look as follows.
The integration is now complete and you will receive notifications about Zendesk tickets in the Slack channel you chose.
Conclusion
Using techniques like what is listed above, we have had the opportunity to address our clients’ concerns and they love it! If you are interested in joining our team, please visit our Careers page.