Use LangChain Modules in n8n with the Code Node

n8n AI Dev Ops Productivity

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

LangChain is a framework for building AI functionality that utilizes 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.

Tools used: LangChain

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.