Academic papers pile up on your desk. Your students need practice questions. You need teaching slides. Someone needs to turn dense research into digestible content. That someone, traditionally, is you, spending hours with highlighter and notepad. What if the extraction, explanation, and question generation happened automatically? A paper arrives, gets processed through a chain of AI tools, and emerges as interactive flashcards, annotated summaries, and exam questions. No copy-pasting. No manual reformatting. Just structured teaching material ready to deploy. This workflow combines three focused tools with an orchestration layer to convert raw academic PDFs into classroom-ready assets. The orchestrator watches for new papers, routes them through analysis and enrichment, then delivers structured output to your learning management system or flashcard deck.
The Automated Workflow
You'll use n8n as your orchestration engine. It's free to self-host, integrates directly with webhooks, and handles conditional branching better than Zapier for this specific job.
Step 1: Paper Ingestion and Routing
Set up a webhook in n8n that triggers when a PDF lands in a designated folder (via n8n's Google Drive trigger or a direct POST request from your file system):
POST https://your-n8n-instance.com/webhook/paper-intake
Content-Type: application/json { "filename": "attention-is-all-you-need.pdf", "filepath": "/papers/2024/attention-is-all-you-need.pdf", "subject": "NLP", "level": "undergraduate"
}
n8n receives this, stores the filename in memory, and passes the filepath to the next node.
Step 2: Parallel Processing with Chat With PDF and Explainpaper
Split the workflow into two parallel branches. This matters: you're not waiting for sequential operations. Both tools process simultaneously. Branch A connects to Chat With PDF's API. Send the PDF URL and a structured prompt:
POST https://api.chatwithpdf.com/v1/chat
Authorization: Bearer YOUR_CHAT_WITH_PDF_KEY
Content-Type: application/json { "file_path": "/papers/attention-is-all-you-need.pdf", "query": "Extract and summarise in 150 words: the main research question, methodology, key findings, and practical implications. Format as JSON with these exact keys: research_question, methodology, findings, implications.", "response_format": "json"
}
Chat With PDF returns structured JSON. This becomes your summary layer. Branch B calls Explainpaper's batch API to request explanations for the paper's most technical sections. If Explainpaper doesn't expose a direct API, use their web interface via Zapier's webhook connector or n8n's HTTP request node to trigger explanations through their UI automation:
POST https://api.explainpaper.com/v1/analyse
Authorization: Bearer YOUR_EXPLAINPAPER_KEY
Content-Type: application/json { "pdf_id": "attention-is-all-you-need", "sections": ["abstract", "methodology", "results"], "explanation_depth": "intermediate"
}
Step 3: Question Generation
Merge both branches. Pass the Chat With PDF summary and Explainpaper output into Claude Opus 4.6 via the Anthropic API. Use Claude for creative question synthesis because it handles multi-document reasoning better than smaller models:
POST https://api.anthropic.com/v1/messages
Authorization: x-api-key YOUR_ANTHROPIC_KEY
Content-Type: application/json { "model": "claude-opus-4.6", "max_tokens": 2000, "messages": [ { "role": "user", "content": "Based on this academic paper summary and explanations, generate 8 exam questions. Include 4 multiple-choice questions with 4 options each, and 4 short-answer prompts. Format as JSON with keys 'multiple_choice' (array of objects with 'question', 'options', 'correct_answer', 'explanation') and 'short_answer' (array of objects with 'question', 'model_answer', 'marking_criteria'). Paper summary: [SUMMARY_TEXT]. Explanations: [EXPLAINPAPER_OUTPUT]." } ]
}
Step 4: Flashcard Generation and Output
Pass the Claude output to AnkiDecks AI. AnkiDecks accepts either text or JSON input and generates Anki-compatible flashcard decks:
POST https://api.ankidecsai.com/v1/generate
Authorization: Bearer YOUR_ANKIDECSAI_KEY
Content-Type: application/json { "content": "[CLAUDE_OUTPUT]", "output_format": "anki_deck", "subject": "NLP", "difficulty": "intermediate", "deck_name": "Attention Is All You Need"
}
AnkiDecks returns a .apkg file URL. n8n downloads this file and uploads it to your learning management system via their API or Google Drive.
Step 5: Notification and Cleanup
Send yourself an email confirmation with: - Links to the generated flashcard deck
- The extracted summary
- The exam questions (formatted for review)
- A flag if confidence scores fell below 75% (indicating manual review needed) Configure n8n's Gmail node:
{ "to": "your-email@institution.edu", "subject": "New teaching materials ready: {{ $node['Paper Ingestion'].json.filename }}", "html_body": "<p>Your paper has been processed.</p><p><strong>Flashcards:</strong> {{ $node['AnkiDecks'].json.deck_url }}</p><p><strong>Exam Questions:</strong> {{ $node['Claude'].json.questions_count }} generated</p><p><strong>Status:</strong> {{ $node['AnkiDecks'].json.confidence_score }}% confidence</p>"
}
Store metadata (paper title, processing timestamp, output URLs) in a Sheets document for audit and reuse.
The Manual Alternative
You might want human review gates in the workflow. After Claude generates questions, n8n can pause and send them to you for approval before generating the flashcard deck. Use n8n's "Wait for Webhook" node:
{ "resource": "wait_for_webhook", "webhook_url": "https://your-n8n-instance.com/webhook/approve-questions", "wait_for_approval": true
}
Click the approval link in your email. This resumes the workflow and proceeds to flashcard generation. Useful for high-stakes materials where automated output requires vetting. You can also run the workflow partially: upload paper to Chat With PDF and Explainpaper manually, copy their outputs into Claude yourself, then use AnkiDecks only for the final flashcard formatting. This trades speed for control.
Pro Tips
Watch API rate limits.
Chat With PDF and Explainpaper may throttle concurrent requests.
If you're processing 10 papers at once, n8n will queue them naturally, but expect 2-3 minute delays. Build in a 60-second pause between paper intakes if batch processing. AnkiDecks AI has generous limits; Claude Opus 4.6 is pricier but fast.
Confidence scoring prevents garbage output.
Ask Claude to return a confidence score for each question alongside the question itself. Flag anything below 70%. Store these in your Sheets log so you know which decks need manual editing.
Cache paper summaries.
If students ask about the same paper in week 5 that was processed in week 2, n8n's built-in data storage means you don't re-run the entire pipeline. Query your Sheets log first, return cached results, save API calls and money.
Error handling for PDFs.
Some papers have scanned images instead of extractable text. Chat With PDF handles this reasonably; Explainpaper may struggle. Add a fallback: if Explainpaper returns an error, immediately notify you so you can manually annotate that section, then resume the workflow.
Cost per paper, not per tool.
Track total spend per paper processed. With caching and parallel processing, you're typically paying £0.30-0.80 per paper in API costs. Manually extracting and writing questions costs £20-40 in labour. The ROI reverses after 50-80 papers per term.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| n8n | Self-hosted Free or Cloud Pro | £0 or £25 | Self-hosted avoids cloud fee; Cloud Pro adds monitoring and support |
| Chat With PDF | Pay-as-you-go | £5-15 | ~£0.30 per paper at ~50 papers/month |
| Explainpaper | Free or Pro | £0 or £20 | Pro enables batch processing and API; free tier requires manual requests |
| Claude Opus 4.6 (Anthropic API) | Pay-as-you-go | £15-30 | ~£0.50-1.00 per question-generation call; depends on paper length |
| AnkiDecks AI | Pay-as-you-go or monthly | £8-20 | ~£0.10-0.20 per deck generated |
| Google Sheets API (if used) | Free | £0 | Included in Google Workspace |
| Total (50 papers/term) | £60-110/month | Replaces 40-80 hours manual labour |