Skip to content
FlowHubFluxonLab
LangChain Code
AI Automationfree

Use any LangChain module in n8n (with the LangChain code node)

by David Robertsadapted from n8n official workflow galleryUpdated Aug 2026
RequiresLangChain CodeLangChain CodeOpenAI Chat ModelOpenAI Chat Model
Share Post Share
MaWhen clicking "Execute Workflow"When clicking "…CoLangChain CodeSeSet YouTube video IDSet YouTube vid…OpenAI Chat ModelOpenAI Chat Mod…123
1/5
STEPS · 3
Run manually by an operator

LangChain is a framework for building AI functionality that users large language models. By leveraging the functionality of LangChain, you can write even more powerful workflows. This workflow shows how you can write LangChain code within n8n, including importing LangChain modules. The workflow itself produces a summary of a YouTube video, when given the video's ID. Note that to use this template, you need to be on n8n version 1.19.4 or later.

Tags

n8nreference-onlylm-chat-open-ai
Connects
langchaincodeLangChain CodeopenaichatmodelOpenAI Chat Model
CategoryAI Automation
Triggermanual
Complexitymedium
Nodes4
AddedFeb 6, 2024

Related workflows

See all AI Automation
Acodetoollangchaincodeopenaichatmodel
free

Custom LangChain agent written in JavaScript

This workflow has multiple functionalities. It starts with a manual trigger, "When clicking 'Execute Workflow'", that activates two separate paths. The first path takes a preset string "Tell me a joke" and processes it through a custom Language Learning Model (LLM) chain node. This node interacts with an OpenAI node for query processing. The second path takes another preset string "What year was Einstein born?" and passes it to an "Agent" node. This agent further interacts with a Chat OpenAI node and a custom Wikipedia node to produce the required information. The workflow uses both built-in and custom nodes, and integrates with OpenAI for both paths. It's built for experimenting with language models, specifically in the context of conversational agents and information retrieval. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
Agmailopenaichatmodeltextclassifier
free

Suggest meeting slots using AI

The purpose of this n8n workflow is to automate the process of identifying incoming Gmail emails that are requesting an appointment, evaluating their content, checking calendar availability, and then composing and sending a response email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
autofixingoutputparserBopenaichatmodelstructuredoutputparser
free

Force AI to use a specific output format

This workflow is for anyone looking to automatically fetch, validate, and parse complex language-based queries into a structured format. Its unique capability lies in not only processing language but also fixing invalid outputs before structuring them. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team