{
  "name": "AI-powered auto-generate exam questions and answers from Google Docs with Gemini",
  "nodes": [
    {
      "id": "4e037d6e-93a9-4c1b-b84a-dbbcf77beaf5",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -740,
        120
      ]
    },
    {
      "id": "febc8bb7-5de7-46d6-bc23-54673089cd3d",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        900,
        240
      ]
    },
    {
      "id": "2d7e2673-6559-49b3-9ed0-29ca2c376f00",
      "name": "Create collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -440,
        -20
      ]
    },
    {
      "id": "615f26b2-930c-4b74-a35c-00b83460a7c9",
      "name": "Refresh collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -440,
        240
      ]
    },
    {
      "id": "eb34b8dd-353b-41c4-8a02-6565c3f8a7d3",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        820,
        440
      ]
    },
    {
      "id": "fb639802-e099-4857-823b-5e6d89fb3e86",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1080,
        460
      ]
    },
    {
      "id": "0af5028d-56a4-4bbc-8af0-f088e54f178b",
      "name": "Token Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
      "position": [
        1040,
        640
      ]
    },
    {
      "id": "6a10192e-4b2e-4705-865a-fa90328ba3c1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -80
      ],
      "parameters": {
        "width": 880,
        "height": 220,
        "content": "# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "1ebefe44-e5c9-43fb-b9fa-fee47b08e2c2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        180
      ],
      "parameters": {
        "width": 620,
        "height": 400,
        "content": "# STEP 2\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "88f816ae-4331-46e0-b1f9-636ec94e8bb3",
      "name": "Converto di MD",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        240
      ]
    },
    {
      "id": "5c733b2d-3d0a-4260-af88-7907907e209f",
      "name": "Get Doc",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -60,
        240
      ]
    },
    {
      "id": "5de82976-2376-4201-a5a4-dbdd6bfcb596",
      "name": "Vector Store Retriever",
      "type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
      "position": [
        1540,
        1040
      ]
    },
    {
      "id": "25bcb865-7b15-4272-81da-4ff41a4ccc60",
      "name": "Qdrant Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1440,
        1180
      ]
    },
    {
      "id": "7dacd3ac-2d25-4960-ba53-e44ae9722dca",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        560,
        240
      ]
    },
    {
      "id": "9d7561f0-5b01-4327-ab62-68a105364155",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        540,
        980
      ]
    },
    {
      "id": "4f63e896-45b1-484f-9fa1-0b488691023a",
      "name": "Item List Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserItemList",
      "position": [
        740,
        1000
      ]
    },
    {
      "id": "911e8654-dfef-4d4f-b1c8-247fe0091381",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1100,
        780
      ]
    },
    {
      "id": "987e13f8-f8c9-4bc1-9e4f-d11a5f8af4d7",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1360,
        1020
      ]
    },
    {
      "id": "c2f70831-4d5d-403b-b92d-af82205cbbdc",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        520,
        1720
      ]
    },
    {
      "id": "2f4ca583-8005-4e26-88df-ffebdc2be2f6",
      "name": "Item List Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserItemList",
      "position": [
        760,
        1720
      ]
    },
    {
      "id": "cacecdab-2f1c-4730-a7c5-d46dca32969c",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1080,
        1540
      ]
    },
    {
      "id": "2de66223-475c-4fef-aa85-13e954a5c1cc",
      "name": "Google Gemini Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1320,
        1840
      ]
    },
    {
      "id": "43058954-369c-477d-beee-ece1916aebb7",
      "name": "Qdrant Vector Store2",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1380,
        2020
      ]
    },
    {
      "id": "27dddcae-e20a-41a9-879e-ce8ae8a0347f",
      "name": "Embeddings OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1360,
        2200
      ]
    },
    {
      "id": "37d164a7-94aa-4273-b91a-8b22684a45fd",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1820,
        1820
      ]
    },
    {
      "id": "42d627b5-c033-4b2e-8ea4-fe704601b3d6",
      "name": "RAG",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        1500,
        1820
      ]
    },
    {
      "id": "ce763ef2-eb54-484b-8046-7bc008012ec5",
      "name": "Google Gemini Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1700,
        1980
      ]
    },
    {
      "id": "076994e8-0326-424e-a5c3-3d07958af0af",
      "name": "Open questions",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        560,
        780
      ]
    },
    {
      "id": "5df02a14-175f-4923-9a2f-ad4514f98c71",
      "name": "Closed questions",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        560,
        1540
      ]
    },
    {
      "id": "53c89d9a-4a69-47f7-bbf1-f523e2763741",
      "name": "Answer questions",
      "type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
      "position": [
        1400,
        800
      ]
    },
    {
      "id": "93d55b4f-2a93-474e-b431-6fd8ef868c45",
      "name": "Answer and create options",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1420,
        1560
      ]
    },
    {
      "id": "c7e55f54-d851-4786-839d-fe839659caea",
      "name": "Write open",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1880,
        800
      ]
    },
    {
      "id": "1c72d8f0-b5b7-4e10-ad03-6c8491136cdf",
      "name": "Write closed",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1860,
        1560
      ]
    },
    {
      "id": "9e5e41b1-32b2-413e-b63f-13e946857569",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1420,
        1340
      ]
    },
    {
      "id": "a87ab6ba-39b0-4c7c-be19-9003e38c9495",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        780
      ],
      "parameters": {
        "width": 620,
        "height": 180,
        "content": "# STEP 3\n\nThe chain analyzes the document and creates 10 \"open\" questions and another chain analyzes each single question and through the consultation of the vector database the optimal answer is obta"
      }
    },
    {
      "id": "ea81bccc-d204-44d7-89b2-85f7b3267e34",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        1540
      ],
      "parameters": {
        "width": 620,
        "height": 180,
        "content": "# STEP 4\n\nThe chain analyzes the document and creates 10 questions with \"closed\" answers and another chain analyzes each single question and through the consultation of the vector database the correct"
      }
    },
    {
      "id": "b510a77d-7436-4b84-b7a3-d42d75b15b59",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -360
      ],
      "parameters": {
        "width": 1120,
        "height": 200,
        "content": "## Auto-Generate Exam Questions from Google Docs with AI\n\nThis workflow automates the creation of exam questions (both open-ended and multiple-choice) from educational content stored in Google Docs, u"
      }
    }
  ],
  "connections": {
    "RAG": {
      "ai_tool": [
        [
          {
            "node": "Answer and create options",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Doc": {
      "main": [
        [
          {
            "node": "Converto di MD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write open": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write closed": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Converto di MD": {
      "main": [
        [
          {
            "node": "Closed questions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Open questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Open questions": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Answer questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Answer questions": {
      "main": [
        [
          {
            "node": "Write open",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Closed questions": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "Answer and create options",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Refresh collection": {
      "main": [
        [
          {
            "node": "Get Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store1": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Store Retriever",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store2": {
      "ai_vectorStore": [
        [
          {
            "node": "RAG",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Store Retriever": {
      "ai_retriever": [
        [
          {
            "node": "Answer questions",
            "type": "ai_retriever",
            "index": 0
          }
        ]
      ]
    },
    "Item List Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Open questions",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Open questions",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Item List Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Closed questions",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Answer and create options",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Answer and create options": {
      "main": [
        [
          {
            "node": "Write closed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Answer questions",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Closed questions",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Answer and create options",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "RAG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Refresh collection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}