{
  "name": "Transform YouTube videos into interactive MCQ quizzes with Google Forms & Gemini AI",
  "nodes": [
    {
      "id": "a9d881c8-7bd2-4731-9190-dfdc71feee7c",
      "name": "Set Fields: Define Outcome",
      "type": "n8n-nodes-base.set",
      "position": [
        -1380,
        670
      ]
    },
    {
      "id": "0ad13e7e-0184-4a95-b58f-5949849eba0c",
      "name": "If: Was an error detected?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1600,
        795
      ]
    },
    {
      "id": "14b9683c-e1f4-4559-865b-a345da7d7146",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1160,
        900
      ]
    },
    {
      "id": "1b283330-f4e9-44b6-aebf-018d45c7f9e4",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -960,
        900
      ]
    },
    {
      "id": "8040c890-8a38-455a-a5b9-064bfb5d24b1",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        0,
        420
      ]
    },
    {
      "id": "0a9c007e-7767-4849-bd05-d0b1ecb5c14c",
      "name": "filter",
      "type": "n8n-nodes-base.if",
      "position": [
        -2260,
        945
      ]
    },
    {
      "id": "e963159e-716a-4693-b03e-b7646a1322ac",
      "name": "Input YouTube URL",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2480,
        945
      ]
    },
    {
      "id": "8d7b2422-a214-4993-af3f-f898e3ca190f",
      "name": "Set Prompt and Model",
      "type": "n8n-nodes-base.set",
      "position": [
        -2040,
        870
      ]
    },
    {
      "id": "b6c30d65-0157-4856-a5c7-05dc73db566e",
      "name": "HTTP Request to Gemini",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1820,
        870
      ]
    },
    {
      "id": "20189418-6cfe-4bf3-b4ac-dad375673dab",
      "name": "Extract JSON",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1160,
        670
      ]
    },
    {
      "id": "93b3900b-02b2-44e0-b167-7e337b7e2135",
      "name": "Create a Google Form",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -660,
        520
      ]
    },
    {
      "id": "93e8ca01-8c33-40f2-b925-d9dc485b7940",
      "name": "Prepare Questions for API call",
      "type": "n8n-nodes-base.code",
      "position": [
        -260,
        420
      ]
    },
    {
      "id": "95142722-9a47-4f48-bece-9a7813f61a95",
      "name": "Create MCQ Quizzes",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        200,
        520
      ]
    },
    {
      "id": "ea54a41d-0b2d-4a8d-aede-e6f2b108f02a",
      "name": "Error Output",
      "type": "n8n-nodes-base.form",
      "position": [
        160,
        960
      ]
    },
    {
      "id": "68f30765-f7f4-472f-b144-f2988b65a693",
      "name": "Redirect to Google Form",
      "type": "n8n-nodes-base.form",
      "position": [
        200,
        320
      ]
    },
    {
      "id": "e4f108b5-884e-483c-a3d2-662096a91e2e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2560,
        720
      ],
      "parameters": {
        "width": 460,
        "height": 420,
        "content": "## Take input (YouTube URL, Form name, Number of questions) by n8n form trigger.\n "
      }
    },
    {
      "id": "eb20cf7c-630d-43a7-9e80-53613196e632",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        560
      ],
      "parameters": {
        "width": 840,
        "height": 580,
        "content": "## Send \"HTTP Request\" to \"Gemini-2.5-flash\" for creating MCQ Quizzes."
      }
    },
    {
      "id": "34233649-1635-43b3-b264-b0a6aa67d845",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        300
      ],
      "parameters": {
        "width": 820,
        "height": 840,
        "content": "## Convert Gemini Output (MCQ Questions and their answers) into json format and creating a Google Form."
      }
    },
    {
      "id": "6f2fb7b1-a5ab-444e-9dd7-ec6116e0f53c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        100
      ],
      "parameters": {
        "width": 840,
        "height": 640,
        "content": "## Prepare the json to match with the structure of Google forms api for creating the quizzes and redirect to the Google form."
      }
    },
    {
      "id": "0a103f0b-cd29-4952-b7e6-32887a4e6eb4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        760
      ],
      "parameters": {
        "width": 840,
        "height": 380,
        "content": "## Default output for error handling."
      }
    }
  ],
  "connections": {
    "filter": {
      "main": [
        [
          {
            "node": "Set Prompt and Model",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract JSON": {
      "main": [
        [
          {
            "node": "Create a Google Form",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Redirect to Google Form",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create MCQ Quizzes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input YouTube URL": {
      "main": [
        [
          {
            "node": "filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create MCQ Quizzes": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a Google Form": {
      "main": [
        [
          {
            "node": "Prepare Questions for API call",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Prompt and Model": {
      "main": [
        [
          {
            "node": "HTTP Request to Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request to Gemini": {
      "main": [
        [
          {
            "node": "If: Was an error detected?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redirect to Google Form": {
      "main": [
        []
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Extract JSON",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Extract JSON",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "If: Was an error detected?": {
      "main": [
        [
          {
            "node": "Set Fields: Define Outcome",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Fields: Define Outcome": {
      "main": [
        [
          {
            "node": "Extract JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Questions for API call": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}