n8n

How to Generate Google Docs Exam Questions?

Turn your course notes into ready to use exams in minutes. The flow takes a Google Doc, builds open and multiple choice questions, and saves everything into Google Sheets. It suits teachers, trainers, and learning teams who need fast, consistent assessments tied to their source content.

Here is how it works. A manual test start creates or refreshes a Qdrant collection through HTTP requests, so the vector database is ready. The Google Doc is fetched, converted to a file, split into small chunks, and turned into embeddings with OpenAI. Those vectors are stored in Qdrant. Google Gemini then drafts two lists of questions, one open ended and one closed. The flow loops through each question and uses retrieval from Qdrant to build accurate answers. It also generates three distractors for quizzes. Structured parsers clean the output, and two Google Sheets nodes write the open and closed sets to separate sheets.

Setup is simple if you have accounts for Google Docs, Google Sheets, OpenAI, Google Gemini, and a Qdrant endpoint. Update the QDRANT URL and collection name, paste your Google Doc ID, and select your target spreadsheets. Expect a big time cut from manual authoring and more consistent question quality. Use it for unit tests, onboarding checks, policy training, or product education.

What are the key features?

  • Create or reset a Qdrant collection using HTTP Request nodes
  • Load a Google Doc, convert it to a file, and split content into small chunks
  • Generate embeddings with OpenAI and store vectors in Qdrant
  • Use Google Gemini to draft 10 open questions and 10 closed questions
  • Loop through each question and retrieve facts from Qdrant for grounded answers
  • Produce one correct answer and three wrong options for multiple choice
  • Parse outputs with structured item list nodes for clean rows
  • Write open and closed results to separate Google Sheets tabs

What are the benefits?

  • Reduce manual work from 4 hours to 10 minutes per exam set
  • Automate up to 80 percent of question drafting with AI
  • Improve answer accuracy by grounding on your source text
  • Keep assessments consistent across classes and teams
  • Connect Google Docs, OpenAI, Gemini, Qdrant, and Google Sheets in one flow
  • Scale to many documents by reusing the same vector database pipeline

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Docs, Google Sheets, Qdrant, OpenAI and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, connect Google Docs: double click the Get Doc node, choose Credential to connect with, click Create new credential, and follow the on screen steps for OAuth2.
  4. Connect Google Sheets: open the Write open and Write closed nodes, choose Credential to connect with, click Create new credential, and finish OAuth2 in n8n Cloud.
  5. Set up OpenAI: create an API key in your OpenAI account, then in the Embeddings OpenAI nodes select Create new credential and paste the API key.
  6. Set up Google Gemini: get an API key from Google AI Studio, then in each Google Gemini Chat Model node create a new credential and add the key.
  7. Configure Qdrant: in the Qdrant Vector Store nodes and HTTP Request nodes, create a Qdrant credential. Enter your Qdrant endpoint URL and API key if required.
  8. Open the Create collection and Refresh collection nodes, replace QDRANT_URL and COLLECTIONS with your real endpoint and collection name. Note that Refresh collection clears all points.
  9. In the Qdrant Vector Store nodes, set the same collection name used above to keep indexing and retrieval aligned.
  10. Open the Get Doc node and paste your Google Doc ID. Make sure the account used has read access to the document.
  11. In the Write open and Write closed nodes, select your target spreadsheet and sheet names. Create the sheets first if they do not exist.
  12. Optional tuning: in the Token Splitter node, adjust chunk size 450 and overlap 50 if your documents are very long or very short.
  13. Run the workflow with the manual trigger. Check the execution logs. Confirm that the collection is created, vectors are inserted, and rows appear in both Google Sheets tabs.
  14. Troubleshooting: if indexing fails, verify your OpenAI key and that the Qdrant vector size is 1536 to match the embedding model. If no answers appear, confirm the Refresh collection did not delete needed data and that the document content is accessible.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Docs

Sign up

Free: $0, Google Docs API usage at no additional cost (quota limits apply)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Qdrant

Sign up

Free tier: $0, 1 GB free cluster (no credit card), accessible via REST/GRPC API

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.