{
  "name": "Query PostgreSQL database with natural language using Groq AI chatbot",
  "nodes": [
    {
      "id": "3be32b55-6c92-45e3-805f-3c582f6bb237",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        760,
        320
      ]
    },
    {
      "id": "c0685ca7-91bd-4177-848d-ea7f3a4c160f",
      "name": "Chat History",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1100,
        520
      ]
    },
    {
      "id": "b2e6112c-451e-434f-a732-4c469721f364",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1180,
        320
      ]
    },
    {
      "id": "52a55d14-7a46-43fb-9f8c-5fdd099cc4b8",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        920,
        520
      ]
    },
    {
      "id": "d9ff0f6e-e08d-49bc-bd29-1a6602b1562e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        700
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "56b21c24-9a74-4f61-ad03-2e6c892350d6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        700
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "63a28a91-68e3-45a5-b236-559db54f87b7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        700
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b6dad064-7699-4f07-99c5-cca3a5f3bb82",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        100
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "36b9bf75-cb1d-45ed-8e01-99c272580fae",
      "name": "PostgreSQL Schema",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        1480,
        520
      ]
    },
    {
      "id": "71f57073-6857-4b7f-9ee9-e1dc3ce250c5",
      "name": "PostgreSQL Definition",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        1660,
        520
      ]
    },
    {
      "id": "95e64a15-03c5-44d9-9a33-4cbd392ab008",
      "name": "PostgreSQL",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        1280,
        520
      ]
    }
  ],
  "connections": {
    "PostgreSQL": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Chat History": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "PostgreSQL Schema": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "PostgreSQL Definition": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}