Back to Alchemy
Alchemy RecipeIntermediateworkflow

Convert research papers into interactive exam questions and study flashcards

Reading a 40-page research paper and extracting 20 meaningful flashcards takes most students or academics an entire afternoon. You highlight important sections, copy definitions, paraphrase concepts, then manually create cards in Anki or Quizlet. Multiply that across five papers for an exam or literature review, and you've lost days to administrative work. The real tragedy is that by the time you've finished typing, you've probably forgotten what the paper actually argued. What if instead you uploaded a PDF, asked an AI to explain the confusing bits, extracted the key concepts automatically, and had ready-made flashcards waiting in your Anki deck within minutes? That's not a fantasy; it's a straightforward automation that combines three focused tools and costs almost nothing to run. This workflow takes a PDF research paper, breaks down complex passages for clarity, identifies and formats the most important concepts, then generates Anki flashcards without any manual handoff. It works for undergraduate reading lists, PhD literature reviews, and professional certification prep equally well.

The Automated Workflow

We'll use n8n as the orchestration engine here because it has native integrations with all three tools and gives you fine control over data transformations. Zapier would also work but requires paid add-ons for file handling; Make is also viable but more visually cluttered for this task. The flow moves like this: you upload a PDF to a monitored folder or Dropbox, n8n triggers automatically, extracts the paper's text, sends it to an AI for concept identification and explanation, then formats the results as flashcard JSON and pushes them directly into AnkiDecks AI.

Step 1: PDF Upload Trigger

Start with a simple file upload node. In n8n, use the Google Drive trigger or Dropbox trigger to watch a specific folder.

Trigger: Files added to folder
Folder: /Research Papers
File type: PDF
Output: file_id, file_name, file_path

Alternatively, if you prefer a manual trigger for more control, use an n8n "Start" node and attach a file upload component.

Step 2: Extract Text from PDF

Use the n8n PDF extractor node or a third-party service like CloudConvert to convert PDF to plain text.

json
{ "method": "POST", "url": "https://api.cloudconvert.com/v2/convert", "headers": { "Authorization": "Bearer YOUR_CLOUDCONVERT_API_KEY" }, "body": { "tasks": { "import-file": { "operation": "import/url", "file": "{{ $node.trigger.data.file_url }}" }, "convert": { "operation": "convert", "input": "import-file", "output_format": "txt" }, "export": { "operation": "export/url" } } }
}

The output is now plain text. Store this in a variable for the next step.

Step 3: Identify Key Concepts and Complex Passages

Send the extracted text to Claude Opus 4.6 via the Anthropic API. Ask it to extract the top 10-15 key concepts and flag passages that require explanation.

json
{ "method": "POST", "url": "https://api.anthropic.com/v1/messages", "headers": { "x-api-key": "{{ env.ANTHROPIC_API_KEY }}", "anthropic-version": "2023-06-01" }, "body": { "model": "claude-opus-4.6", "max_tokens": 2048, "messages": [ { "role": "user", "content": "Extract the 12 most important concepts from this research paper. For each concept, provide: (1) the term, (2) a one-sentence definition, (3) the page or section where it first appears. Format as JSON.\n\nPaper text:\n{{ $node.pdf_extract.data.text }}" } ] }
}

Parse the JSON response into an array of concept objects. Each object should contain: concept, definition, context.

Step 4: Explain Complex Passages (Optional but Recommended)

If the paper contains heavy mathematical notation or domain-specific jargon that Claude flagged, you can pipe it through Explainpaper or send it back to Claude with a different prompt. For automated clarification without manual upload to Explainpaper, use Claude Haiku 4.5 for speed and cost savings:

json
{ "method": "POST", "url": "https://api.anthropic.com/v1/messages", "headers": { "x-api-key": "{{ env.ANTHROPIC_API_KEY }}", "anthropic-version": "2023-06-01" }, "body": { "model": "claude-haiku-4.5", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Explain this passage from an academic paper in plain English suitable for an undergraduate. Use analogies if needed:\n\n{{ $item.complex_passage }}" } ] }
}

Attach the simplified explanation to each concept object as explanation.

Step 5: Format as Anki Flashcards

Transform each concept into Anki-compatible JSON. Anki deck files use a specific structure; AnkiDecks AI accepts JSON input for batch card creation.

json
{ "cards": [ { "front": "{{ $item.concept }}", "back": "{{ $item.definition }}\n\nContext: {{ $item.context }}\n\nExplanation: {{ $item.explanation }}", "deck": "Research Paper - {{ $node.trigger.data.file_name | trim }}", "tags": ["research", "auto-generated", "{{ today | formatDate('YYYY-MM') }}"] } ]
}

If your deck name contains special characters, sanitise it using regex or n8n's string functions.

Step 6: Push to AnkiDecks AI

AnkiDecks AI provides an API endpoint for importing flashcards. You'll need your API key from their dashboard.

json
{ "method": "POST", "url": "https://api.ankidecks.ai/v1/cards/import", "headers": { "Authorization": "Bearer YOUR_ANKIDECKS_API_KEY", "Content-Type": "application/json" }, "body": { "cards": {{ $node.format_cards.data.cards }}, "deck_name": "Research Paper - {{ $node.trigger.data.file_name | trim }}", "auto_create_deck": true }
}

Step 7: Confirmation and Error Handling

Add a final node that sends you an email or Slack message confirming how many cards were created, along with the deck name. If the API returns an error (invalid PDF, API rate limit, etc.), trigger a fallback notification.

json
{ "condition": "{{ $node.ankidecks_push.data.status === 'success' }}", "true_path": "send_slack('✅ Created {{ $node.ankidecks_push.data.cards_created }} flashcards for {{ $node.trigger.data.file_name }}')", "false_path": "send_email_alert('Error creating flashcards for {{ $node.trigger.data.file_name }}: {{ $node.ankidecks_push.data.error }}')"
}

The Manual Alternative

If you prefer more control or want to review concepts before they become flashcards, insert a human approval step. After Step 4, save the formatted JSON to a shared Google Sheet or Airtable base, let yourself (or a study group) review and edit definitions, then manually trigger the Anki push only after approval. Alternatively, use Chat With PDF by Copilot.us to interactively explore the paper first. Upload the PDF, ask clarifying questions about confusing sections, then use your refined understanding to feed a more precise prompt back into Claude. This loses the full automation benefit but gains accuracy for papers with dense or contradictory claims.

Pro Tips

Rate Limiting and Costs

Claude Opus 4.6 is more capable but slower and pricier than Haiku.

For fast turnaround on simple concept extraction, use Claude Haiku 4.5 first, then only escalate to Opus if the output is vague or incomplete. Set up conditional logic in n8n to try Haiku first, catch failures, then retry with Opus.

Handling PDFs with Images or Scans

If your research paper is scanned or contains embedded diagrams, CloudConvert's text extraction will fail on image-based content. Add an OCR step using AWS Textract or Google Cloud Vision before sending to Claude. This adds latency and cost but is essential for older or low-quality PDFs.

Anki Deck Naming and Organisation

Auto-generating deck names from file names risks clutter and duplicate decks. Instead, add a prefix step that checks whether a deck with that name already exists in AnkiDecks, then append a counter if needed. Alternatively, use a fixed parent deck name (e.g. "Imported Research Papers") and nest subdecks by topic or date. Batch Processing Multiple Papers n8n's loop feature lets you upload multiple PDFs at once and process them sequentially. Add a delay between API calls to avoid rate-limit errors. Set a loop counter to process no more than 5 papers per hour.

Preserving Citation Context

When Claude extracts concepts, include the surrounding text or citation as part of the definition. This helps you remember where in the literature you encountered this idea, which is crucial for writing your own research later. Add a citation field to your flashcard JSON.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
n8nCloud Free or Self-Hosted£0 to £100Free tier covers ~100 workflow executions per month; self-hosted is one-time setup.
Anthropic (Claude)Pay-as-you-go£5-£20~£0.003 per 1K input tokens (Opus 4.6), £0.0003 per 1K output tokens. A 10-page paper uses ~5K tokens per extraction.
CloudConvertFree or Starter£0-£10Free tier: 25 conversions per day; Starter: 200 per day.
AnkiDecks AIPro£9.99Unlimited imports and cards.
Total£14.99-£139.99Most workflows stay under £25/month unless processing >50 papers monthly.