Turn last week's Zendesk tickets into GitBook doc drafts

By General Input

Every Monday, cluster last week's solved Zendesk tickets by theme, check your GitBook for gaps, and open draft pages for the answers you're missing.

Integrations

  • Zendesk
  • GitBook
  • Slack Bot

Type

Agentic Task

Categories

  • Customer Support
  • Product

Build me an agent workflow that runs every Monday at 8am in my local timezone and turns last week's resolved Zendesk tickets into draft documentation pages in GitBook.

Trigger: cron, Mondays at 8am. Treat the lookback window as the previous seven days of solved tickets.

Step 1. Pull tickets from Zendesk. Use Zendesk Search Tickets with a query that filters for status:solved and the last seven days (something like 'type:ticket status:solved solved>{{date 7 days ago}}'). Paginate through results and keep the subject, the requester's question, the public-facing resolution, the ticket URL, and any tags. Cap the input to roughly the top 200 tickets if volume is huge.

Step 2. Cluster the tickets by recurring theme. Group them into a small number of named themes based on the underlying customer question, not the surface wording. For each theme, keep the list of source tickets (subject + URL) and a one-line summary of what customers were actually asking.

Step 3. For each theme, check whether my GitBook already has a good answer. Use GitBook Search Organization Content scoped to my organization to look for existing pages that cover the theme. For ambiguous cases, fall back to GitBook Ask AI In Organization with the theme phrased as a customer question and inspect the answer plus its cited sources. Mark each theme as 'covered' or 'gap' based on the result.

Step 4. For the documentation gaps, rank them by ticket volume and take the top 5. For each one, call GitBook Create Change Request in the GitBook space I designate as the drafts space, with:

- a proposed page title written in the customer's voice,

- an outline (H2 sections) shaped by the actual questions and edge cases the tickets raised,

- a short 'why this matters' note with the count of tickets in the theme last week,

- a list of source ticket links so the reviewer can read the real conversations.

Important: edits to live GitBook content must go through Create Change Request, not a direct page write. Do not merge the change requests. A human reviewer handles that.

Step 5. Post a digest to Slack using Slack Bot Send a Message in the channel I specify. The digest should include: total solved tickets analysed, the list of gaps with the change request links that were opened, the themes that were already well covered (with the existing GitBook page link), and the cap that was applied (e.g. 'showed top 5 of 8 gaps').

Setup inputs to ask me for: my GitBook organization, the GitBook space to put drafts into, the Zendesk filter (view, tag, group, or 'all'), the Slack channel for the digest, the day and time, and the cap on change requests per run (default 5).

Constrain the workflow to one GitBook organization and one target drafts space so reviewer inboxes don't flood. If there are zero gaps, still post the digest with the themes that were covered so I know the loop ran.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them