Automate Quiz Creation from Documents with Google Gemini and Jotform
AI-Powered Quiz Generator for Instructors ππ€
Instantly turn any document into a shareable online quiz! This n8n workflow automates the entire quiz creation process: a new Jotform submission triggers the flow, the Google Gemini AI extracts key concepts and generates multiple-choice questions with correct answers, saves the questions to a Google Sheet for record-keeping, and finally creates a fully built, ready-to-share Jotform quiz using an HTTP request.
How it Works
This powerful workflow acts as a complete "document-to-quiz" automation tool, simplifying the process of creating educational or testing materials:
Trigger & Input: The process starts when a user fills out the main Jotform submission form, providing a document (PDF/file upload), the desired Quiz Title, and the Number of Questions to generate. Create a jotform like this: https://form.jotform.com/252856893250062 having fields for Quiz Name, File Upload and Number of questions. Document Processing: The workflow retrieves the uploaded document via an HTTP request and uses the Extract from File node to parse and extract the raw text content from the file. AI Question Generation: The extracted text, quiz title, and desired question count are passed to the Google Gemini AI Agent. Following strict instructions, the AI analyzes the content and generates the specified number of multiple-choice questions (with four options and the correct answer indicated) in a precise JSON format. Data Structuring: The generated JSON is validated and formatted using a Structured Output Parser and split into individual items for each question. Record Keeping (Google Sheets): Each generated question, along with all its options and the confirmed correct answer, is appended as a new row in a designated Google Sheet for centralized record-keeping and review. Jotform Quiz Creation (HTTP Request): The workflow dynamically constructs the required API body, converting the AI-generated questions and options into the necessary fields for a new Jotform. It then uses an HTTP Request node to call the Jotform API, creating a brand-new, ready-to-use quiz form. Final Output: The final output provides the link to the newly created quiz, which can be shared immediately for submissions.
Requirements
To deploy this automated quiz generator, ensure you have the following accounts and credentials configured in your n8n instance:
Jotform Credentials:* An API Key is required for both the Jotform Trigger (to start the workflow) and for the final HTTP Request (to create the new quiz form via the API). Sign up for Jotform here:* https://www.jotform.com/?partner=zainurrehman Google Gemini API Key:* An API key for the Google Gemini Chat Model to power the AI Agent* for question generation. Google Sheets Credentials:* An OAuth2 or API Key credential for the Google Sheets* node to save the generated questions. Initial Jotform:* A source Jotform that accepts the user input: a File Upload field, a Text field for the Quiz Title, and a Number* field for the Number of Questions.
Pro Tip: After the final HTTP Request, add an additional step (like an Email or Slack node) to automatically send the generated quiz link back to the user who submitted the initial request!
Related Templates
Send structured logs to BetterStack from any workflow using HTTP Request
Send structured logs to BetterStack from any workflow using HTTP Request Who is this for? This workflow is perfect for...
Provide latest euro exchange rates from European Central Bank via Webhook
What is this workflow doing? This simple workflow is pulling the latest Euro foreign exchange reference rates from the E...
Convert Tour PDFs to Vector Database using Google Drive, LangChain & OpenAI
π§© Workflow: Process Tour PDF from Google Drive to Pinecone Vector DB with OpenAI Embeddings Overview This workflow au...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments