LangChain - Example - Code Node Example

Self-coded LLM Chain Node

Integrations Used (4)

Workflow Structure (8 nodes)
100%
Manual Trigger
When clicking "Execute Workflow"
Set
Set
Langchain.code
Custom - LLM Chain Node
Langchain.lm Open Ai
OpenAI
Set
Set1
Langchain.lm Chat Open Ai
Chat OpenAI
Langchain.agent
Agent
Langchain.code
Custom - Wikipedia
Node Types:
default
trigger
transform
code
Requires credentials

Prerequisites

Required Credentials (1)

OpenAI

Used by: OpenAI, Chat OpenAI

Docs

Complexity

Complex

Advanced features used. Requires n8n experience.

Setup time: ~30 min
Score: 37/100
Custom Code

When to Use This Workflow

AI-Powered Content Creation

Automate content generation, summarization, or analysis using AI capabilities.

Save hours of manual work while maintaining quality and consistency.

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "id": "q2MJWAqpKF2BCJkq",
  "meta": {
    "instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff"
  },
  "name": "LangChain - Example - Code Node Example",
  "tags": [
    {
      "id": "snf16n0p2UrGP838",
      "name": "LangChain - Example",
      "createdAt": "2023-09-25T16:21:55.962Z",
      "updatedAt": "2023-09-25T16:21:55.962Z"
    }
  ],
  "nodes": [
    {
      "id": "ad1a920e-1048-4b58-9c4a-a0469a1f189d",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmOpenAi",
      "position": [
...

Workflow Details

Nodes
10
Trigger
Manual
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Autonomous AI crawler

Text scraper tool This tool is designed to return all text from the given webpage. 💡 Consider adding proxy for better c...

Toolworkflow
Lmchatopenai
Outputparserstructured
Supabase
38 nodesManual
Curated

Hacker News to Video Template - AlexK1919

Choose your data source This can be swapped for any other data source of your choosing.

Hackernews
Lmchatopenai
Toolhttprequest
Outputparserstructured
48 nodesManual
Curated

AI chatbot that can search the web

The conversation history(last 20 messages) is stored in a buffer memory

Manualchat
Lmchatopenai
Toolwikipedia
Memorybufferwindow
9 nodesManual
Curated

RAG Workflow For Stock Earnings Report Analysis

Set up steps 1. Google Cloud Project & Vertex AI API: Create a Google Cloud project. Enable the Vertex AI API for your...

Vectorstorepinecone
Embeddingsgooglegemini
Documentdefaultdataloader
Textsplitterrecursivecharactertextsplitter
18 nodesManual
Curated

Email AI Auto-responder. Summerize and send email

STEP 1 Create Qdrant Collection Change: - QDRANTURL - COLLECTION

Emailreadimap
Lmchatopenai
Emailsend
Vectorstoreqdrant
26 nodesManual
Curated

Podcast Digest

Chunk the transcript into several parts, and refine-summarize it

Documentjsoninputloader
Textsplitterrecursivecharactertextsplitter
Chainsummarization
Lmchatopenai
19 nodesManual
Curated