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

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

Needs changes

by David Roberts ✓ · 12,819 views · created 2024-02-06 · Engineering, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: LangChain Code (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 4 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI Chat Model.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Set YouTube video ID (Edit Fields (Set)): sets 1 field: videoId
  2. LangChain Code: uses LangChain Code, with model: OpenAI Chat Model

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • LangChain Code (legacy) in LangChain Code: no direct replacement.
Removed in 3.0Replace with
LangChain Code (legacy)
LangChain Code
No direct replacement

Nodes used (4)

From the author

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…

Excerpt from David Roberts's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.