{
  "name": "Generate, review, and optimize code with Cursor AI, GitHub, Google, and Slack",
  "nodes": [
    {
      "id": "5c9bbdde-f7ce-40e4-b607-a3c0965ad4aa",
      "name": "Overview & Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -656
      ],
      "parameters": {
        "width": 1180,
        "height": 1676,
        "content": "## 💻 n8n Cursor AI Coding Workflow\n### Automatically Generate, Review & Optimize Code\n\n---\n\n### 📋 Description\nA smart, fully automated coding pipeline built inside n8n that leverages Cursor AI to writ"
      }
    },
    {
      "id": "a3988c87-b6a7-4046-b1ba-3b2cd7aa0a47",
      "name": "1. Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -120
      ],
      "parameters": {
        "width": 432,
        "height": 760,
        "content": "## 1. Trigger & Task Input\nWebhook or schedule → receive coding task & prepare config"
      }
    },
    {
      "id": "cae6733d-5fa7-401d-bd9f-91655c363c57",
      "name": "2. Classification Phase",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        -128
      ],
      "parameters": {
        "width": 580,
        "height": 740,
        "content": "## 2. Task Classification\nAI classifies task type: Generate / Review / Refactor / Optimize"
      }
    },
    {
      "id": "f116f1ab-cec6-400e-b9ef-bbf65ac28c67",
      "name": "3. Cursor Phase",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        -112
      ],
      "parameters": {
        "width": 392,
        "height": 720,
        "content": "## 3. Cursor AI Code Generation\nCursor writes, reviews & optimizes code via API"
      }
    },
    {
      "id": "aa0268aa-08d1-4c5d-8dea-4ce14ab35bf5",
      "name": "4. Quality Gate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2816,
        -80
      ],
      "parameters": {
        "width": 180,
        "height": 700,
        "content": "## 4. Quality Gate\nScore check → auto-optimize if below threshold"
      }
    },
    {
      "id": "98cc9340-7e70-44b4-a712-e5c5fa96e5af",
      "name": "5. Output Phase",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3026,
        -56
      ],
      "parameters": {
        "width": 892,
        "height": 696,
        "content": "## 5. Commit, Store, Log & Notify\nGitHub commit → Drive → Sheets → Slack"
      }
    },
    {
      "id": "2578ef58-b055-495b-af01-2d8624a56e43",
      "name": "Webhook: Receive Coding Task",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1296,
        288
      ]
    },
    {
      "id": "faf52016-8210-4539-a54a-a6573e9d3bf5",
      "name": "Daily Batch (fallback)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1296,
        480
      ]
    },
    {
      "id": "d3afb077-06a9-4533-b4c7-95d7d07a577a",
      "name": "Set Task Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        384
      ]
    },
    {
      "id": "cbcc83b3-93a0-4f99-9045-c3761a2d1e37",
      "name": "Parse Classification",
      "type": "n8n-nodes-base.code",
      "position": [
        2192,
        384
      ]
    },
    {
      "id": "1af8f58a-b550-45f7-a14a-f6d2997daf6f",
      "name": "Cursor AI: Generate Code",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2416,
        384
      ]
    },
    {
      "id": "7b7a6bdc-e1e2-4834-93ad-32a6bf858116",
      "name": "Wait: Processing Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        1968,
        384
      ]
    },
    {
      "id": "ba248e93-dfb2-41cf-be6b-5344e9e3cdf1",
      "name": "Cursor AI: Code Review",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2640,
        384
      ]
    },
    {
      "id": "1f68cf17-87ca-467a-94c5-f3f979985652",
      "name": "Quality Score OK?",
      "type": "n8n-nodes-base.if",
      "position": [
        2864,
        384
      ]
    },
    {
      "id": "b07466db-4658-4024-bc88-75344a9856e6",
      "name": "Cursor AI: Optimize Code",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3088,
        480
      ]
    },
    {
      "id": "0856723d-aff6-44af-ba12-6d797c5c5c14",
      "name": "GitHub: Commit Code",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3088,
        288
      ]
    },
    {
      "id": "740d1cb8-066b-4597-a8a4-22e72d355d9c",
      "name": "Google Drive: Save Report",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3312,
        288
      ]
    },
    {
      "id": "d0393c2b-2e3c-426f-913e-d13a5638fe43",
      "name": "Google Sheets: Log Result",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3536,
        288
      ]
    },
    {
      "id": "17de541a-94bd-4374-9b03-d7a4c8874872",
      "name": "Notify Slack: Success",
      "type": "n8n-nodes-base.slack",
      "position": [
        3760,
        288
      ]
    },
    {
      "id": "023f07b7-79c7-47b6-baf6-aa8a845f2a4c",
      "name": "Notify Slack: Optimized",
      "type": "n8n-nodes-base.slack",
      "position": [
        3312,
        480
      ]
    },
    {
      "id": "bc1706f2-acd7-4a82-8e1a-dd79340b24ce",
      "name": "Create a conversation",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1744,
        384
      ]
    }
  ],
  "connections": {
    "Set Task Config": {
      "main": [
        [
          {
            "node": "Create a conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Score OK?": {
      "main": [
        [
          {
            "node": "GitHub: Commit Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cursor AI: Optimize Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Commit Code": {
      "main": [
        [
          {
            "node": "Google Drive: Save Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Classification": {
      "main": [
        [
          {
            "node": "Cursor AI: Generate Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a conversation": {
      "main": [
        [
          {
            "node": "Wait: Processing Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cursor AI: Code Review": {
      "main": [
        [
          {
            "node": "Quality Score OK?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Batch (fallback)": {
      "main": [
        [
          {
            "node": "Set Task Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait: Processing Delay": {
      "main": [
        [
          {
            "node": "Parse Classification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cursor AI: Generate Code": {
      "main": [
        [
          {
            "node": "Cursor AI: Code Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cursor AI: Optimize Code": {
      "main": [
        [
          {
            "node": "Notify Slack: Optimized",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Save Report": {
      "main": [
        [
          {
            "node": "Google Sheets: Log Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Log Result": {
      "main": [
        [
          {
            "node": "Notify Slack: Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Receive Coding Task": {
      "main": [
        [
          {
            "node": "Set Task Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}