WorkflowGoogle DocsOpen

AI exam question generator from documents n8n

This n8n workflow reads a document and writes exam questions with answers using AI and a Qdrant vector database. It is for teachers and trainers who want ten open questions and ten multiple choice questions created from course material, with answers checked against the source text.

What it does

It creates or refreshes a Qdrant collection and vectorizes documents from Google Drive. One chain writes ten open questions and another finds the best answer to each from the vector store; a second pair does the same for closed answer questions. Results go to Google Docs and Google Sheets.

How to use it

Change QDRANTURL and COLLECTION in the first two steps, then connect Google Drive, Google Docs, Google Sheets and OpenAI.

More in Google Docs and the n8n workflow library.

Full text

Front matter
name: Generate Exam Questions
description: Triggered manually or by an app event. Connects Code, Convert To File, Google Docs, Google Sheets, HTTP request, Loop. # STEP 1 ## Create Qdrant Collection Change: - QDRANTURL - COLLECTION # STEP 2 ## Documents vectorization with Qdrant and Google Drive Change: - QDRANTURL - COLLECTION # STEP 3 The 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 obtained. # STEP 4 The chain analyzes the document and creates 10 questions with "closed" answers and another chain analyz
category: Automation
kind: Workflow
software: Code|Convert To File|Google Docs|Google Sheets|HTTP request|Loop

Generate Exam Questions

Triggered manually or by an app event. Connects Code, Convert To File, Google Docs, Google Sheets, HTTP request, Loop. # STEP 1

Create Qdrant Collection

Change:

  • QDRANTURL
  • COLLECTION # STEP 2

Documents vectorization with Qdrant and Google Drive

Change:

  • QDRANTURL
  • COLLECTION # STEP 3

The 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 obtained. # STEP 4

The chain analyzes the document and creates 10 questions with "closed" answers and another chain analyz

Steps

  • When clicking ‘Test workflow’ (manualTrigger)
  • Qdrant Vector Store (noOp)
  • Create collection (httpRequest)
  • Refresh collection (httpRequest)
  • Embeddings OpenAI (noOp)
  • Default Data Loader (noOp)
  • Token Splitter (noOp)
  • Sticky Note3 (stickyNote)
  • Sticky Note4 (stickyNote)
  • Converto di MD (code)
  • Get Doc (googleDocs)
  • Vector Store Retriever (noOp)
  • Qdrant Vector Store1 (noOp)
  • Convert to File (convertToFile)
  • Google Gemini Chat Model (noOp)
  • Item List Output Parser (noOp)
  • Loop Over Items (splitInBatches)
  • Google Gemini Chat Model1 (noOp)
  • Google Gemini Chat Model2 (noOp)
  • Item List Output Parser1 (noOp)
  • Loop Over Items1 (splitInBatches)
  • Google Gemini Chat Model3 (noOp)
  • Qdrant Vector Store2 (noOp)
  • Embeddings OpenAI2 (noOp)
  • Structured Output Parser (noOp)
  • RAG (noOp)
  • Google Gemini Chat Model4 (noOp)
  • Open questions (noOp)
  • Closed questions (noOp)
  • Answer questions (noOp)
  • Answer and create options (noOp)
  • Write open (googleSheets)
  • Write closed (googleSheets)
  • Embeddings OpenAI1 (noOp)
  • Sticky Note (stickyNote)
  • Sticky Note1 (stickyNote)
  • Sticky Note2 (stickyNote)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source and license

Source: https://github.com/Zie619/n8n-workflows/blob/main/Googledocs/1134_Googledocs_Code_Create_Webhook.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.