AutomationFlowsAI & RAG › Weekly Documentation Update & Notify

Weekly Documentation Update & Notify

Original n8n title: Weekly Documentation Update

Weekly Documentation Update. Uses executeCommand, httpRequest, emailSend. Scheduled trigger; 8 nodes.

Cron / scheduled trigger★★★★☆ complexity8 nodesExecute CommandHTTP RequestEmail Send
AI & RAG Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆ Added:

This workflow follows the Emailsend → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Weekly Documentation Update",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 2 * * 0"
            }
          ]
        }
      },
      "name": "Every Sunday at 2 AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        250,
        300
      ],
      "id": "node-1"
    },
    {
      "parameters": {
        "command": "cd /home/justin/Code/ai-rag-stack && make update-docs"
      },
      "name": "Update Documentation",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "id": "node-2"
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.exitCode}}",
              "operation": "equals",
              "value2": "0"
            }
          ]
        }
      },
      "name": "Check if Updates Found",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        650,
        300
      ],
      "id": "node-3"
    },
    {
      "parameters": {
        "functionCode": "// Parse the update output\nconst output = $input.item.json.stdout;\nconst lines = output.split('\\n');\n\n// Extract updated repos\nconst updatedRepos = [];\nlet inUpdatedSection = false;\n\nfor (const line of lines) {\n  if (line.includes('Updated repositories:')) {\n    inUpdatedSection = true;\n    continue;\n  }\n  if (inUpdatedSection && line.trim().startsWith('\u2022')) {\n    updatedRepos.push(line.trim().substring(1).trim());\n  }\n  if (line.includes('Total size:')) {\n    break;\n  }\n}\n\n// Extract counts\nconst updatedMatch = output.match(/Repositories updated: (\\d+)/);\nconst updatedCount = updatedMatch ? updatedMatch[1] : '0';\n\nreturn {\n  json: {\n    updatedCount: updatedCount,\n    updatedRepos: updatedRepos,\n    timestamp: new Date().toISOString(),\n    message: `\ud83d\udcda Documentation Update Complete!\\n\\n\u2713 ${updatedCount} repositories updated:\\n${updatedRepos.map(r => `  \u2022 ${r}`).join('\\n')}\\n\\nRe-ingestion completed successfully.`\n  }\n};"
      },
      "name": "Format Success Message",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        850,
        200
      ],
      "id": "node-4"
    },
    {
      "parameters": {
        "functionCode": "return {\n  json: {\n    message: `\u2713 Documentation Update Check Complete\\n\\nNo updates found. All documentation is current.\\n\\nNext check: Next Sunday at 2 AM`,\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "name": "Format No Updates Message",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        850,
        400
      ],
      "id": "node-5"
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK",
        "options": {},
        "bodyParametersJson": "={\n  \"text\": \"{{$json.message}}\",\n  \"username\": \"AI RAG Documentation Bot\",\n  \"icon_emoji\": \":books:\"\n}"
      },
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [
        1050,
        300
      ],
      "id": "node-6"
    },
    {
      "parameters": {
        "fromEmail": "noreply@yourdomain.com",
        "toEmail": "your-email@example.com",
        "subject": "=AI RAG Stack - Documentation Update Report",
        "text": "={{$json.message}}",
        "options": {}
      },
      "name": "Send Email Notification",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "position": [
        1050,
        450
      ],
      "id": "node-7",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// Log the update event\nconst fs = require('fs');\nconst logFile = '/home/justin/Code/ai-rag-stack/data/update-log.json';\n\nlet logs = [];\ntry {\n  const content = fs.readFileSync(logFile, 'utf8');\n  logs = JSON.parse(content);\n} catch (e) {\n  // File doesn't exist or is invalid, start fresh\n}\n\nlogs.push({\n  timestamp: $json.timestamp,\n  updatedCount: $json.updatedCount || 0,\n  updatedRepos: $json.updatedRepos || [],\n  success: true\n});\n\n// Keep only last 50 entries\nif (logs.length > 50) {\n  logs = logs.slice(-50);\n}\n\nfs.writeFileSync(logFile, JSON.stringify(logs, null, 2));\n\nreturn { json: $json };"
      },
      "name": "Log Update Event",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        1250,
        300
      ],
      "id": "node-8"
    }
  ],
  "connections": {
    "Every Sunday at 2 AM": {
      "main": [
        [
          {
            "node": "Update Documentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Documentation": {
      "main": [
        [
          {
            "node": "Check if Updates Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Updates Found": {
      "main": [
        [
          {
            "node": "Format Success Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format No Updates Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Success Message": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format No Updates Message": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Notification": {
      "main": [
        [
          {
            "node": "Log Update Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Notification": {
      "main": [
        [
          {
            "node": "Log Update Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    {
      "name": "automation",
      "id": "1"
    },
    {
      "name": "documentation",
      "id": "2"
    }
  ],
  "triggerCount": 0,
  "updatedAt": "2025-10-17T00:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Weekly Documentation Update. Uses executeCommand, httpRequest, emailSend. Scheduled trigger; 8 nodes.

Source: https://github.com/jconover/ai-rag-stack/blob/1f9622724b743e78f62757410fc4173fa7c5ad3f/n8n-workflows/weekly-doc-update.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n workflow automatically fetches monthly financial statements, normalizes the data, performs KPI calculations and trend analysis, detects anomalies, generates AI-powered executive insights and

HTTP Request, Postgres, Email Send
AI & RAG

Who is this for? Event organizers losing 80% of form starters who never finish registration and want automated follow-up emails triggered by abandonment beacons. What problem is this workflow solving?

HTTP Request, Email Send, Data Table
AI & RAG

n8n_email_diario_sem_ollama_fixed. Uses httpRequest, emailSend. Scheduled trigger; 10 nodes.

HTTP Request, Email Send
AI & RAG

Daily Email Summary Workflow. Uses httpRequest, emailSend. Scheduled trigger; 5 nodes.

HTTP Request, Email Send
AI & RAG

N8Nflow Zhtw. Uses executeCommand, readBinaryFiles, httpRequest, googleGemini. Scheduled trigger; 28 nodes.

Execute Command, Read Binary Files, HTTP Request +2