LangChain Workflow Retriever Example
detail.loadingPreview
Demonstrates using LangChain's Retriever QA Chain to query data retrieved from another workflow.
About This Workflow
This workflow showcases how to leverage the LangChain integration in n8n to build a Question Answering system. It utilizes a retrieverWorkflow node to fetch relevant data from a specified workflow and then employs a chainRetrievalQa node to answer a user's query based on that retrieved data. An OpenAI Chat Model is used for generating the answers.
Key Features
- Workflow Retrieval: Dynamically fetch data from a pre-defined n8n workflow.
- Retrieval QA: Implement a Question Answering chain using LangChain.
- LLM Integration: Connects with OpenAI's chat models for generating responses.
- User Input: Accepts user queries to find specific information.
How To Use
- Manual Trigger: Start the workflow by clicking the "Execute Workflow" button.
- Example Prompt: Defines the user's question. Currently set to "What notes can you find for Jay Gatsby and what is his email address?"
- Workflow Retriever: This node is crucial. Replace
QacfBRBnf1xOyckCwith the actual ID of the workflow you want to retrieve data from. This workflow should contain the data you wish to query. - OpenAI Chat Model: Configured to use your OpenAI credentials to process the query and generate a response.
- Retrieval QA Chain2: Connects the retrieved data, the user's prompt, and the language model to produce the final answer.
Apps Used
Workflow JSON
{
"id": "9f6f26b9-60ee-4920-a8ec-8c86136fa145",
"name": "LangChain Workflow Retriever Example",
"nodes": 20,
"category": "AI",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 9f6f26b9-60ee...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Generate Multilingual Image Captions and Overlay
This workflow generates captions for images using Google Gemini and overlays them onto the image, with support for multilingual output.
Build an AI Documentation Expert Chatbot with Gemini RAG
This n8n workflow automates the creation of an AI-powered expert chatbot capable of answering questions based on your documentation. It intelligently ingests, cleans, and processes your knowledge base, preparing it for a Retrieval Augmented Generation (RAG) pipeline with Google Gemini.
Automated Gmail Labeling with AI
Automatically categorize incoming emails in Gmail using AI, creating new labels when necessary.