TICKET MANAGEMENT

Nightly batch: cluster the Zendesk backlog and merge stale duplicates

Runs on a schedule to scan all open Zendesk tickets, cluster near-identical ones across the whole backlog, merge the duplicates into a canonical ticket per cluster.

CategoryTicket Management
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNightly schedule fires
  • ActionPull all open tickets and embed textZendeskZendesk
  • ActionCluster embeddings and pick canonical per groupPostgreSQLPostgres
  • LogicSkip singletons, keep real duplicate groups
  • ActionMerge duplicates into canonical ticketZendeskZendesk
  • OutputEmail backlog cleanup reportGmailGmail

What it does

Sweeps the entire open Zendesk backlog once a night, finds clusters of duplicate tickets that accumulated during the day, merges each cluster down to one canonical ticket, and reports what was consolidated.

When to use it

When real-time merging is too aggressive but the backlog still fills with duplicates. Use this as a safe overnight cleanup that batches decisions and leaves a clear audit trail.

How it works

  1. 1A nightly schedule triggers the run.
  2. 2All open tickets are pulled from Zendesk and their text embedded with OpenAI.
  3. 3Embeddings are clustered in Postgres and a canonical ticket is chosen per cluster by age.
  4. 4A branch skips clusters of size one and only acts on real duplicate groups.
  5. 5Each duplicate group is merged into its canonical ticket via the Zendesk API.
  6. 6A consolidated cleanup report is emailed to the support lead with cluster counts and merged ticket ids.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect ZendeskTickets, queues, knowledge base.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect OpenAIModels, embeddings, files.
  4. 4
    Connect GmailRead, draft, send, label.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.