{
  "name": "Avoid Asking Redundant Questions with Dynamically Generated Forms using OpenAI ",
  "nodes": [
    {
      "id": "5893c244-22b0-4699-a286-0ce121ccc427",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -340,
        240
      ]
    },
    {
      "id": "e7e333d4-42e5-4e6a-b78b-a3a45c31f37c",
      "name": "Clarification Questions",
      "type": "n8n-nodes-base.form",
      "position": [
        1100,
        -60
      ]
    },
    {
      "id": "4b2bbc17-0e74-499d-ac6f-6c94ce3eb5ee",
      "name": "Get Basic Information",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -880,
        -60
      ]
    },
    {
      "id": "b2eb9da9-571d-44ee-9944-a787f8d6cd50",
      "name": "Get Business Overview",
      "type": "n8n-nodes-base.form",
      "position": [
        -640,
        -60
      ]
    },
    {
      "id": "93c96c45-9512-46c2-9fe0-c4558b93e9d6",
      "name": "End Form",
      "type": "n8n-nodes-base.form",
      "position": [
        1320,
        -60
      ]
    },
    {
      "id": "123b688b-adae-4fe2-85cf-fc066175d96f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -120,
        240
      ]
    },
    {
      "id": "3a2d86a3-62ed-4003-a012-bfdabc9eafc8",
      "name": "Remove Already Answered Questions",
      "type": "n8n-nodes-base.filter",
      "position": [
        340,
        -60
      ]
    },
    {
      "id": "a97d53ae-1649-4809-8793-5e4a815016cb",
      "name": "Analyse Response",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -280,
        -60
      ]
    },
    {
      "id": "12b8cc80-ff5e-4ebd-a72d-2629f743355e",
      "name": "Split Out Analysis",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        120,
        -60
      ]
    },
    {
      "id": "c28929cf-7590-4e32-be20-f9065920ed80",
      "name": "Prepare For Form Generation",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        -60
      ]
    },
    {
      "id": "33d55396-e716-41c5-bf25-d0bfcfadf167",
      "name": "Aggregate For Form Generation",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        840,
        -60
      ]
    },
    {
      "id": "15b39119-08d6-45bf-9323-09fa5b59a64e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        -300
      ],
      "parameters": {
        "width": 700,
        "height": 780,
        "content": "# Avoid Asking Redundant Questions with Dynamically Generated Forms using OpenAI \n## Target Audience\nThis workflow has been built for those who require a form to capture as much data as possible as we"
      }
    },
    {
      "id": "e9270776-97f0-4aa4-8797-92a235f7760e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -300
      ],
      "parameters": {
        "width": 480,
        "height": 140,
        "content": "## Setup\n1. Add your **OpenAI** credentials\n2. Go to the **Get Basic Information** node and click **Test Step**\n3. Complete the form to test the generic use case\n4. Modify the prompt in **Analyse Resp"
      }
    },
    {
      "id": "6db4d121-f08a-4509-82fd-5d91d1dcbc82",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -140
      ],
      "parameters": {
        "width": 480,
        "height": 240,
        "content": "## 1. Initial Form Pages\n\n"
      }
    },
    {
      "id": "3ecaaf11-8bc7-415e-8eb3-245f7bcedda7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -220
      ],
      "parameters": {
        "width": 480,
        "height": 620,
        "content": "## 2. Analyse Response\n\n"
      }
    },
    {
      "id": "1e2e100e-ac64-45b1-aa3b-318996783a79",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        140
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "### Modification\nReplace this sub-node \nto use a different language model"
      }
    },
    {
      "id": "e6f92fbb-7f41-4e02-9316-06e7480c0306",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -160
      ],
      "parameters": {
        "width": 300,
        "height": 240,
        "content": "### Modification\nModify the prompt to suit your use case"
      }
    },
    {
      "id": "1bcca0c9-a4b3-493f-a188-7ecc00fec36e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -140
      ],
      "parameters": {
        "width": 920,
        "height": 260,
        "content": "## 3. Clean Up Analysis\n\n"
      }
    },
    {
      "id": "ffcee0f4-364b-46a5-9deb-cbd005a3b6fc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -140
      ],
      "parameters": {
        "width": 520,
        "height": 260,
        "content": "## 4. Generate Final Form Page & End Form\n\n\n"
      }
    }
  ],
  "connections": {
    "End Form": {
      "main": [
        []
      ]
    },
    "Analyse Response": {
      "main": [
        [
          {
            "node": "Split Out Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyse Response",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Analysis": {
      "main": [
        [
          {
            "node": "Remove Already Answered Questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Basic Information": {
      "main": [
        [
          {
            "node": "Get Business Overview",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Business Overview": {
      "main": [
        [
          {
            "node": "Analyse Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clarification Questions": {
      "main": [
        [
          {
            "node": "End Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyse Response",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Prepare For Form Generation": {
      "main": [
        [
          {
            "node": "Aggregate For Form Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate For Form Generation": {
      "main": [
        [
          {
            "node": "Clarification Questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Already Answered Questions": {
      "main": [
        [
          {
            "node": "Prepare For Form Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}