Skip to content
Book demo

Support

Doc gap auto-fix from support tickets

Turn unanswered support questions into docs updates, then reply to the customer with the new page once it ships.

supportcustomer successdocumentationknowledge basegithubnotionslackdoc gap

[ workflow / support ]

Doc gap auto-fix from support tickets

A support ticket starts the workflow. Cosmos checks public docs first, looks for an existing docs PR, and if needed pulls safe context from internal sources such as Notion or Slack. It opens a docs PR, waits for merge, and replies to the customer with the new answer.

15 nodes

11 edges

Trigger[trigger]
New support ticket

Webhook from Zendesk / Intercom

AI Agent step[analyse]
Analyse the question

Intent, product area, concept

System step[search-docs]
Search public docs

Site map + knowledge base

Decision

Already documented?

Existing page covers it

Yes
Bypass (already solved)[reply-existing]
Reply with existing link

Close the ticket

YES
System step[search-prs]
Check docs repo PRs

Open + recently merged

Decision

Doc PR already open?

Same gap in flight

Yes
Monitor path[watch-pr]
Watch PR until merged

Reply when it ships

YES
AI Agent step[internal]
Pull internal context

Notion + Slack lookups

Safety filter[redact]
Strip sensitive content

Secrets, infra, codenames

AI Agent step[open-pr]
Open docs pull request

Drafts the new page

Human-in-the-loop[review]
Doc owner reviews PR

Approve or request changes

Decision

PR merged?

Approved and shipped

No
AI Agent step[revise]
Revise from feedback

Loop back to review

YES
Output / Result[reply-new]
Reply with new doc link

Customer answered

Workflow prompt

Paste this into Augment to reproduce the workflow end-to-end.

Build a Cosmos workflow that closes documentation gaps surfaced by customer support tickets.

Trigger: a new ticket is created in our support desk (Zendesk, Intercom or HelpScout: pick whichever is configured).

Steps:
1. Analyse the question. Extract the user's intent, the product area, and the specific concept they're asking about.
2. Search our public documentation site (and any other public knowledge sources we expose) for an existing page that already answers the question.
3. Decision: "Already documented?".
   - If yes, reply to the ticket with a link to the existing page and close the loop.
   - If no, continue to the next step.
4. Look at our docs repository on GitHub. Check open and recently merged pull requests for one that addresses this gap.
5. Decision: "Doc PR already open?".
   - If yes, watch the PR and reply once it merges.
   - If no, continue to the next step.
6. Search internal sources for the correct answer (Notion knowledge base, Slack channels we tag for support, runbooks).
7. Run a safety filter that strips company secrets, infrastructure details, credentials, and references to unannounced or internal-only projects. Only generally-shareable, customer-safe content moves forward.
8. Open a pull request on the docs repository that adds the missing page or section.
9. A documentation owner reviews the PR. They can request changes; the workflow loops until the PR is approved and merged.
10. Once merged, reply on the ticket with a link to the freshly-published doc page.

Constraints:
- Never publish anything that contains secrets, infrastructure topology, internal codenames, or unreleased product names.
- Always cite the source the answer was derived from inside the PR description so reviewers can audit it.
- Customer replies must read like they were written by a human teammate: no internal jargon.