Create PDF flashcards, quizzes, and study plans with Gemini and Google Sheets

Go to Workflow
0 views
Built by Oka Hironobu Oka Hironobu
Created on July 28, 2026

Description

Quick Overview
This workflow collects a PDF and study preferences via an n8n form, extracts its text, uses Google Gemini to generate flashcards, a quiz, key topics, and a study plan, then saves the cards and quiz to Google Sheets and emails the study plan via Gmail.

How it works
Receives a form submission with the learner’s email, subject, desired flashcard count, and a PDF upload.
Extracts selectable text from the uploaded PDF and checks that it contains enough content to process.
If the PDF is likely a scan with too little text, sends an “unreadable PDF” notice via Gmail.
If the PDF has enough text, sends the extracted material to Google Gemini to generate a structured study pack (flashcards, multiple-choice quiz, key topics, and a day-by-day plan).
If generation fails, emails the learner a failure message via Gmail.
Parses the structured output, emails the study plan and topic list via Gmail, and appends flashcards and quiz questions as individual rows into separate tabs in Google Sheets.

Setup
Add credentials for Google Gemini (PaLM) API, Gmail OAuth2, and Google Sheets OAuth2.
Create or select a Google Sheets spreadsheet with two tabs (for example, “Flashcards” and “Quiz”) and set the document ID and sheet names in the two Google Sheets append steps.
Open the form URL from the trigger and use it as the entry point for uploading text-based PDFs and submitting requests.

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured