AutomationFlowsAI & RAG › Exasol Demo 5 — AI Data Analyst (agent)

Exasol Demo 5 — AI Data Analyst (agent)

Exasol Demo 5 — AI Data Analyst (Agent). Uses chatTrigger, agent, lmChatOpenAi, n8n-nodes-exasol. Chat trigger; 10 nodes.

Chat trigger trigger★★★☆☆ complexityAI-powered10 nodesChat TriggerAgentOpenAI ChatN8N Nodes Exasol
AI & RAG Trigger: Chat trigger Nodes: 10 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
{
  "id": "ExaDemo05AiAgent",
  "name": "Exasol Demo 5 \u2014 AI Data Analyst (Agent)",
  "active": false,
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "id": "d5000000-0000-4000-8000-000000000001",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "auto",
        "options": {
          "systemMessage": "You are a data analyst for an Exasol data warehouse. Before answering a question about data, explore the database first: list the schemas, list the tables of the relevant schema, and describe the tables you plan to query. Then answer using a single SELECT statement via the 'Run SQL Query' tool. Tables such as FLIGHTS.FLIGHTS and RETAIL.SALES contain hundreds of millions of rows, so ALWAYS aggregate (GROUP BY) or add a LIMIT clause (at most 100 rows). Quote reserved-word identifiers such as \"YEAR\" and \"MONTH\" with double quotes. You have read-only access; you cannot modify any data."
        }
      },
      "id": "d5000000-0000-4000-8000-000000000002",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        340,
        0
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 1000
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {}
      },
      "id": "d5000000-0000-4000-8000-000000000003",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        120,
        280
      ]
    },
    {
      "parameters": {
        "operation": "listSchemas",
        "descriptionType": "manual",
        "toolDescription": "List all schemas in the Exasol database. Returns one item per schema with its name and comment. Takes no input."
      },
      "id": "d5000000-0000-4000-8000-000000000004",
      "name": "List Schemas Tool",
      "type": "n8n-nodes-exasol.exasolTool",
      "typeVersion": 1,
      "position": [
        420,
        280
      ],
      "credentials": {
        "exasolApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 1000
    },
    {
      "parameters": {
        "operation": "listTables",
        "schema": "={{ $fromAI('schema', 'Name of the database schema to list the tables of', 'string') }}",
        "includeViews": true,
        "descriptionType": "manual",
        "toolDescription": "List all tables and views of one Exasol schema. Input: the schema name. Returns one item per table with schema, name, comment and type."
      },
      "id": "d5000000-0000-4000-8000-000000000005",
      "name": "List Tables Tool",
      "type": "n8n-nodes-exasol.exasolTool",
      "typeVersion": 1,
      "position": [
        660,
        280
      ],
      "credentials": {
        "exasolApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 1000
    },
    {
      "parameters": {
        "operation": "describeTable",
        "schema": "={{ $fromAI('schema', 'Name of the database schema the table belongs to', 'string') }}",
        "table": "={{ $fromAI('table', 'Name of the table or view to describe', 'string') }}",
        "descriptionType": "manual",
        "toolDescription": "Describe the columns of one Exasol table or view. Input: schema name and table name. Returns one item per column (name, type, nullable, default, comment) plus a final item summarizing the table's constraints."
      },
      "id": "d5000000-0000-4000-8000-000000000006",
      "name": "Describe Table Tool",
      "type": "n8n-nodes-exasol.exasolTool",
      "typeVersion": 1,
      "position": [
        900,
        280
      ],
      "credentials": {
        "exasolApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 1000
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "={{ $fromAI('sql_query', 'One Exasol SELECT statement. Must aggregate or contain a LIMIT clause of at most 100 rows. Reserved-word identifiers like YEAR and MONTH must be double-quoted.', 'string') }}",
        "restrictToSelect": true,
        "executionMode": "sequentially",
        "descriptionType": "manual",
        "toolDescription": "Run a single read-only SELECT statement against the Exasol database and return the result rows. Non-SELECT statements are rejected."
      },
      "id": "d5000000-0000-4000-8000-000000000007",
      "name": "Run SQL Query Tool",
      "type": "n8n-nodes-exasol.exasolTool",
      "typeVersion": 1,
      "position": [
        1140,
        280
      ],
      "credentials": {
        "exasolApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 1000
    },
    {
      "parameters": {
        "content": "## Demo 5 \u2014 AI Data Analyst\n\nThe Exasol node declares `usableAsTool`, so an AI Agent can call it as a tool. Chat with the agent; it explores the catalog and answers with guarded SELECTs.\n\n**Setup:** attach your own credential to the Chat Model node (any chat-model node works).\n\nTry: *\"Which schemas are in this database?\"* or *\"Top 5 airlines by flight count in the latest month of data?\"*",
        "height": 300,
        "width": 900,
        "color": 5
      },
      "id": "d5s00000-0000-4000-8000-900000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -80,
        -380
      ]
    },
    {
      "parameters": {
        "content": "### Bring your own model\n\nShipped without credentials on purpose \u2014 attach an OpenAI credential, or replace this node with any other chat-model node.",
        "height": 380,
        "width": 280
      },
      "id": "d5s00000-0000-4000-8000-900000000002",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        60,
        200
      ]
    },
    {
      "parameters": {
        "content": "### Read-only tools\n\nThe agent fills tool inputs via `$fromAI()`. The three Schema Explorer tools are for discovery; *Run SQL Query* keeps **Restrict to SELECT Queries** on \u2014 the option is not expression-capable, so the agent cannot switch it off. The credential\u2019s *Result Row Limit* (1000) caps runaway result sets.",
        "height": 380,
        "width": 1010
      },
      "id": "d5s00000-0000-4000-8000-900000000003",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        390,
        200
      ]
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "List Schemas Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "List Tables Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Describe Table Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Run SQL Query Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}

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

Exasol Demo 5 — AI Data Analyst (Agent). Uses chatTrigger, agent, lmChatOpenAi, n8n-nodes-exasol. Chat trigger; 10 nodes.

Source: https://github.com/exasol/n8n-nodes/blob/e4385c22cdeb5c9e3f9b829cc6055adc1b0aea94/examples/05-ai-data-analyst-agent.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

Generate Sql Queries From Schema Only Ai Powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.

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

Generate SQL queries from schema only - AI-powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.

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

Extract Insights & Analyse Youtube Comments Via Ai Agent Chat. Uses stickyNote, lmChatOpenAi, toolWorkflow, memoryPostgresChat. Chat trigger; 29 nodes.

OpenAI Chat, Tool Workflow, Memory Postgres Chat +5
AI & RAG

Generate SQL queries from schema only - AI-powered. Uses lmChatOpenAi, memoryBufferWindow, noOp, mySql. Chat trigger; 29 nodes.

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

This workflow is a modification of the previous template on how to create an SQL agent with LangChain and SQLite.

OpenAI Chat, Memory Buffer Window, MySQL +3