Back to Alchemy
Alchemy RecipeIntermediateworkflow

Convert academic papers into teaching materials, exam questions and flashcards

A researcher publishes a new paper on machine learning applications in healthcare. Within days, it lands on the desk of a biology lecturer who thinks: "This would be perfect for my students." Three weeks later, after manually extracting key concepts, writing exam questions, and creating study notes, the materials are finally ready. By then, the semester is halfway through. This friction between research and education is entirely unnecessary. A paper that takes weeks to convert manually can become teaching materials, multiple-choice questions, and spaced-repetition flashcards in less than an hour. The bottleneck isn't the work itself; it's the absence of a coordinated workflow that moves data between tools without human intervention. This post walks you through building that workflow using freely available AI tools and an orchestration platform. You'll connect PDF parsing, semantic analysis, question generation, and flashcard creation into a single pipeline that runs when you upload a new academic paper.

The Automated Workflow

We'll use n8n as the orchestration layer because it handles conditional logic, supports multiple APIs natively, and runs on self-hosted or cloud infrastructure. The workflow triggers whenever a new PDF arrives in a designated folder (via Dropbox, Google Drive, or local file system), extracts content, generates teaching materials, and stores results in a structured format. Here's the data flow: 1. Trigger: PDF uploaded to Dropbox 2. Extract text: Chat With PDF by Copilot.us parses the document 3. Analyse and summarise: Claude Opus 4.6 identifies key concepts and main arguments 4. Generate exam questions: o3 creates multiple-choice questions 5. Generate flashcards: AnkiDecks AI produces Anki-compatible flashcard decks 6. Publish outputs: Store files in Google Drive or Notion for access Setting up the trigger in n8n: n8n connects to Dropbox using the built-in Dropbox node. Configure a Dropbox trigger that watches a specific folder for new PDF files.

Trigger: Dropbox → New File in Folder
Folder path: /academic-papers
File name pattern: *.pdf

When a PDF lands, n8n captures the file path and passes it downstream.

Step 1: Extract text from PDF

Chat With PDF by Copilot.us doesn't have a native n8n integration, so we'll use its HTTP API endpoint. First, upload the PDF to their service and retrieve a session token.

POST https://api.chatpdf.com/v1/sources/add-file
Headers: x-api-token: YOUR_CHATPDF_API_KEY Content-Type: multipart/form-data Body: file: [binary PDF data from Dropbox]

This returns a source ID. Store it for the next step.

Response:
{ "sourceId": "src_abc123def456"
}

Step 2: Extract key concepts

Now send the extracted text (or a summary prompt) to Claude Opus 4.6 to identify main concepts, arguments, and learning objectives.

POST https://api.anthropic.com/v1/messages
Headers: x-api-key: YOUR_ANTHROPIC_API_KEY anthropic-version: 2023-06-01 content-type: application/json Body:
{ "model": "claude-opus-4.6", "max_tokens": 2000, "messages": [ { "role": "user", "content": "Read this academic paper abstract and full text. Identify the 10 most important concepts, definitions, and findings. Format as JSON with keys: concept, definition, importance_level (1-5), and context_sentence." } ]
}

Claude returns structured JSON that we can pass to downstream steps.

Step 3: Generate exam questions

Feed the key concepts to o3, which excels at generating pedagogically sound multiple-choice questions. o3 is overkill for this task (use o4-mini instead to reduce cost), but it produces higher-quality distractors.

POST https://api.openai.com/v1/chat/completions
Headers: Authorization: Bearer YOUR_OPENAI_API_KEY Content-Type: application/json Body:
{ "model": "o4-mini", "messages": [ { "role": "system", "content": "You are an expert educator. Generate 15 multiple-choice exam questions based on these concepts." }, { "role": "user", "content": "[JSON concepts from Claude step]" } ], "temperature": 0.7, "max_tokens": 3000
}

Format the response as a JSON array of questions with four options and a correct answer key.

Step 4: Generate flashcards

AnkiDecks AI integrates directly with n8n. Pass your key concepts and Claude's definitions to create a deck automatically.

POST https://api.ankidecks.com/v1/decks/create
Headers: Authorization: Bearer YOUR_ANKIDECKS_API_KEY Content-Type: application/json Body:
{ "deck_name": "[Paper Title] - Key Concepts", "cards": [ { "front": "Concept name", "back": "Definition and context from paper" } ]
}

AnkiDecks returns a downloadable .apkg file (Anki deck format) that students can import directly into their Anki app.

Step 5: Store and organise outputs

Create three files in Google Drive: 1. A PDF summary (generated by Claude) 2. An Excel spreadsheet of exam questions 3. An Anki deck file Use n8n's Google Drive node to write files programmatically:

Create file in Google Drive: Folder: /Teaching Materials/[Year]/[Subject] File name: [Paper Title] - Exam Questions.xlsx File content: [CSV from o4-mini output]

For the Anki deck, download the .apkg from AnkiDecks and store it in the same folder. Complete n8n workflow structure:

1. Dropbox Trigger (New PDF) ↓
2. HTTP Request (ChatPDF API - Extract text) ↓
3. Claude Opus 4.6 (Identify concepts) ↓
4. o4-mini (Generate exam questions) ↓
5. AnkiDecks AI (Create flashcard deck) ↓
6. Google Drive (Store all outputs) ↓
7. Slack notification (Alert when complete)

The entire workflow runs in roughly 2-3 minutes per paper. n8n handles retries, logging, and error notifications automatically.

The Manual Alternative

If you don't want to set up orchestration, you can run each step manually but still save substantial time. Upload your paper to ExplainPaper to highlight confusing sections and get AI clarifications. Then copy the explained text into Chat With PDF by Copilot.us and ask for key concepts. Paste those into Claude Opus 4.6 to generate questions. Finally, input the key definitions into AnkiDecks AI to create your deck. This takes 30-45 minutes per paper instead of three weeks, and you maintain full control over outputs at each stage. It's slower than automation but vastly faster than doing everything manually.

Pro Tips

Rate limits and API quotas:

AnkiDecks AI and ChatPDF both enforce rate limits on free tiers.

If you process multiple papers weekly, upgrade to their paid plans or batch requests during off-peak hours. o4-mini is cheaper than o3 for this task; the slight quality reduction is negligible for exam questions.

Error handling in n8n:

Set up error notifications in Slack. If ChatPDF fails to extract text (common with scanned PDFs), the workflow should pause and notify you rather than proceeding with empty data. Use n8n's built-in error handling nodes.

Prompt engineering matters:

The quality of exam questions depends entirely on your prompt to o4-mini. Specify difficulty level (undergraduate, postgraduate), question type, and the number of options. Test with one paper first, then refine your prompts before scaling.

Storage and access:

Use Google Drive with shared links for students, or integrate with your learning management system (Canvas, Blackboard) via n8n's LMS nodes. This ensures students access the latest versions without manual distribution.

Cost optimisation:

Claude Haiku 4.5 can handle concept extraction if the paper is straightforward; o4-mini is faster for question generation. Mix and match models based on task complexity rather than using the most powerful model everywhere.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
Chat With PDF by Copilot.usFree or Pro ($15)Free–15Pro needed for >50 PDFs/month
Claude Opus 4.6Pay-as-you-go (API)5–20~$0.015 per 1,000 input tokens
o4-miniPay-as-you-go (API)3–10~$0.15 per 1M input tokens
AnkiDecks AIFree or Pro ($12)Free–12Free tier limited to 10 decks/month
n8nCloud ($20) or Self-hosted (free)0–20Self-hosted has no recurring cost
Google DriveFree or Workspace ($12)Free–12Free tier sufficient for most educators
Total (minimal setup)8–30Using free and pay-as-you-go options
Total (comfortable setup)50–80All tools on paid plans for reliability