Zendesk
Zendesk is a help desk. Its triggers react to a ticket being created or updated, and the Notify webhook action sends a request with the body you write. Sent to the Flows address, the request starts your flows: a ticket is created — the requester gets "we have your request" in Viber or SMS; the ticket is solved — a thank-you and a request to rate the answer.
This page is written from the public documentation of Zendesk and has not been checked on a live account yet.
What you need
- A paid Zendesk plan: Suite Team, Growth, Professional, Enterprise or Enterprise Plus; Support Team, Professional or Enterprise. There is no free plan.
- Access to Admin Center — webhooks and triggers are set up there.
- One webhook and one address for all triggers: the event is written in the body. A body holds up to 16,000 characters.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose Zendesk. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Set up Zendesk
- In Admin Center open Apps and integrations → Webhooks → Webhooks and press Create webhook. Choose the way of connection Trigger or Automation and press Next.
- Name —
AlphaFlow; Endpoint URL — the address from the cabinet; Request method —POST; Request format —JSON; Authentication — None: the secret is already in the address. Press Create webhook. - Open Objects and rules → Business rules → Triggers and press Create trigger, named "AlphaFlow — new ticket". The condition (Meet ALL): Ticket | Is | Created.
- In Actions press Add action, choose Notify webhook and the AlphaFlow webhook, paste body 1 into JSON body and press Save.
- Create one more trigger, "AlphaFlow — ticket status". The conditions: Ticket | Is | Updated and Ticket status | Changed (with your own ticket statuses — Status category). The action Notify webhook with body 2. Save.
- If you need the closing of a ticket as a separate event, create a third trigger, "AlphaFlow — ticket solved", with
the condition Ticket status | Changed to | Solved and body 2 in which
"event"is"ticket_closed". Then add Ticket status | Not changed to | Solved to the status trigger, or the closing brings two events. - Go back to the webhook and press Finish setup.
The exact names of the trigger conditions are not confirmed by the documentation.
Body 1 — a ticket is created:
{
"event": "ticket_created",
"message_id": "zendesk:{{ticket.id}}:created",
"occurred_at": "{{ticket.created_at_with_timestamp}}",
"contact": {
"phone": "{{ticket.requester.phone}}",
"email": "{{ticket.requester.email}}"
},
"traits": {
"first_name": "{{ticket.requester.first_name}}",
"locale": "{{ticket.requester.locale}}"
},
"properties": {
"ticket_id": "{{ticket.id}}",
"status": "{{ticket.status}}"
},
"context": { "source": "zendesk" }
}
Body 2 — the status changed. AlphaFlow takes the event from the body as it is: there is no table of statuses for this
body, and a closed ticket comes as ticket_status_changed unless you add the trigger of step 6:
{
"event": "ticket_status_changed",
"message_id": "zendesk:{{ticket.id}}:{{ticket.updated_at_with_timestamp}}",
"occurred_at": "{{ticket.updated_at_with_timestamp}}",
"contact": {
"phone": "{{ticket.requester.phone}}",
"email": "{{ticket.requester.email}}"
},
"traits": {
"first_name": "{{ticket.requester.first_name}}",
"locale": "{{ticket.requester.locale}}"
},
"properties": {
"ticket_id": "{{ticket.id}}",
"status": "{{ticket.status}}",
"status_category": "{{ticket.status_category}}"
},
"context": { "source": "zendesk" }
}
- The placeholders come from the Zendesk placeholder reference for business rules; the dates are ISO 8601.
- Do not add free text — the subject or a comment of the ticket. The documentation does not say that Zendesk escapes values in JSON, and a quote in the text would break the body.
- If your users have an external id (synced through SSO or the API), add
"external_id": "{{ticket.requester.external_id}}"tocontact.
Step 3. Send a test
In the webhook press Test webhook, paste a body with the values filled in and send it. Then create a test ticket
from a user with a phone. The events appear in
Flows → Connections → Event journal, and the connection shows
Recognised: Zendesk.
Events
| Trigger in Zendesk | AlphaFlow event | Properties |
|---|---|---|
| A ticket is created (body 1) | ticket_created | ticket_id, status |
| The status of a ticket changed (body 2) | ticket_status_changed | ticket_id, status, status_category |
A ticket is solved — the separate trigger of step 6 (body 2 with "event": "ticket_closed") | ticket_closed | ticket_id, status, status_category |
- In which language
{{ticket.status}}comes —Solvedor a translated name — the documentation does not say. So tell the closing apart by the condition of a Zendesk trigger, not by the value ofstatusin a flow. status_categoryis one ofNew,Open,Pending,On-hold,Solved,Closed.
The contact is found by the phone and the email of the requester; the first name comes from traits. If the
requester has no phone, the phone comes empty and the contact is found by the email. With Validate user phone
numbers switched on, Zendesk keeps the phones in the international format.
Support events are not among the events of the ready-made templates (see Recommended events): create the flow From scratch and choose the event as its start.
Good to know
- Zendesk waits 12 seconds for the answer and after a timeout repeats up to 5 times. A repeat has the same
message_idand is not recorded twice. - Zendesk signs every request (
x-zendesk-webhook-signature). Checking the signature is optional: the secret in the address is enough. - The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; the webhook in Zendesk stays on.