{
  "name": "Ai prompt generator workflow",
  "nodes": [
    {
      "id": "4196a5c9-1217-4216-a3dc-ca752fc7e728",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1140,
        -20
      ]
    },
    {
      "id": "bb9f2e02-a01e-4508-8ef0-37a9b9edd1ba",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -680,
        180
      ]
    },
    {
      "id": "1fa60776-44ca-4478-b3bd-28b6c8fb8355",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -520,
        180
      ]
    },
    {
      "id": "2ad0f046-36ff-4864-af2e-339763109a9c",
      "name": "BaseQuestions",
      "type": "n8n-nodes-base.form",
      "position": [
        -920,
        -20
      ]
    },
    {
      "id": "f7e1522a-3951-47fb-9e5a-5730ff3cf055",
      "name": "LoopQuestions",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        0,
        60
      ]
    },
    {
      "id": "e2b5d3c4-cb4c-4f90-93a1-10784bd8a38e",
      "name": "RelevantQuestions",
      "type": "n8n-nodes-base.form",
      "position": [
        260,
        80
      ]
    },
    {
      "id": "1618be1e-222c-45d5-a85e-d76878971f60",
      "name": "MergeUserIntent",
      "type": "n8n-nodes-base.merge",
      "position": [
        500,
        -20
      ]
    },
    {
      "id": "cbd1fbb5-a530-4695-9f7a-d3c1fe394bb9",
      "name": "PromptGenerator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        740,
        -20
      ]
    },
    {
      "id": "869e9a51-0e04-4bdc-8cf3-b35573b2953b",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        760,
        360
      ]
    },
    {
      "id": "cef87b06-dfd2-49ee-a294-75d3eabee58d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        380
      ],
      "parameters": {
        "width": 900,
        "height": 300,
        "content": "# Prompting\n\n- Constraints/Rules - [rules I need to abide by] - Defines boundaries, limitations, and guidelines for operation \n- Role/Scope - [what am I an expert of?] - Establishes the agent's purpos"
      }
    },
    {
      "id": "cb8ee56d-7d41-4f37-a640-c8aea8588707",
      "name": "RelatedQuestionAI",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -700,
        -20
      ]
    },
    {
      "id": "6e88dd2e-6aa3-46b1-ae4e-437fcdd7d909",
      "name": "SplitQuestions",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -280,
        -20
      ]
    },
    {
      "id": "d38f8848-8409-4ab5-a983-b927baa47585",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        880,
        140
      ]
    },
    {
      "id": "de385387-86c1-45a2-a750-4f4a9b70cb0c",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        960,
        360
      ]
    },
    {
      "id": "9ba8e561-6052-4d5c-915b-ebd7eeb910ad",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -160
      ],
      "parameters": {
        "width": 440,
        "height": 320,
        "content": "# Initiate and Get the Basic Questions"
      }
    },
    {
      "id": "5730302d-6e4b-435c-8e51-43d389d3f065",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -160
      ],
      "parameters": {
        "width": 380,
        "height": 500,
        "content": "# Generate Relevant Questions"
      }
    },
    {
      "id": "f8f6640c-e97a-44b1-87bc-687783541309",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -160
      ],
      "parameters": {
        "width": 960,
        "height": 500,
        "content": "# Ask question to the user"
      }
    },
    {
      "id": "cc14b692-ccf5-4ad0-9f59-1ec4eee5adfa",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        -160
      ],
      "parameters": {
        "width": 520,
        "height": 680,
        "content": "# Prompt Generator System"
      }
    },
    {
      "id": "b42d7917-d7b4-4427-8530-c541ea7c1cef",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        -160
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "# Sending the Prompt to User"
      }
    },
    {
      "id": "3e44d786-2cb2-41d8-8568-d0c50dc98c55",
      "name": "SendingPrompt",
      "type": "n8n-nodes-base.form",
      "position": [
        1280,
        -20
      ]
    },
    {
      "id": "176312e6-c5e6-4cba-ab4a-c8aeb5ee1722",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -300
      ],
      "parameters": {
        "width": 440,
        "height": 100,
        "content": "# 🚀 AI Prompt generator"
      }
    }
  ],
  "connections": {
    "BaseQuestions": {
      "main": [
        [
          {
            "node": "RelatedQuestionAI",
            "type": "main",
            "index": 0
          },
          {
            "node": "MergeUserIntent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LoopQuestions": {
      "main": [
        [
          {
            "node": "MergeUserIntent",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "RelevantQuestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitQuestions": {
      "main": [
        [
          {
            "node": "LoopQuestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MergeUserIntent": {
      "main": [
        [
          {
            "node": "PromptGenerator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PromptGenerator": {
      "main": [
        [
          {
            "node": "SendingPrompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RelatedQuestionAI": {
      "main": [
        [
          {
            "node": "SplitQuestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RelevantQuestions": {
      "main": [
        [
          {
            "node": "LoopQuestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "BaseQuestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "RelatedQuestionAI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "RelatedQuestionAI",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "PromptGenerator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "PromptGenerator",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}