{
  "name": "Convert PDF content to an MCQ question bank in Excel with Google Gemini",
  "nodes": [
    {
      "id": "2f456a67-94d0-4289-881b-318c8559e34e",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -48,
        0
      ]
    },
    {
      "id": "70557ae2-2de7-44f6-a4e5-160c9bb1906d",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -48,
        320
      ]
    },
    {
      "id": "484c015d-6206-4ea0-ab07-090ba7945494",
      "name": "Cleaner",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        320
      ]
    },
    {
      "id": "28e26bf2-0542-4322-ae5c-06034a48cdcc",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        448,
        320
      ]
    },
    {
      "id": "f223631f-f07a-4e7d-a345-896353e07951",
      "name": "Validate Parameter & PDF",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        0
      ]
    },
    {
      "id": "f3faab77-7a43-4d9e-9141-3782b64c1cb6",
      "name": "Condition Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        336,
        0
      ]
    },
    {
      "id": "17dbf178-c2e1-4f8b-9fe8-81789ef13bfa",
      "name": "Chunk",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        320
      ]
    },
    {
      "id": "d3ce97a7-050c-449b-a9f6-17cc7a92ff7d",
      "name": "Respond Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        576,
        -48
      ]
    },
    {
      "id": "545f7d33-00e1-4df6-8bf3-ceb94353c57f",
      "name": "Respond Failed",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        576,
        80
      ]
    },
    {
      "id": "7b949f4e-24f8-4a32-bb22-5ce98f77de82",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -48,
        592
      ]
    },
    {
      "id": "7de37f63-00e9-45f5-aecf-5e75e54f462b",
      "name": "Send a document",
      "type": "n8n-nodes-base.telegram",
      "position": [
        528,
        592
      ]
    },
    {
      "id": "bcb6ec1a-7919-4a2e-aa95-767d505638b6",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        752,
        592
      ]
    },
    {
      "id": "d234ebf3-1133-4aed-9244-64acd31a76a0",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        160,
        592
      ]
    },
    {
      "id": "ddb5d5d2-f9ab-4de4-a846-e7346f6d3b78",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -112
      ],
      "parameters": {
        "width": 848,
        "height": 320,
        "content": "## 1. Input & File Validation\nHandles incoming PDF, validates file size (max 5MB) and ensures file exists before processing."
      }
    },
    {
      "id": "d33cdb89-1926-473b-bc30-df2362545e23",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        224
      ],
      "parameters": {
        "width": 448,
        "height": 240,
        "content": "## 2. PDF Text Extraction & Chunking\nExtracts text from PDF and splits it into manageable chunks for AI processing."
      }
    },
    {
      "id": "b959faeb-325c-4cfe-99bc-b7aa9f9371ba",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        224
      ],
      "parameters": {
        "width": 608,
        "height": 240,
        "content": "## 3. AI MCQ Generation (Google Gemini)\nGenerates structured multiple choice questions using AI and cleans the output into valid JSON format."
      }
    },
    {
      "id": "9bd03031-f163-46e1-80a3-33a5afe589cc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        512
      ],
      "parameters": {
        "width": 560,
        "height": 256,
        "content": "## 4. Output Generation & Storage\nConverts structured data into Excel format and uploads the file to Google Drive."
      }
    },
    {
      "id": "e4a91db0-cb49-48ac-a2b4-2bca91ef809e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        512
      ],
      "parameters": {
        "width": 496,
        "height": 240,
        "content": "## 5. Delivery & Notification\nSends the generated Excel file to the user via Telegram and Email."
      }
    },
    {
      "id": "6308e4f3-6630-400e-b75c-aeaeb8f3d58b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        -96
      ],
      "parameters": {
        "width": 816,
        "height": 928,
        "content": "# Convert PDF to MCQ Question Bank in Excel with AI (Gemini)\nThis workflow automatically converts any PDF into a structured Multiple Choice Question (MCQ) bank using Google Gemini AI.\n\nIt extracts tex"
      }
    }
  ],
  "connections": {
    "Chunk": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cleaner": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Validate Parameter & PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Condition Valid": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Send a document",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Cleaner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Chunk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Parameter & PDF": {
      "main": [
        [
          {
            "node": "Condition Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}