Project structure – Examples
The examples/workflows directory showcases end-to-end n8n workflows integrating DocuWriter.ai’s action and trigger nodes across popular platforms. Each example demonstrates how to:
- Listen for events (webhooks, file changes, schedules)
- Fetch or filter source code
- Invoke the
docuWriter(n8n-nodes-docuwriter-ai.docuWriter) ordocuWriterTrigger(n8n-nodes-docuwriter-ai.docuWriterTrigger) nodes - Handle the generated documentation, tests, comments, or diagrams
Below is an overview of all provided workflows. Use them as templates or inspiration for your own automation.
| 🌐 Platform | Workflow Name | Filename | Trigger Node | DocuWriter Node |
|---|---|---|---|---|
| GitHub | GitHub Push Documentation | github-push-documentation.json |
GitHub Push Trigger | docuWriter (Documentation) |
| Google Drive & DocuWriter | Generation Created → Google Docs Sync | generation-created-webhook.json |
DocuWriter Generation Trigger | docuWriter (Fetch Details) |
| Dropbox | Dropbox File Monitor & Documentation | dropbox-file-monitor-documentation.json |
Dropbox Trigger / Local File Trigger | docuWriter (Documentation) |
| Notion | Notion Documentation Automation | notion-documentation-automation.json |
Cron / Notion Database Search | docuWriter (Documentation) |
| Azure DevOps | Azure DevOps Pipeline Documentation & Analysis | azure-devops-pipeline-documentation.json |
Webhook + If (push) | docuWriter (Docs, UML, Tests) |
| Bitbucket / Multi-Platform | Multi-Platform Team Collaboration & Documentation | multi-platform-team-collaboration.json |
Slack Command Webhook | docuWriter (various) |
| GitLab | GitLab MR Documentation & Analysis | gitlab-merge-request-documentation.json |
GitLab MR Trigger | docuWriter (Docs, Tests) |
GitHub Push Documentation 📖
Automatically generates and commits documentation on every push to the main branch.
- Trigger:
n8n-nodes-base.githubWebhook - Flow Highlights:
- Filter for
refs/heads/main - List → Filter code files
- Download → Prepare source via custom JavaScript
- Generate Documentation with the
docuWriternode - Commit back to the repository
- Notify team via Slack
- Filter for
{
"name": "Generate Documentation",
"type": "n8n-nodes-docuwriter-ai.docuWriter",
"parameters": {
"resource": "codeDocumentation",
"operation": "generate",
"sourceCode": "={{$json.sourceCode}}",
"filename": "={{$json.filename}}",
"mode": "Accurate"
}
}
This node produces ready-to-publish Markdown docs and returns them in $.json.data.generated .
Google Drive Sync via Generation Webhook 📑
Listens for DocuWriter.ai generation events, then saves documentation to Google Docs.
- Trigger:
n8n-nodes-docuwriter-ai.docuWriterTrigger(eventgeneration.created) - Flow Highlights:
- Webhook filters for
Documentationevents - Fetch Generation Details via
docuWriternode - Save HTML content to Google Drive
- Webhook filters for
{
"name": "Generation Created",
"type": "n8n-nodes-docuwriter-ai.docuWriterTrigger",
"parameters": {
"event": "generation.created",
"generationTypes": ["Documentation"]
}
}
{
"name": "Fetch Generation Details",
"type": "n8n-nodes-docuwriter-ai.docuWriter",
"parameters": {
"resource": "generations",
"operation": "get",
"generationId": "={{$node['Generation Created'].json['data']['id']}}"
}
}
Saves the rich HTML to Drive with n8n-nodes-base.googleDrive .
Dropbox File Monitor & Documentation 📂
Watches a Dropbox folder for new code files and auto-generates inline documentation, comments, and UML diagrams.
- Trigger:
n8n-nodes-base.dropbox(file event) - Flow Highlights:
- Filter for code extensions (e.g.,
.js,.ts) - Download file content
- Generate Documentation, Comments, UML Diagrams
- Aggregate and Save back, plus notifications
- Filter for code extensions (e.g.,
{
"name": "Generate Documentation",
"type": "n8n-nodes-docuwriter-ai.docuWriter",
"parameters": {
"generationType": "Documentation",
"sourceCode": "={{ $json.sourceCode }}",
"mode": "Accurate"
}
}
This pattern appears in the Dropbox workflow to create maintainable, commented code .
Notion Documentation Automation 📒
Schedules weekly scans of a Notion database to generate or update project documentation pages.
- Trigger:
n8n-nodes-base.cron(weekly) - Flow Highlights:
- Search Notion DB for active projects
- Parse project metadata
- List repo files via GitHub node
- Filter → DocuWrite for each code file
- Append generated content back to Notion
{
"name": "Generate Notion Documentation",
"type": "n8n-nodes-docuwriter-ai.docuWriter",
"parameters": {
"generationType": "Documentation",
"sourceCode": "={{ $json.notion.codeContent }}",
"mode": "Accurate"
}
}
Blocks are appended to the page with n8n’s Notion node .
Azure DevOps Pipeline Documentation & Analysis ☁️
On each push to main, this workflow generates:
- Technical documentation
- UML diagrams
- Test strategies
…then creates an Azure DevOps work item and notifies stakeholders.
- Trigger:
n8n-nodes-base.webhook+n8n-nodes-base.if - Flow Highlights:
- Filter for
git.pushonrefs/heads/main - Extract repo info via custom JS
- List Repository Files → Filter Code
- Download, Prepare, → 3×
docuWriternodes (Docs, UML, Tests) - Aggregate, Create Work Item, Notify via Slack & Email
- Filter for
{
"name": "Generate Documentation",
"type": "docuWriter-ai",
"parameters": {
"generationType": "Documentation",
"sourceCode": "={{ $json.sourceCode }}",
"mode": "Accurate"
}
}
This orchestration ensures comprehensive pipelines integration .
Bitbucket & Multi-Platform Team Collaboration 🤝
A Slack slash-command based workflow that supports GitHub, Bitbucket, Notion, and Code Analysis actions from a single endpoint:
- Trigger:
n8n-nodes-base.webhook(Slack) - Flow Highlights:
- Parse
/docuwritercommand - Route by action:
github,notion,analyze, orhelp - Invoke appropriate
docuWriterordocuWriterTriggernodes - Respond back to Slack with generated docs or analysis
- Parse
This demonstrates a unified approach to multi-platform doc automation .
GitLab Merge Request Documentation & Analysis 🏷️
Upon opening a Merge Request, this workflow:
- Triggers on
merge_requestsevents - Filters for newly opened MRs
- Retrieves commits and changed files
- Prepares source code
- Generates documentation, tests, and optimization suggestions
- Posts a rich MR comment
{
"name": "GitLab MR Trigger",
"type": "n8n-nodes-base.gitlabTrigger",
"parameters": {
"events": ["merge_requests"],
"authentication": "accessToken"
}
}
{
"name": "Filter MR Opened",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"string": [{ "value1":"={{$json.object_attributes.action}}","operation":"equal","value2":"open" }]
}
}
}
Extends this flow with DocuWriter nodes to enhance code reviews .
flowchart TD
subgraph Generic DocuWriter.ai Workflow
A[Trigger Event] --> B{Filter & Select Files}
B --> C[Prepare Source Code]
C --> D[DocuWriter.ai Node]
D --> E[Save / Comment / Notify]
end
Each example can be imported directly into n8n. Simply copy the JSON, adjust credentials, and enjoy AI-powered automation tailored to your platform of choice.
Updated