Generate structured exams from PDFs with OpenAI GPT-4o and HTML to PDF
Workflow preview
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER
Early Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
Overview
π ExamForge AI
Automated PDF to Structured Exam Generator (MCQ + Essay + Answer Key)
Generate structured exams automatically from text-based PDF materials using AI.
ExamForge AI is a production-ready n8n workflow that transforms educational content into multiple-choice and essay questions with customizable difficulty and automatic answer key generation.
β¨ Features
- π Upload PDF via Webhook
- β File size validation (default: max 5MB)
- π§Ή Automatic text cleaning
- π Token length estimation & safety control
- π― Customizable MCQ & Essay count
- π§ Difficulty selection (easy / medium / hard)
- π Language selection
- π¦ Structured JSON AI output
- π Separate Exam PDF & Answer Key PDF
- π² Telegram delivery support (optional)
- π Parameter validation with structured error responses
π§ What This Workflow Does
- Accepts PDF upload via Webhook
- Validates file size
- Extracts and cleans text content
- Estimates text length to prevent token overflow
- Validates required parameters:
mcq_countessay_countdifficultylanguage
- Sends structured prompt to OpenAI
- Parses JSON response
- Formats exam and answer key separately
- Converts both into PDF
- Sends results via Telegram or Webhook response
βοΈ Requirements
Accounts Required
- OpenAI account (API key required)
- Telegram Bot (optional)
- PDF Munk (API key required)
Environment
- n8n (self-hosted or cloud)
- Node version compatible with your n8n installation
π Credentials Setup
1οΈβ£ OpenAI
- Add OpenAI credentials inside n8n
- Insert your API key
- Select preferred model (e.g., GPT-4o / GPT-4)
2οΈβ£ Telegram (Optional)
- Create a Telegram Bot via BotFather
- Insert Bot Token into Telegram node
- Add your Chat ID
π Webhook Configuration
Method: POST Content-Type: multipart/form-data
Required Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | PDF document |
| mcq_count | Number | Yes | Number of multiple-choice questions |
| essay_count | Number | Yes | Number of essay questions |
| difficulty | String | Yes | easy / medium / hard |
| language | String | Yes | Output language |
π₯ Example Request
curl -X POST https://your-n8n-domain/webhook/examforge \
-F "[email protected]" \
-F "mcq_count=20" \
-F "essay_count=5" \
-F "difficulty=medium" \
-F "language=Indonesian"