AutomationFlowsAI & RAG › AI Chat Agent with OpenAI & SerpAPI

AI Chat Agent with OpenAI & SerpAPI

Original n8n title: Send (chat Trigger)

Send. Uses chatTrigger, memoryBufferWindow, lmChatOpenAi, toolSerpApi. Chat trigger; 5 nodes.

Chat trigger trigger★★☆☆☆ complexityAI-powered5 nodesChat TriggerMemory Buffer WindowOpenAI ChatTool Serp ApiAgent
AI & RAG Trigger: Chat trigger Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ef4c6982-f746-4d48-944b-449f8bdbb69f",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -380
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "e6183978-5077-4252-9718-6b36b6a7cd74",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        160,
        -160
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "1719e956-f9c8-48f5-9744-ee62345a9f7d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        20,
        -160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f0815af7-da61-4863-9cfa-b35be836b59c",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        300,
        -160
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "serpApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2d3b4012-bd5f-46d5-be6d-af1ede6c155b",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        60,
        -380
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.8
    }
  ],
  "connections": {
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Send. Uses chatTrigger, memoryBufferWindow, lmChatOpenAi, toolSerpApi. Chat trigger; 5 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Airbnb Agent. Uses agent, chatTrigger, memoryBufferWindow, lmChatOpenAi. Chat trigger; 12 nodes.

Agent, Chat Trigger, Memory Buffer Window +3
AI & RAG

Stickynote. Uses stickyNote, chatTrigger, lmChatOpenAi, memoryBufferWindow. Chat trigger; 9 nodes.

Chat Trigger, OpenAI Chat, Memory Buffer Window +3
AI & RAG

This workflow is designed for dynamic and intelligent conversational capabilities. It incorporates OpenAI's GPT-4o model for natural language understanding and generation. Additional tools include Ser

Chat Trigger, OpenAI Chat, Memory Buffer Window +3
AI & RAG

Ai Agent Chat. Uses lmChatOpenAi, memoryBufferWindow, toolSerpApi, chatTrigger. Chat trigger; 5 nodes.

OpenAI Chat, Memory Buffer Window, Tool Serp Api +2
AI & RAG

This workflow employs OpenAI's language models and SerpAPI to create a responsive, intelligent conversational agent. It comes equipped with manual chat triggers and memory buffer capabilities to ensur

Chat Trigger, Memory Buffer Window, OpenAI Chat +2