Generate RAG-based study flashcards from notes with OpenAI and Slack
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model and Slack.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Set - Config (Edit Fields (Set)): sets 9 fields: embeddingApiUrl, embeddingModel, chunkSizeChars…
- JS - Chunk Notes & Prepare Embedding Requests (Code): runs custom JavaScript code
- Wait: pauses before continuing
- HTTP Request: calls an HTTP API (POST)
- JS - Vector Similarity Search & Context Assembly (Code): runs custom JavaScript code
- AI - Generate Flashcards from Context (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- JS - Parse, Validate, Dedupe & Assign SM-2 Scheduling (Code): runs custom JavaScript code
- Wait: pauses before continuing
- If: checks a condition and branches into true / false
- Wait: pauses before continuing
…plus 3 more steps. See the full node list below.
Services it uses
Other OpenAI + Slack templates (979)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow turns submitted study notes into a reviewed flashcard deck by chunking the text, retrieving the most relevant passages with OpenAI embeddings, generating grounded Q&A cards with an OpenAI chat model, and sending the approved deck…