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.
You fill in a form with the YouTube lecture URL, subject name, number of chapters you want, and your email address.
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.
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.
Once complete, the transcript segments are joined into clean readable text and trimmed to 12,000 characters for AI processing.
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.
The structured output is parsed and built into a fully formatted HTML email with chapter sections, concept badges, quiz cards, and a summary block.
Google Sheets logs the video URL, subject, lecture title, chapter count, quiz question count, summary, notes, and quiz text for every session.
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.
YOUR_WAYINVIDEO_API_KEY in both WayinVideo HTTP requests, and ensure your WayinVideo account has available API units.YOUR_GOOGLE_SHEET_ID, 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).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 YOUR_WAYINVIDEO_API_KEY in both. Missing either one will cause the workflow to fail.
WayinVideo charges API units per transcription based on video length. Make sure you have sufficient units purchased at wayin.ai/wayinvideo/api-dashboard before running the workflow on long lectures.
The polling loop between nodes 5, 6, 7, and 8 runs automatically until the transcription status equals SUCCEEDED. For longer videos this may take several minutes. The workflow handles this without any manual intervention — do not stop the execution while it is running.
The transcript is trimmed to 12,000 characters before being sent to GPT. For very long lectures, content from the end of the video may be cut off. To process longer transcripts, increase the character limit in node 9. Code — Prepare Transcript, keeping in mind GPT context window limits and increased token cost.