AutomationFlowsAI & RAG › Agent: Chat

Agent: Chat

Agent: Chat. Uses agent, lmChatOpenRouter, chatTrigger. Webhook trigger; 5 nodes.

Webhook trigger★★☆☆☆ complexityAI-powered5 nodesAgentOpenRouter ChatChat Trigger
AI & RAG Trigger: Webhook 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
{
  "name": "Agent: Chat",
  "active": false,
  "versionId": "agent-chat-v1",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "agent/chat",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        304
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": ""
        }
      },
      "id": "ai-agent",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        224,
        304
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "chat-model",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        224,
        512
      ],
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"response\": $json.output, \"success\": true } }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "success-response",
      "name": "Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        608,
        304
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        -64,
        592
      ],
      "id": "cd114b6a-aa43-4f3d-b626-59e49c47e538",
      "name": "When chat message received"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "agent"
    },
    {
      "name": "ai"
    }
  ]
}

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

Agent: Chat. Uses agent, lmChatOpenRouter, chatTrigger. Webhook trigger; 5 nodes.

Source: https://github.com/PensiveFox/app-n8n-front/blob/4c23150b2ce6cb51c41973841974cf43686e1ce7/workflows/agent-chat.json — 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

FE-BE-SELF. Uses httpRequest, n8n-nodes-minio, agent, chatTrigger. Webhook trigger; 12 nodes.

HTTP Request, N8N Nodes Minio, Agent +3
AI & RAG

This template uses Firecrawl’s API to perform AI-powered web scraping and screenshots — no code required. Just type natural language prompts, and an AI Agent will convert them into precise Firecrawl q

HTTP Request, Chat Trigger, OpenRouter Chat +2
AI & RAG

Workflow Hcmute. Uses agent, lmChatGoogleGemini, memoryBufferWindow, googleSheetsTool. Webhook trigger; 13 nodes.

Agent, Google Gemini Chat, Memory Buffer Window +2
AI & RAG

API Calls in n8n. Uses chatTrigger, agent, lmChatOpenRouter, openWeatherMap. Chat trigger; 12 nodes.

Chat Trigger, Agent, OpenRouter Chat +3
AI & RAG

Power BI Data Analyst Agent. Uses stickyNote, chatTrigger, agent, lmChatOpenRouter. Chat trigger; 12 nodes.

Chat Trigger, Agent, OpenRouter Chat +4