Only in Mage Pro.Try our fully managed solution to access this advanced feature.
Overview of steps
- Create an API token in Zendesk
- Update Mage project settings with Zendesk config
- Customize ticket templates with dynamic variables (Pro only)
Create an API token in Zendesk
To allow Mage to create tickets in Zendesk, you need to set up an API token:- Log in to Zendesk as an admin.
- Go to Admin Center → Apps and integrations → Zendesk API.
- Enable Token Access.
- Click Add API token.
- Enter a description (e.g., “Mage Alerts”) and copy the generated token.
Note: This token will only be shown once. Store it securely.
- Identify your Zendesk subdomain (e.g., for
https://acme.zendesk.com
the subdomain isacme
). - Ensure the account you use (email) has agent or admin permissions.
Update Mage project settings
Once you have your subdomain, email, and API token, add them to your project settings. Here’s an examplezendesk_config
(add under notification_config
in metadata.yaml
):
alert_on
section, it will default to trigger_failure
and trigger_passed_sla
.
Options for alert_on
:
trigger_failure
: alert when a run of a trigger failstrigger_success
: alert when a run of a trigger succeedstrigger_passed_sla
: alert when a SLA is missed.- SLA (Service Level Agreement) is an expected amount of time for the pipeline to complete.
- If the pipeline runs longer than the SLA, an alert will be sent.
Customize ticket templates
You can customize ticket templates innotification_config
just like Slack message templates:
success
, failure
, and passed_sla
scenarios.For each template:
- If you specify
summary
, the ticket subject will be your summary, anddetails
will be used as the body. - If you specify only
details
, it will be used as the ticket body directly.
execution_time
pipeline_run_url
pipeline_schedule_id
pipeline_schedule_name
pipeline_schedule_description
pipeline_uuid
error
(failure only)stacktrace
(failure only)
🚀 Pro Only: Interpolate Mage Variables in Ticket Templates
In Mage Pro, you can interpolate environment variables and other Mage variables in your Zendesk ticket templates using Jinja-like syntax:start_time
end_time
duration
(in seconds)env
(value of theENV
environment variable)
What next?
Whenever a pipeline run completes or fails, Mage will create a Zendesk ticket based on your configuration.You can route these tickets to specific groups or agents, tag them, and track resolution in Zendesk. Example ticket subject/body:
Subject: Mage Notification: Failed to run Mage pipeline example_pipeline |
Body: Pipeline example_pipeline failed at 2025-08-13. View logs at: https://mage_url/pipelines/example_pipeline/runs/123 |