{
  "openruna_format": "flow-graph-v1",
  "title": "Chat with Postgresql Database",
  "slug": "chat-with-postgresql-database",
  "source_filename": "1377_Postgrestool_Stickynote_Automation_Triggered.json",
  "nodes": [
    {
      "id": "When chat message received",
      "name": "When chat message received",
      "integration": "@n8n/n8n-nodes-langchain.chat",
      "kind": "trigger"
    },
    {
      "id": "AI Agent",
      "name": "AI Agent",
      "integration": "@n8n/n8n-nodes-langchain.agent",
      "kind": "action"
    },
    {
      "id": "OpenAI Chat Model",
      "name": "OpenAI Chat Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Get Table Definition",
      "name": "Get Table Definition",
      "integration": "postgresTool",
      "kind": "action"
    },
    {
      "id": "Chat History",
      "name": "Chat History",
      "integration": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "kind": "action"
    },
    {
      "id": "Execute SQL Query",
      "name": "Execute SQL Query",
      "integration": "postgresTool",
      "kind": "action"
    },
    {
      "id": "Get DB Schema and Tables List",
      "name": "Get DB Schema and Tables List",
      "integration": "postgresTool",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "When chat message received",
      "to": "AI Agent"
    }
  ]
}