• Get started
  • Documentation

Integrate Opsgenie with Zendesk

Zendesk logo

What does Opsgenie offer Zendesk users?

Opsgenie provides a powerful bidirectional integration with Zendesk. When a new ticket is created in Zendesk, a corresponding Opsgenie alert/incident is automatically created, containing rich information about the ticket. Opsgenie provides rich notifications with on-call rotation, scheduling etc. features and alert escalations to ensure the best ticket management for Zendesk customers. As users execute actions on the alerts/incidents, like acknowledge, comment, or close– the ticket on Zendesk is also automatically updated with comments about these alert actions.

Functionality of the integration

Opsgenie provides 4 different flows for the Zendesk integration:

  1. Creating alerts in Opsgenie for the Zendesk tickets

  2. Creating tickets in Zendesk for the Opsgenie alerts

  3. Creating incidents in Opsgenie for the Zendesk tickets

  4. Creating tickets in Zendesk for the Opsgenie incidents

For Incidents to be created

Please make sure a Service has already been defined.

Creating alerts/incidents in Opsgenie for the Zendesk tickets:

  • When a ticket is created in Zendesk, an alert/incident is created in Opsgenie.

  • If Zendesk to Opsgenie updates are enabled, actions for Zendesk tickets are executed in Opsgenie when the chosen action is executed in Zendesk for alerts/incidents which are created by the Zendesk integration.

  • If Opsgenie to Zendesk updates are enabled, actions for Zendesk tickets are executed in Zendesk when the chosen action is executed in Opsgenie for alerts/incidents which are created by the Zendesk integration.

Creating tickets in Zendesk for the Opsgenie alerts/incidents:

API Token should also be entered into the Opsgenie configuration for the action mappings to work. For more information, refer to Zendesk support.

  • When an alert/incident is created in Opsgenie, a ticket is created in Zendesk.

  • If Zendesk to Opsgenie updates are enabled, actions are executed in Opsgenie when the chosen action is executed in Zendesk for alerts/incidents which have a source other than the Zendesk integration.

  • If Opsgenie to Zendesk updates are enabled, actions are executed in Zendesk when the chosen action is executed in Opsgenie for alerts/incidents which have a source other than the Zendesk integration.

Add Zendesk Integration in Opsgenie

This integration is only available with Standard and Enterprise plans in Opsgenie, and Premium and Enterprise plans in Jira Service Management.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.

  1. Go to Settings > Integrations. Search for Zendesk and select Add.

  2. Select one of the four integration flows to use.

  3. Specify who is notified of Zendesk alerts using the Responders field. Auto-complete suggestions are provided as you type.

  4. Copy the integration API KEY.

  5. Select Save Integration (If Opsgenie is not creating tickets in Zendesk, make sure UPDATE Opsgenie -> Zendesk toggle button is unchecked. If Opsgenie should create tickets, add in Zendesk API Key https://support.zendesk.com/hc/en-us/articles/226022787-Generating-a-new-API-token-)

Configuration in Zendesk

In order to automatically add a Webhook and Trigger you can use the buttons which are provided in the integration configuration page after saving the integration. First, you need to create a webhook by clicking Create Target. If you do not specify a name, it will create a webhook under integration's name. For creating triggers for Create, Close and AddNote actions' triggers, you need to give the webhook name that you created in the previous step and click the Create Trigger button. This will automatically create all of the actions mentioned above.

1. In Zendesk, go to the "Admin" page.

2. Select Apps and integrations > Webhooks under "Settings".

3. Click Create Webhook.

4. Select Trigger or automation

5. Enter the following into Endpoint URL according to the domain that you use

  • US domain: https://api.opsgenie.com/v2/json/integrations/zendeskv2?apiKey= previously into "URL".

  • EU domain: https://api.eu.opsgenie.com/v2/json/integrations/zendeskv2?apiKey= previously into "URL".

6. Select POST as "Request Method" and From encoded as “Request format”.

7. Fill in other required details

8. Select "Create webhook" and click Submit.

9. Now from the admin panel, select Triggers under "Business Rules".

10. Create the triggers following this instructions file.

Create a trigger

Configure alert properties from the Zendesk Integration / Advanced Settings page.

​All set! Now manage your Zendesk alerts at Opsgenie and leverage its full alerting functionality.

Action Mapping Feature

Opsgenie allows customers to define action mappings between Opsgenie actions and Zendesk actions.

For Zendesk to Opsgenie updates:
Zendesk to Opsgenie action mappings are available for all of the integration flows. Use this action mapping to map different Zendesk actions to different Opsgenie actions. For example, add a note to Opsgenie alert/incident, when a public reply is added to the ticket in Zendesk. In order to do this, define "If a public reply is added to the ticket in Zendesk, a note is added to the alert in Opsgenie". mapping in "Zendesk -> Opsgenie" Update Section.

For Zendesk to Opsgenie updates

For Opsgenie to Zendesk updates:

Opsgenie to Zendesk action mappings are available for all of the integration flows. Use this action mapping to map different Opsgenie actions to different Zendesk actions. For example, add an internal note to the Zendesk ticket, when the related incident is resolved in Opsgenie. In order to do this, define "If incident is resolved in Opsgenie, an internal note is added to the ticket in Zendesk". mapping in "Opsgenie -> Zendesk" Update Section.

For Opsgenie to Zendesk updates
  • "A tag is added to the alert and a custom action is executed on alert" actions differ from other actions. When one of these actions is selected, an extra field appears to enter for which tags or for which custom action this mapping works.

  • Enter multiple tags by separating the tags with a comma. If multiple tags are entered, the mapping works if the alert has one or more of the specified tags. Leave the tags field empty, for the mapping to work for any tag.

  • If an Opsgenie action is mapped to multiple Zendesk actions, an error occurs except for the "a tag is added to the alert" and "a custom action is executed on alert" actions. Save multiple mappings for these actions, because they differ by the given tags and the given custom action names.

API Token should also be entered into the Opsgenie configuration for the action mappings to work. For more information, refer to Zendesk support.

Troubleshooting

If Zendesk alerts are not getting created in Opsgenie, make sure that Zendesk is able to reach to Opsgenie endpoint using Test webhook option from the webhook created under Settings->Apps and integrations > Webhooks.

  • If no test alert appears in your Opsgenie account after clicking Test webhook option, this means the webhook was not successfully added. Please go back to add webhook section of the document and check the steps.

  • If the test alert is created in Opsgenie, then the test webhook configuration is correct. First please check the "Logs" page to see if Opsgenie received the integration and if an error has occurred. If no request or error is shown in the "Logs". Please check if the Zendesk trigger is used when a ticket is created/updated. Find this info from Business Rules->Triggers page. If their usage is 0 that means the trigger rule is not used, so there must be something wrong with its configuration.

Business rules triggers

Still need help?

The Atlassian Community is here for you.