{
  "name": "Use any LangChain module in n8n (with the LangChain code node)",
  "nodes": [
    {
      "id": "b7e2de27-e52c-46d1-aaa9-a67c11c48a8f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -60
      ],
      "parameters": {
        "width": 328.41313484548044,
        "height": 211.30313955500145,
        "content": "Before executing, replace `YOUR_API_KEY` with an API key for searchapi.io"
      }
    },
    {
      "id": "fd2ac655-73fd-434a-bba4-e460af8dfa8a",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -820,
        20
      ]
    },
    {
      "id": "e1bd87f7-283b-496d-910d-b92d1cb19237",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1140,
        -20
      ],
      "parameters": {
        "width": null,
        "height": 220.82906011310624,
        "content": "## About\nThis workflow shows how you can write LangChain code in n8n (and import its modules if required).\n\nThe workflow fetches a video from YouTube and produces a textual summary of it."
      }
    },
    {
      "id": "a43bb1c5-dd90-4331-930c-128ef0ecb38a",
      "name": "LangChain Code",
      "type": "@n8n/n8n-nodes-langchain.code",
      "position": [
        -380,
        20
      ]
    },
    {
      "id": "a36440c5-402e-44e6-819c-2a19dc9e3e1e",
      "name": "Set YouTube video ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -600,
        20
      ]
    },
    {
      "id": "02386530-9aef-4732-9972-5624b78431a6",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -340,
        220
      ]
    }
  ],
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "LangChain Code",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set YouTube video ID": {
      "main": [
        [
          {
            "node": "LangChain Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Set YouTube video ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}