Create seminar teaching packs from research PDFs with Qwen, Gotenberg and Gmail

Go to Workflow
0 views
Built by Hesham Mashhour Hesham Mashhour
Created on August 08, 2026

Description

Quick overview
This workflow collects a research paper PDF via an n8n Form, uses an AI agent (with schema validation) to generate a seminar-ready teaching pack and slide plan, renders it to a PDF with Gotenberg, and emails the finished pack to the requester via Gmail.

How it works
Starts when someone submits an n8n Form with a paper PDF, their email address, session length, student level, and optional focus.
Extracts text from the uploaded PDF and stops with a “no text” message if the file appears to be image-only or too short.
Sends the paper text plus the session parameters to a LangChain AI agent to produce a structured teaching pack JSON that is validated and auto-fixed against a predefined schema.
Converts the structured teaching pack into print-ready HTML for an A4 handout and slide-by-slide delivery plan.
Posts the HTML to a self-hosted Gotenberg endpoint to render it into a PDF file.
Emails the generated PDF teaching pack to the submitted email address using Gmail and shows a completion message in the form.

Setup
Provide credentials for the chat model used by the AI agent (Alibaba Cloud Qwen) and for Mistral (used for fallback and JSON auto-fix), or swap these model nodes for your preferred provider.
Connect a Gmail account in the Gmail node so the workflow can send the PDF as an email attachment.
Make Gotenberg reachable from n8n and confirm the render URL (default http://gotenberg:3000/forms/chromium/convert/html), or replace the rendering steps with a different PDF service.
Share the n8n Form production URL from the “Upload a paper” trigger so users can submit papers.

Nodes Used (7)

AI Agent
@n8n/n8n-nodes-langchain.agent
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
HTTP Request
n8n-nodes-base.httpRequest
Mistral Cloud Chat Model
@n8n/n8n-nodes-langchain.lmChatMistralCloud
Qwen Cloud Chat Model
@n8n/n8n-nodes-langchain.lmChatAlibabaCloud
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured