{
  "name": "Proofread markdown blog posts with Gemini, Groq fallback and GitHub auto-commit",
  "nodes": [
    {
      "id": "33bdd4e6-8838-40e2-b496-09548ba8de69",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        544,
        1444
      ]
    },
    {
      "id": "4f99d9fb-b157-4032-86e3-764320fecafb",
      "name": "Has Issues?",
      "type": "n8n-nodes-base.if",
      "position": [
        2016,
        1444
      ]
    },
    {
      "id": "9d36d265-9c5f-496a-8dcc-6108117f5cb0",
      "name": "Edits Applied?",
      "type": "n8n-nodes-base.if",
      "position": [
        3040,
        1244
      ]
    },
    {
      "id": "84feed8e-8ab1-403d-ac19-c5eaccedd6ab",
      "name": "Fetch Blog Post from GitHub",
      "type": "n8n-nodes-base.github",
      "position": [
        992,
        1444
      ]
    },
    {
      "id": "5a646f46-5b55-475d-a8cf-7b16d88b67f6",
      "name": "Decode Base64 & Add Line Numbers",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        1444
      ]
    },
    {
      "id": "c0c3c967-0d82-4d91-bcdd-3a3b651b9f7f",
      "name": "QA Agent - Analyze Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1440,
        1444
      ]
    },
    {
      "id": "d0714374-0aa1-43c7-96e7-158188715b7f",
      "name": "QA Agent LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1448,
        1668
      ]
    },
    {
      "id": "bec92205-1dfc-476d-bf30-3b25584ff92f",
      "name": "Parse QA Issues JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        1792,
        1444
      ]
    },
    {
      "id": "4ac7a9f7-a656-4c5b-baf3-e7f09ab00af9",
      "name": "Editor Agent - Generate Edit Ops",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2240,
        1140
      ]
    },
    {
      "id": "7e2ccc24-e5de-4bc4-b3a8-5c35a6018c71",
      "name": "Editor Agent LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2248,
        1364
      ]
    },
    {
      "id": "1946202a-a925-4fc4-a2f0-f98e09f96aa7",
      "name": "Parse Edit Operations JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        2592,
        1244
      ]
    },
    {
      "id": "c83f964b-4ca9-4666-9d26-a89cc99b0700",
      "name": "Apply Line-by-Line Edits",
      "type": "n8n-nodes-base.code",
      "position": [
        2816,
        1244
      ]
    },
    {
      "id": "21eda142-611b-4d86-86aa-862dae40b7aa",
      "name": "Commit Updated File to GitHub",
      "type": "n8n-nodes-base.github",
      "position": [
        3264,
        1296
      ]
    },
    {
      "id": "02c73e7f-f250-42f7-a0ac-2f5bba509353",
      "name": "Format QA Report",
      "type": "n8n-nodes-base.code",
      "position": [
        3264,
        1104
      ]
    },
    {
      "id": "50cff18d-b1a2-4863-aa60-5777652e116d",
      "name": "Save QA Report to GitHub",
      "type": "n8n-nodes-base.github",
      "position": [
        3488,
        1104
      ]
    },
    {
      "id": "67756c95-93a2-4a75-9ba6-d0d292bb6de3",
      "name": "Save QA Report to GitHub Without Issues",
      "type": "n8n-nodes-base.github",
      "position": [
        2624,
        1664
      ]
    },
    {
      "id": "4290553e-f274-4fe5-bac2-0938fd1076cc",
      "name": "Format Clean Report",
      "type": "n8n-nodes-base.code",
      "position": [
        2336,
        1664
      ]
    },
    {
      "id": "6bcfdc7f-1a6e-4e93-bd98-a79bcde46999",
      "name": "Format Failure Report",
      "type": "n8n-nodes-base.code",
      "position": [
        3264,
        1488
      ]
    },
    {
      "id": "64fe16da-4204-4614-a4c6-cea41a45cea9",
      "name": "Create a file",
      "type": "n8n-nodes-base.github",
      "position": [
        3488,
        1488
      ]
    },
    {
      "id": "04705019-90b0-4a47-8856-8576d30923be",
      "name": "Fallback Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        1576,
        1668
      ]
    },
    {
      "id": "a85b931f-f5e2-4772-9f60-cb756aa6e7f9",
      "name": "Fallback Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        2376,
        1364
      ]
    },
    {
      "id": "5a71abda-d41c-4651-b945-2e94f252d9dd",
      "name": "Github Config",
      "type": "n8n-nodes-base.set",
      "position": [
        768,
        1444
      ]
    },
    {
      "id": "bac9b915-2374-47ed-a3dd-f0b3b6cd008b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        1088
      ],
      "parameters": {
        "width": 480,
        "height": 832,
        "content": "## AI Automated Markdown Blog QA\n\n### How it works\n\n1.  Fetch: A manual trigger fetches your target markdown file from GitHub.\n\n2. Prep: The file is decoded and numbered for the AI.\n\n3. Agent 1 (Analy"
      }
    },
    {
      "id": "387ddb16-cabc-400a-9cf3-8c5b9369163c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        1360
      ],
      "parameters": {
        "width": 912,
        "height": 304,
        "content": "## Get blog post"
      }
    },
    {
      "id": "26baa3ac-0294-47bf-be5f-224c15366366",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1360
      ],
      "parameters": {
        "width": 736,
        "height": 464,
        "content": "## Analyze content\n"
      }
    },
    {
      "id": "3a88ad17-39f9-4563-9aa8-e410142ce4cd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2192,
        1040
      ],
      "parameters": {
        "width": 976,
        "height": 480,
        "content": "## Generate & apply edits\n"
      }
    },
    {
      "id": "20e71b57-af0b-491e-811f-302837aca8d9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        1024
      ],
      "parameters": {
        "width": 512,
        "height": 720,
        "content": "## Update repository"
      }
    },
    {
      "id": "a30e6809-8331-4a78-bb9a-5dd3a0126120",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        1584
      ],
      "parameters": {
        "width": 560,
        "height": 288,
        "content": "## Path: No Issues Found"
      }
    }
  ],
  "connections": {
    "Has Issues?": {
      "main": [
        [
          {
            "node": "Editor Agent - Generate Edit Ops",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Clean Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QA Agent LLM": {
      "ai_languageModel": [
        [
          {
            "node": "QA Agent - Analyze Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Github Config": {
      "main": [
        [
          {
            "node": "Fetch Blog Post from GitHub",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edits Applied?": {
      "main": [
        [
          {
            "node": "Commit Updated File to GitHub",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format QA Report",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Failure Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fallback Model": {
      "ai_languageModel": [
        [
          {
            "node": "Editor Agent - Generate Edit Ops",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Editor Agent LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Editor Agent - Generate Edit Ops",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Format QA Report": {
      "main": [
        [
          {
            "node": "Save QA Report to GitHub",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fallback Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "QA Agent - Analyze Content",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Format Clean Report": {
      "main": [
        [
          {
            "node": "Save QA Report to GitHub Without Issues",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse QA Issues JSON": {
      "main": [
        [
          {
            "node": "Has Issues?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Failure Report": {
      "main": [
        [
          {
            "node": "Create a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Line-by-Line Edits": {
      "main": [
        [
          {
            "node": "Edits Applied?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Edit Operations JSON": {
      "main": [
        [
          {
            "node": "Apply Line-by-Line Edits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QA Agent - Analyze Content": {
      "main": [
        [
          {
            "node": "Parse QA Issues JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Blog Post from GitHub": {
      "main": [
        [
          {
            "node": "Decode Base64 & Add Line Numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decode Base64 & Add Line Numbers": {
      "main": [
        [
          {
            "node": "QA Agent - Analyze Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Editor Agent - Generate Edit Ops": {
      "main": [
        [
          {
            "node": "Parse Edit Operations JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Github Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}