Automatically generates structured knowledge base articles when tickets are resolved in
ITFlow, using the Claude API to synthesise resolution notes into searchable KB articles
in Wiki.js at kb.xzopiasecure.com.
ITFlow ticket resolved
↓
Resolution notes + ticket history sent to Claude API
↓
Claude generates structured KB article
↓
Saved as draft in Wiki.js via API
↓
Tech notified via ITFlow comment to review
↓
Tech approves (or edits and approves)
↓
Article published to kb.xzopiasecure.com
Tagged: client org + device type + problem category
Claude generates articles in this exact format:
# [Concise problem title]
**Category:** [Hardware / Software / Network / Account / Email / ...]
**Tags:** [product names, OS, symptoms]
**Applies to:** [Windows 10/11 / Server 2019/2022 / macOS / ...]
## Problem
One-sentence description of the problem.
## Symptoms
- Bullet list of observable symptoms the user reported
- Include error messages verbatim if available
## Environment
- OS version
- Application name and version (if applicable)
- Hardware model (if relevant)
## Root Cause
Brief technical explanation of why this happened.
## Resolution Steps
1. Numbered, reproducible steps
2. Include exact commands, paths, or settings changed
3. Note any prerequisites or warnings
## Verification
How to confirm the issue is resolved.
## Prevention
What to do to avoid recurrence (if applicable).
## Related Articles
- Links to related KB articles (populated by Wiki.js tags)
## Metadata
- **ITFlow ticket:** #{ticket_number}
- **Resolution date:** {date}
- **Author:** {tech_name} (AI-assisted)
- **Review status:** Draft
You are a technical documentation specialist for an IT managed service provider.
A support ticket has been resolved. Generate a structured KB article using the template below.
TICKET INFORMATION:
Subject: {ticket_subject}
Client: {client_name}
Device type: {device_type}
OS: {os_version}
RESOLUTION NOTES:
{resolution_notes}
TICKET HISTORY (key messages):
{ticket_history_summary}
Generate the article in Markdown format using the standard structure. Be precise, reproducible, and factual. Do not invent steps that were not in the resolution notes. If there is not enough information to write a useful article, respond with: INSUFFICIENT_DATA.
ANTHROPIC_MODEL key (jobs/shared/config.js / jobs/.env) — do not hard-code a model string. When this feature is built it reuses the jobs framework's single model-selection point, so a fleet-wide model swap stays one edit.POST https://kb.xzopiasecure.com/graphql
Authorization: Bearer {wiki_js_api_token}
Content-Type: application/json
{
"query": "mutation CreatePage($content: String!, $title: String!, $path: String!, $tags: [String]!) { pages { create(content: $content, description: \"\", editor: \"markdown\", isPublished: false, isPrivate: false, locale: \"en\", path: $path, tags: $tags, title: $title) { responseResult { succeeded message } page { id path } } } }",
"variables": {
"content": "<markdown content>",
"title": "<article title>",
"path": "kb/auto/<ticket-number>",
"tags": ["auto-generated", "<client-slug>", "<device-type>", "<category>"]
}
}
POST https://kb.xzopiasecure.com/graphql
Authorization: Bearer {wiki_js_api_token}
mutation UpdatePage($id: Int!) {
pages {
update(id: $id, isPublished: true) {
responseResult { succeeded }
}
}
}
Configure in ITFlow: Admin → Integrations → Webhooks → New Webhook:
The webhook handler:
When a draft article is created, the assigned tech receives:
isPublished from false to trueApproval options:
All auto-generated articles are tagged:
auto-generated — identifies AI-created articles{client-slug} — e.g. contoso-ltd for client-specific context{device-type} — workstation, server, laptop, mobile, network{category} — derived from ticket subject keyword analysisArticles are organised under the path kb/auto/{ticket-number} until reviewed.
After review, tech optionally moves to the appropriate category path.
Track monthly:
| Metric | How measured |
|---|---|
| KB articles created | Count of auto-generated drafts |
| Articles approved | Count published |
| Articles rejected | Count deleted |
| Approval rate | approved / created |
| Tickets auto-resolved via KB | Tickets closed with "KB article used" flag |
| Time saved (estimate) | approved articles × 15 min average writing time |
Monthly report: generated on the 1st of each month, emailed to simon@xzopia.com.