Use this comprehensive n8n workflow to automate exam question creation. Extracts content from Google Docs, uses Qdrant for RAG, and leverages Google Gemini to generate structured open and closed questions.
Download this n8n workflow template and start using it instantly.




















• Educators, teachers, or trainers needing to quickly create assessments.
• Content developers requiring automated quiz generation from source material.
• n8n specialists interested in advanced Retrieval-Augmented Generation (RAG) implementation.
• Users seeking practical n8n templates for AI and document processing.
Creating high-quality, comprehensive exam questions that align perfectly with source material is time-consuming. This powerful n8n workflow eliminates hours of manual effort by automating the entire assessment creation lifecycle. It starts by extracting raw content from a Google Doc. This content is then prepared and vectorized using OpenAI Embeddings and stored in the Qdrant Vector Store, creating a reliable RAG knowledge base. The core of this n8n workflow involves two parallel AI chains powered by Google Gemini: one generating open-ended questions with definitive answers, and the other generating multiple-choice questions with guaranteed correct options and plausible distractors. Every step, from document parsing via a custom n8n node to final structured output in Google Sheets, demonstrates the power of orchestrated AI automation.
This n8n workflow executes a multi-stage process, initiated by the manual n8n trigger:
Refresh collection, clearing the Qdrant vector store collection to ensure a clean index. It then uses the Google Docs n8n node to fetch the target document. Converto di MD) converts the document’s complex JSON structure into clean Markdown. The Convert to File n8n node prepares this data, which is then split into chunks by the Token Splitter and vectorized using the Embeddings OpenAI n8n node. These vectors are inserted into the Qdrant Vector Store, establishing the RAG context.Open questions LLM Chain uses Google Gemini to generate 10 open-ended questions based on the full article text. A Loop Over Items n8n node processes these questions individually. For each, the Answer questions Retrieval QA Chain utilizes the RAG mechanism (Qdrant + Gemini Pro) to find and formulate the definitive answer, which is appended to the Google Sheets n8n node called Write open.Closed questions LLM Chain generates 10 multiple-choice questions (stems and options A-D, without the key). The Loop Over Items1 n8n node iterates through these. The subsequent AI Agent (Answer and create options) uses the RAG tool and a Structured Output Parser n8n node to ensure accuracy, generating four options and explicitly identifying the correct one. This structured data is finally recorded by the Write closed Google Sheets n8n node.To set up this advanced n8n workflow, follow these steps:
Get Doc n8n node to read your document. Qdrant Vector Store and HTTP Request nodes (collection management). Note: You must replace QDRANT_URL and COLLECTIONS placeholders in the HTTP Request nodes with your actual Qdrant instance details and collection name.Embeddings OpenAI n8n node to generate vector embeddings.Write open and Write closed n8n node settings.Get Doc n8n node, replace the placeholder XXXXXXXXXXXXXXXX with the URL of the Google Doc you want to analyze.When clicking ‘Test workflow’ n8n trigger to verify the connection and data flow. When clicking ‘Test workflow’ (Manual Trigger n8n trigger): Initiates the flow execution manually.
Get Doc (Google Docs n8n node): Fetches the content of the specified Google Document, acting as the primary source material.
Converto di MD (Code n8n node): Custom JavaScript code that converts the raw Google Doc content into Markdown, preparing it for AI analysis and RAG ingestion. This is a crucial n8n node for data preprocessing.
Qdrant Vector Store (n8n node): Handles the storage and retrieval of vector embeddings, enabling RAG. Configured to insert data into the aiarticletest collection using Embeddings OpenAI.
Open questions & Closed questions (LLM Chain n8n nodes): Uses the Google Gemini Chat Model (Flash) with highly detailed system prompts to structure and generate 10 open and 10 closed questions directly from the article's Markdown content.
Loop Over Items (Split In Batches n8n node): Iterates over the questions generated by the LLM Chains to process them individually in subsequent steps.
Answer questions (Retrieval QA Chain n8n node): Utilizes the RAG pattern to look up context in Qdrant and generate precise answers for the open questions using the Google Gemini Chat Model1 (Pro).
Answer and create options (Agent n8n node): A sophisticated LangChain agent that uses the RAG tool to verify the correct answer for multiple-choice questions and structure the output using the Structured Output Parser n8n node.
Automate COO task prioritization using this advanced n8n workflow template. Connect Asana to an OpenAI Agent, leverage Pinecone vector database RAG for context, and store results in Postgres.

Use this powerful n8n workflow to create a Telegram chatbot that scrapes live Amazon data, validates user input using an LLM, and generates highly curated, formatted product recommendations instantly.

Automate complex accounting report generation (AR, Tax) from Sabre EDI files using an advanced n8n workflow. Integrates GPT-4o-mini with Pinecone RAG for high-accuracy financial reporting.

Automate Zendesk ticket categorization using an n8n workflow powered by an OpenAI agent. Fetch new tickets, analyze content, and auto-tag them based on custom rules. This n8n template saves time.

Use this powerful n8n workflow to automatically translate Google Slides presentations using Gemini AI, ensuring accurate, contextual translation while preserving original formatting.

Automate your job search with this powerful n8n workflow. It uses the Adzuna API and OpenRouter AI to analyze job descriptions, tailor your resume for ATS, generate custom cover letters, and log progress in Google Sheets. Get started with this advanced n8n templates.

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza







































