Azure DevOps: Auto-Create Work Items
Full Version Only
Git-Zen can create an Azure DevOps work item for every new ticket on a Zendesk form, with no agent action. A Zendesk trigger calls the Git-Zen API when the ticket is created. Git-Zen creates the work item and links it to the ticket. After that, the link works like any other: comments, statuses, field changes, and close-to-solve all sync as usual.
You set this up once. After that, your Zendesk admins own the trigger and can change the project, type, fields, and assignee themselves.
Before you start
Section titled “Before you start”- Your Azure DevOps project has the Git-Zen service hooks. Without them, the work item is created but never links to the ticket.
- The Azure DevOps account that Git-Zen uses can create work items in the project.
- You know:
- the Zendesk form, and the IDs of the form fields you want to copy
- the Azure DevOps project, work item type, and area path
- the reference names of the Azure DevOps fields, such as
Custom.CustomerName
To find a Zendesk field ID, go to Admin Center → Objects and rules → Ticket fields. The ID is in the field list.
To find an Azure DevOps reference name, open Organization settings → Boards → Process, open the work item type, and select the field.
Step 1: Ask for the API webhook
Section titled “Step 1: Ask for the API webhook”Contact Git-Zen Support and ask for the Git-Zen API webhook. We create it in your Zendesk. It is named Git-Zen API Webhook: your-subdomain.
You only need to do this once, even if you later add more forms or projects.
Step 2: Create the trigger
Section titled “Step 2: Create the trigger”In Zendesk, go to Admin Center → Objects and rules → Triggers → Create trigger.
Conditions (Meet ALL of the following):
- Ticket — Is — Created
- Form — Is — your form
Actions:
- Notify by → Active webhook → Git-Zen API Webhook: your-subdomain
- Optional: Group and Assignee, if you want the ticket assigned when it is created.
Paste this JSON body, then change the values for your setup:
{ "action": "create", "provider": "AzureDevOps", "ticket_id": "{{ticket.id}}", "project_id": "Integrations", "type": "User Story", "areaPath": "Integrations\\Flow Team", "fields": [ { "field": "Custom.CustomerName", "value": "{{ticket.ticket_field_12345678}}" }, { "field": "Custom.Requester", "value": "{{ticket.requester.name}}" } ]}| Key | Required | Value |
|---|---|---|
action |
Yes | Always create. |
provider |
Yes | Always AzureDevOps. |
ticket_id |
Yes | Always {{ticket.id}}. |
project_id |
Yes | The Azure DevOps project name. |
type |
Yes | The work item type, for example Bug, User Story, or a custom type. |
areaPath |
No | The area path. Write each backslash as \\. |
iterationPath |
No | The iteration path. Write each backslash as \\. |
fields |
No | A list of Azure DevOps fields to fill. field is the reference name. value is usually a Zendesk placeholder. |
tags |
No | Azure DevOps tags, separated by spaces. |
parentWorkItemNumber |
No | The ID of a parent work item. |
Git-Zen takes the work item title from the ticket subject and the description from the ticket description. Do not add them to the JSON.
Step 3: Keep fields in sync after creation
Section titled “Step 3: Keep fields in sync after creation”The trigger fills the fields once, when the work item is created. To send later changes on the ticket to the work item, add a field mapping for each field with the direction From Zendesk.
Step 4: Test
Section titled “Step 4: Test”- Create a ticket on the form.
- In Zendesk, go to Admin Center → Apps and integrations → Webhooks → Git-Zen API Webhook → Activity. The latest request shows 200 and the message
work item created. - Check the work item in Azure DevOps: project, type, area path, and fields.
- Within a minute, the Git-Zen sidebar on the ticket shows the linked work item.
| Activity response | Meaning |
|---|---|
200 work item created |
It worked. |
200 already has a linked work item |
The ticket was already linked. Nothing new was created. |
400 |
A required key is missing from the JSON, or the JSON is not valid. Check for an unescaped quote in a field value. |
403 |
Your plan does not include this feature. |
404 ticket does not exist |
Git-Zen could not read the ticket. Contact us. |
409 |
The trigger uses an old Git-Zen API webhook. Select the current one. |
| Any other code, error creating work item | Azure DevOps rejected the work item. Check the project name, the type, the field reference names, and any required fields on the type. |
Change the setup later
Section titled “Change the setup later”You do not need to contact us to change the trigger. Edit its JSON body to use a different project, type, area path, or fields. Edit its actions to change the group or assignee. Add another trigger to cover another form.
Contact us only if the activity log shows a 409, or if you need a new API webhook.
Limits
Section titled “Limits”- Follow-up tickets. When a customer replies to a closed ticket, Zendesk creates a follow-up ticket on the same form. The trigger creates a new work item for it.
- Failures appear only in the webhook activity log. Nothing is posted on the ticket when the work item cannot be created.
- Attachments on the ticket are not copied to the work item.
- Comments follow your normal comment settings and comment filters. These apply to your whole account, not to one project or work item type.