workflows.fit
Back to n8n workflows
n8n templateFreeBy isaWOW

Create chapter-wise notes and MCQ quizzes from YouTube with WayinVideo, GPT-4o-mini, Google Sheets, and Gmail

Quick overview Submit any YouTube lecture URL through a form and this workflow transcribes the full video using WayinVideo, generates chapter-wise study notes and a 5-question MCQ quiz per chapter using GPT-4o-mini, a...

Data & StorageProductivityDevelopmentCore NodesCommunicationHITLAILangchain
Loading interactive preview...

Template notes

Quick overview Submit any YouTube lecture URL through a form and this workflow transcribes the full video using WayinVideo, generates chapter-wise study notes and a 5-question MCQ quiz per chapter using GPT-4o-mini, and delivers a formatted HTML email with everything ready for revision.

How it works 1. You fill in a form with the YouTube lecture URL, subject name, number of chapters you want, and your email address. 2. The YouTube URL is submitted to the WayinVideo Transcription API v2, which begins extracting the full spoken transcript with speaker labels and timestamps. A task ID is returned to track the job. 3. After an initial 30-second wait, the workflow polls the WayinVideo results endpoint. If the transcript is still processing, it waits 30 seconds and polls again. This loop repeats automatically until the status returns SUCCEEDED.

4. Once complete, the transcript segments are joined into clean readable text and trimmed to 12,000 characters for AI processing. 5. GPT-4o-mini reads the full transcript and generates a structured JSON output containing: an inferred lecture title, chapter-wise notes (one per requested chapter), key concepts, important terms with definitions, 5 MCQ questions per chapter with correct answers and explanations, an overall lecture summary, and key takeaways. 6. The structured output is parsed and built into a fully formatted HTML email with chapter sections, concept badges, quiz cards, and a summary block. 7. Google Sheets logs the video URL, subject, lecture title, chapter count, quiz question count, summary, notes, and quiz text for every session.

8. Gmail sends the complete HTML study email to the address submitted in the form — subject line includes the lecture title, chapter count, and quiz question count.

Setup 1. Add your WayinVideo API key by replacing YOURWAYINVIDEOAPIKEY in both WayinVideo HTTP requests, and ensure your WayinVideo account has available API units. 2. Connect an OpenAI credential for the GPT-4o-mini chat model. 3. Connect a Google Sheets OAuth2 credential, set YOURGOOGLESHEETID, and create a “Study Log” sheet with columns that match the fields being appended (for example: Date, YouTube URL, Subject, Lecture Title, Chapters Generated, Quiz Questions, Summary, Notes, Quiz, Status). 4. Connect a Gmail OAuth2 credential and verify the sender account can send emails to your recipients.

Requirements - Active n8n instance (self-hosted or cloud) - WayinVideo account with API key and purchased API units — get both at wayin.ai/wayinvideo/api-dashboard - OpenAI account with GPT-4o-mini API access - Google Sheets with a tab named Study Log - Gmail account connected via OAuth2 for sending study notes

Customization - Change the number of chapters — the form field Number of Chapters controls how many chapters GPT generates; users can enter any number from 1 to 6 depending on video length - Change quiz questions per chapter — in the system prompt of node 10. AI Agent — Generate Notes and Quiz, change "exactly 5 quiz questions" to a different number to generate more or fewer questions per chapter - Add a Google Drive upload — after node 12. Google Sheets — Log Study Session, add a Google Drive step to save the notes text as a plain text file so students can access the notes outside their inbox - Support non-English lectures — in node 2. HTTP — WayinVideo Submit Transcription, change sourcelang from en to any WayinVideo-supported language code to transcribe lectures in other languages - Increase the transcript length limit — in node 9. Code — Prepare Transcript, change .slice(0, 12000) to a larger number such as 20000 for longer lectures — note this increases GPT token usage and cost

Additional info The WayinVideo API key appears in two separate steps — node 2. HTTP — WayinVideo Submit Transcription and node 5. HTTP — Poll Transcription Status. You must replace YOURWAYINVIDEOAPIKEY in both. Missing either one will cause the workflow to fail.