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) or docuWriterTrigger (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:
    1. Filter for refs/heads/main
    2. List → Filter code files
    3. Download → Prepare source via custom JavaScript
    4. Generate Documentation with the docuWriter node
    5. Commit back to the repository
    6. Notify team via Slack
{
  "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 (event generation.created)
  • Flow Highlights:
    1. Webhook filters for Documentation events
    2. Fetch Generation Details via docuWriter node
    3. Save HTML content to Google Drive
{
  "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:
    1. Filter for code extensions (e.g., .js, .ts)
    2. Download file content
    3. Generate Documentation, Comments, UML Diagrams
    4. Aggregate and Save back, plus notifications
{
  "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:
    1. Search Notion DB for active projects
    2. Parse project metadata
    3. List repo files via GitHub node
    4. Filter → DocuWrite for each code file
    5. 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:
    1. Filter for git.push on refs/heads/main
    2. Extract repo info via custom JS
    3. List Repository FilesFilter Code
    4. Download, Prepare, →docuWriter nodes (Docs, UML, Tests)
    5. Aggregate, Create Work Item, Notify via Slack & Email
{
  "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:
    1. Parse /docuwriter command
    2. Route by action: github, notion, analyze, or help
    3. Invoke appropriate docuWriter or docuWriterTrigger nodes
    4. Respond back to Slack with generated docs or analysis

This demonstrates a unified approach to multi-platform doc automation .


GitLab Merge Request Documentation & Analysis 🏷️

Upon opening a Merge Request, this workflow:

  1. Triggers on merge_requests events
  2. Filters for newly opened MRs
  3. Retrieves commits and changed files
  4. Prepares source code
  5. Generates documentation, tests, and optimization suggestions
  6. 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.