{
  "name": "🤖 AI-powered prompt enhancement assistant using Google Sheets",
  "nodes": [
    {
      "id": "5cba784b-170f-4aa5-861c-1af04f5ecced",
      "name": "PrepareForFirstGen - OPM",
      "type": "n8n-nodes-base.set",
      "position": [
        256,
        832
      ]
    },
    {
      "id": "5b32a6db-37a2-4543-893b-6b121f0ac6b9",
      "name": "ChatHistory - PM",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        304,
        1152
      ]
    },
    {
      "id": "05a52264-3b2e-4496-b00d-f99fcaccc7e7",
      "name": "Qwen3 - PM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        32,
        1152
      ]
    },
    {
      "id": "2c9db4c8-d635-47ba-8104-f487aa1228d8",
      "name": "Gemini - PM",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        160,
        1152
      ]
    },
    {
      "id": "5efd00fe-369b-4a15-a1d9-261596e59c1e",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        256,
        640
      ]
    },
    {
      "id": "468c52f0-a7f3-4a20-93b4-a5de341a3163",
      "name": "PromptModifer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        80,
        1008
      ]
    },
    {
      "id": "f938cf7e-27c3-42d3-80a8-28dc2450a40e",
      "name": "Parse AI Chat",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        1008
      ]
    },
    {
      "id": "ab9752f1-c69a-43f7-ac14-1a57294d0b6f",
      "name": "ExecutionController",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        832
      ]
    },
    {
      "id": "7f7a76cd-d4a9-4e5f-a800-966ea30c5cc3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        48
      ],
      "parameters": {
        "width": 624,
        "height": 512,
        "content": "## 🤖 AI-Powered Prompt Enhancement Assistant using Google Sheets\n### ⚡ Quick Demo\n**Input**: \"Create a marketing strategy\"  \n**Output**: \"Develop a comprehensive digital marketing strategy for a [busi"
      }
    },
    {
      "id": "6d1e6e53-2ca4-4c58-bc99-14adcf38978c",
      "name": "Send Success Message To User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        496,
        640
      ]
    },
    {
      "id": "0ea36662-9d9f-4fe2-97e3-a4d22b10a518",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        592
      ],
      "parameters": {
        "width": 624,
        "height": 736,
        "content": "## 🛠️ STEP-BY-STEP SETUP GUIDE\n### 1️⃣ Create Google Sheets (5 minutes)\nCreate a new Google Spreadsheet with 2 tabs:\n\n**📊Main Sheet** (Input prompts):\n- Columns: Original Prompt ID | Model | Original "
      }
    },
    {
      "id": "afeb8497-4ec5-4891-8a9b-17305058c33c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 624,
        "height": 512,
        "content": "## 🔄 WORKFLOW FLOW EXPLAINED\n### 📥 **INPUT STAGE**\n**Google Sheets Trigger** → **Loop Over Items** → **ProcessController**\n- Processes one prompt at a time to prevent overload\n- Sets up global variabl"
      }
    },
    {
      "id": "d4e42dd5-59b6-4599-b572-deb9b2ef078d",
      "name": "Finalize ModifiedPrompt DataModel",
      "type": "n8n-nodes-base.set",
      "position": [
        736,
        816
      ]
    },
    {
      "id": "3dc0613c-39e1-4034-bffb-a797090e8cd7",
      "name": "Send Exceed Limits Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        736,
        1136
      ]
    },
    {
      "id": "0a9c62fe-e25a-4eba-94f5-21fe0210bef2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        544
      ],
      "parameters": {
        "width": 1152,
        "height": 784,
        "content": "## Main Workflow"
      }
    },
    {
      "id": "f01a9c3a-5a44-45b8-b762-25fabf960cb0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        480
      ],
      "parameters": {
        "width": 608,
        "height": 848,
        "content": "## 🔧 CUSTOMIZATION OPTIONS\n### 🎨 **Modify AI Behavior**\n- **Change AI prompts**: Edit system messages in ExecutionController nodes\n- **Custom enhancement logic**: Update Code nodes with your rules\n###"
      }
    },
    {
      "id": "6bc3e24c-5a3d-4aa3-a53e-3a9f106bd72d",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        576,
        992
      ]
    },
    {
      "id": "e9fd333b-8539-44f4-83a7-124ada5cda92",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        128
      ],
      "parameters": {
        "width": 496,
        "height": 384,
        "content": "## 🙏 Thank You for Trying This Workflow\n\nYour time and trust mean a lot, I truly appreciate you giving Prompt Refiner a try.\n\nYour feedback is the key to making this project better, more effective, an"
      }
    },
    {
      "id": "92aaabd8-5ac0-487a-a0c9-ab0da3c9eca4",
      "name": "GetNewPrompt",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        80,
        640
      ]
    },
    {
      "id": "58c627e9-93ed-418a-88bd-4fece09a5098",
      "name": "Workflow Complete",
      "type": "n8n-nodes-base.noOp",
      "position": [
        928,
        992
      ]
    },
    {
      "id": "a341fc41-09ac-476b-8e48-cee26225d7eb",
      "name": "Exit By Error",
      "type": "n8n-nodes-base.noOp",
      "position": [
        928,
        1136
      ]
    },
    {
      "id": "fc51bff6-74a6-40bc-819d-a78870b639e8",
      "name": "Successfully Sent Message To User",
      "type": "n8n-nodes-base.noOp",
      "position": [
        720,
        640
      ]
    },
    {
      "id": "ec7116f8-87f8-472d-a3d7-b9e6b1a851d1",
      "name": "Create/Upate Modified Prompt",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        928,
        816
      ]
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Finalize ModifiedPrompt DataModel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ExecutionController",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Exceed Limits Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qwen3 - PM": {
      "ai_languageModel": [
        [
          {
            "node": "PromptModifer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gemini - PM": {
      "ai_languageModel": [
        [
          {
            "node": "PromptModifer",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "GetNewPrompt": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Chat": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PromptModifer": {
      "main": [
        [
          {
            "node": "Parse AI Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Send Success Message To User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ExecutionController",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ChatHistory - PM": {
      "ai_memory": [
        [
          {
            "node": "PromptModifer",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "ExecutionController": {
      "main": [
        [
          {
            "node": "PrepareForFirstGen - OPM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PrepareForFirstGen - OPM": {
      "main": [
        [
          {
            "node": "PromptModifer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Exceed Limits Error": {
      "main": [
        [
          {
            "node": "Exit By Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create/Upate Modified Prompt": {
      "main": [
        [
          {
            "node": "Workflow Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Success Message To User": {
      "main": [
        [
          {
            "node": "Successfully Sent Message To User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finalize ModifiedPrompt DataModel": {
      "main": [
        [
          {
            "node": "Create/Upate Modified Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}