8
n8n ํ•œ๊ตญ์–ดamn8n.com

โœจ๐Ÿ“Š Postgres/Supabase ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋ฐ QuickCharts + ๋„๊ตฌ ๋ผ์šฐํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋‹ค์ค‘ AI ๋Œ€๋ฆฌ์ž ์ฑ—๋ด‡

๊ณ ๊ธ‰

์ด๊ฒƒ์€AI๋ถ„์•ผ์˜์ž๋™ํ™” ์›Œํฌํ”Œ๋กœ์šฐ๋กœ, 40๊ฐœ์˜ ๋…ธ๋“œ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.์ฃผ๋กœ Set, Switch, HttpRequest, PostgresTool, Agent ๋“ฑ์˜ ๋…ธ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉฐ์ธ๊ณต์ง€๋Šฅ ๊ธฐ์ˆ ์„ ๊ฒฐํ•ฉํ•˜์—ฌ ์Šค๋งˆํŠธ ์ž๋™ํ™”๋ฅผ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. โœจ๐Ÿ“Š Postgres/Supabase ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์™€ QuickCharts + ๋„๊ตฌ ๋ผ์šฐํ„ฐ์˜ ๋‹ค์ค‘ AI ๋Œ€๋ฆฌ์ž ์ฑ„ํŒ… ๋กœ๋ด‡

์‚ฌ์ „ ์š”๊ตฌ์‚ฌํ•ญ
  • โ€ข๋Œ€์ƒ API์˜ ์ธ์ฆ ์ •๋ณด๊ฐ€ ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Œ
  • โ€ขPostgreSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์—ฐ๊ฒฐ ์ •๋ณด
  • โ€ขOpenAI API Key

์นดํ…Œ๊ณ ๋ฆฌ

์›Œํฌํ”Œ๋กœ์šฐ ๋ฏธ๋ฆฌ๋ณด๊ธฐ
๋…ธ๋“œ ์—ฐ๊ฒฐ ๊ด€๊ณ„๋ฅผ ์‹œ๊ฐ์ ์œผ๋กœ ํ‘œ์‹œํ•˜๋ฉฐ, ํ™•๋Œ€/์ถ•์†Œ ๋ฐ ์ด๋™์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค
์›Œํฌํ”Œ๋กœ์šฐ ๋‚ด๋ณด๋‚ด๊ธฐ
๋‹ค์Œ JSON ๊ตฌ์„ฑ์„ ๋ณต์‚ฌํ•˜์—ฌ n8n์— ๊ฐ€์ ธ์˜ค๋ฉด ์ด ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค
{
  "id": "Q63cSgFlcqz291ec",
  "meta": {
    "instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef",
    "templateCredsSetupCompleted": true
  },
  "name": "โœจ๐Ÿ“ŠMulti-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router",
  "tags": [],
  "nodes": [
    {
      "id": "3a332532-a56e-42f5-a114-4a7e138b5e0f",
      "name": "์ฑ„ํŒ… ๋ฉ”์‹œ์ง€ ์ˆ˜์‹  ์‹œ",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -1420
      ],
      "webhookId": "faddb40a-7048-4398-a0f9-d239a19c32ce",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "6c707ee7-95e9-4ebd-9373-a2dac0ea73a7",
      "name": "SQL ์ฟผ๋ฆฌ ์‹คํ–‰",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        460,
        -500
      ],
      "parameters": {
        "query": "{{ $fromAI(\"sql_query\", \"SQL Query\") }}",
        "options": {},
        "operation": "executeQuery",
        "descriptionType": "manual",
        "toolDescription": "Use this tool to query the database with SQL queries"
      },
      "credentials": {
        "postgres": {
          "id": "wZnget4L3P3bnlfh",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "1d5572e1-de5a-4e67-8ba1-82196bd62e9b",
      "name": "๋‹ค๋ฅธ ์›Œํฌํ”Œ๋กœ์šฐ์— ์˜ํ•ด ์‹คํ–‰ ์‹œ",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -480,
        -360
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "user_prompt"
            },
            {
              "name": "route"
            },
            {
              "name": "db_records"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "e3caa1b3-7bdb-43c1-a749-74ae02912d84",
      "name": "query_db_tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        720,
        -1100
      ],
      "parameters": {
        "name": "query_database_tool",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{  $workflow.id }}"
        },
        "description": "Use this tool to query the database",
        "workflowInputs": {
          "value": {
            "route": "query_database_tool",
            "user_prompt": "={{ $('When chat message received').item.json.chatInput }}"
          },
          "schema": [
            {
              "id": "user_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "route",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "route",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_prompt"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2
    },
    {
      "id": "594e6fd3-084a-4100-ac16-1cc4068e03c1",
      "name": "generate_quickchart_tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        980,
        -1100
      ],
      "parameters": {
        "name": "generate_chart_tool",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{  $workflow.id }}"
        },
        "description": "Use this tool to generate a chart with QuickChart",
        "workflowInputs": {
          "value": {
            "route": "generate_chart_tool",
            "db_records": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('db_records', `The database records`, 'string') }}",
            "user_prompt": "={{ $('When chat message received').item.json.chatInput }}"
          },
          "schema": [
            {
              "id": "user_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "route",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "route",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "db_records",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "db_records",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_prompt"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2
    },
    {
      "id": "580426ac-0fb7-4f14-af7b-e497b7cb08f8",
      "name": "QuickChart ์ƒ์„ฑ",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        780,
        -140
      ],
      "parameters": {
        "url": "={{ encodeURI($json.url) }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "b7085357-ebe9-4564-868d-b31fc2e9734a",
      "name": "QuickChart ๊ฐ์ฒด ์Šคํ‚ค๋งˆ",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        460,
        140
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"type\": \"bar\",\n  \"data\": {\n    \"labels\": [\"R270684\", \"R274295\", \"R276352\", \"R277914\", \"R280108\"],\n    \"datasets\": [\n      {\n        \"label\": \"List Price\",\n        \"data\": [2149000, 924900, 924900, 1288000, 1198000],\n        \"backgroundColor\": \"#FF6384\"\n      },\n      {\n        \"label\": \"Days On Market\",\n        \"data\": [101, 91, 123, 136, 185],\n        \"backgroundColor\": \"#36A2EB\"\n      }\n    ]\n  },\n  \"options\": {\n    \"scales\": {\n      \"y\": {\n        \"min\": 0,\n        \"max\": 2200000\n      }\n    }\n  }\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "b1037112-f5af-4e61-8bd1-0d9b0a9ad2e1",
      "name": "gpt-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        200,
        -1100
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "responseFormat": "text"
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "jEMSvKmtYfzAkhe6",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5ea5ba56-2368-4e95-a98f-2c7548a66a9b",
      "name": "gpt-4o-mini-2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        200,
        140
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "=gpt-4o-mini"
        },
        "options": {
          "responseFormat": "text"
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "jEMSvKmtYfzAkhe6",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4b8f9978-9d46-48f5-93ca-002ade008887",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -1500
      ],
      "parameters": {
        "color": 5,
        "width": 1100,
        "height": 600,
        "content": "## ๐Ÿค–Primary AI Manager Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "f6534374-cc07-429a-b27c-b38835c96465",
      "name": "๐Ÿค–์ฃผ์š” ์—์ด์ „ํŠธ",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        -1420
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a helpful assistant that answers the users questions by using the tools provided.\n\n## TOOLS\n- query_database_tool: Use this tool to query the database\n- generate_chart_tool: Use this tool to generate a chart with QuickChart\n\nAlways provide the results of the database query and the link for the chart when applicable."
        }
      },
      "typeVersion": 1.7
    },
    {
      "id": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
      "name": "๐Ÿค–๋ณด์กฐ Postgres ์—์ด์ „ํŠธ",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        -780
      ],
      "parameters": {
        "text": "={{ $json.user_prompt }}",
        "options": {
          "systemMessage": "You are a helpful assistant with tools for querying a SQL database.  Use the tools provided to query the database."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "02d741d3-4b6e-4e19-8aca-3e15175e9667",
      "name": "๐Ÿค–๋ณด์กฐ QuickChart ์—์ด์ „ํŠธ",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        240,
        -140
      ],
      "parameters": {
        "text": "=Your task is to generate a Chart.js configuration object with the following specifications:\n- Chart type: bar unless otherwise indicated\n- Labels: Use the ML # from each record unless otherwise indicated\n- Show bar for list price if not otherwise indicated\n- Return only the raw JSON object without code fences or explanations\n\nThis is the user prompt: {{ $json.user_prompt }}\nThis is the result of the SQL query: {{ $json.db_records }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "4f41690b-313a-4ce3-ba65-a2ce2c3ee9b9",
      "name": "๐Ÿ”€๋„๊ตฌ ์—์ด์ „ํŠธ ๋ผ์šฐํ„ฐ",
      "type": "n8n-nodes-base.switch",
      "position": [
        -180,
        -360
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "๐Ÿ”query",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "35b1e13e-6157-48d0-85af-3cd33260eae1",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.route }}",
                    "rightValue": "=query_database_tool"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "๐Ÿ“Šchart",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ff5f97fb-0f18-4bf9-b16c-3d0b3bc3c7f4",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.route }}",
                    "rightValue": "=generate_chart_tool"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "27c30d2c-3af3-4d05-aadb-9f18751fb9ce",
      "name": "ํ…Œ์ด๋ธ” ์ •์˜",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        980,
        -500
      ],
      "parameters": {
        "query": "select\n  c.column_name,\n  c.data_type,\n  c.is_nullable,\n  c.column_default,\n  tc.constraint_type,\n  ccu.table_name AS referenced_table,\n  ccu.column_name AS referenced_column\nfrom\n  information_schema.columns c\nLEFT join\n  information_schema.key_column_usage kcu\n  ON c.table_name = kcu.table_name\n  AND c.column_name = kcu.column_name\nLEFT join\n  information_schema.table_constraints tc\n  ON kcu.constraint_name = tc.constraint_name\n  AND tc.constraint_type = 'FOREIGN KEY'\nLEFT join\n  information_schema.constraint_column_usage ccu\n  ON tc.constraint_name = ccu.constraint_name\nwhere\n  c.table_name = '{{ $fromAI(\"table_name\") }}'\n  AND c.table_schema = '{{ $fromAI(\"schema_name\") }}'\norder by\n  c.ordinal_position",
        "options": {},
        "operation": "executeQuery",
        "descriptionType": "manual",
        "toolDescription": "Use this tool to get table definition to find all columns and types"
      },
      "credentials": {
        "postgres": {
          "id": "wZnget4L3P3bnlfh",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "59dfd315-fb02-425c-a6ca-2d63167c2e24",
      "name": "Postgres ์ฑ„ํŒ… ๋ฉ”๋ชจ๋ฆฌ",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        460,
        -1100
      ],
      "parameters": {
        "tableName": "={{ $workflow.id }}_chat_history"
      },
      "credentials": {
        "postgres": {
          "id": "wZnget4L3P3bnlfh",
          "name": "Postgres account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "81dd8b73-0809-4f30-a867-bf98ff6a80bc",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -1180
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "## QuickChart Tool"
      },
      "typeVersion": 1
    },
    {
      "id": "1a08bc08-510b-4cda-b96e-179bd3abe164",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -1180
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "## Postgres Tool"
      },
      "typeVersion": 1
    },
    {
      "id": "9cc5e958-0f93-42ad-813e-83c8b5bb126e",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -1180
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "## LLM"
      },
      "typeVersion": 1
    },
    {
      "id": "920f9fe4-e182-4159-9152-e81586ec5304",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -1180
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": "## Chat Memory"
      },
      "typeVersion": 1
    },
    {
      "id": "d2a24dce-1add-49d6-8d2f-6547fca35bfb",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -1500
      ],
      "parameters": {
        "color": 4,
        "width": 340,
        "height": 280,
        "content": "## ๐Ÿ‘Start Here"
      },
      "typeVersion": 1
    },
    {
      "id": "d0df3ea6-9765-4f4d-a8f7-b2356ea1cf26",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -860
      ],
      "parameters": {
        "color": 6,
        "width": 1100,
        "height": 560,
        "content": "## โš’๏ธ๐Ÿค–Secondary Postgres Tool Agent "
      },
      "typeVersion": 1
    },
    {
      "id": "fe990853-fce6-4cbe-9cc2-fc04f53742e8",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -580
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c5086736-4dfe-44a3-a5dc-6cace0593334",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -580
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6b848863-10b2-42e4-8bd5-ed4663b9e5cb",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -580
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "75231fcf-8314-4ee6-96a7-99d842b6ee4f",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -580
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c54439c7-ccb1-41a4-ad76-8ed39f7fc5e6",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -460
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 320,
        "content": "## Tool Agent Router ๐Ÿ”€"
      },
      "typeVersion": 1
    },
    {
      "id": "b51ffe20-2ae4-478b-9573-fc5456935483",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -260
      ],
      "parameters": {
        "color": 6,
        "width": 1100,
        "height": 600,
        "content": "## โš’๏ธ๐Ÿค–Secondary QuickChart Tool Agent"
      },
      "typeVersion": 1
    },
    {
      "id": "ffb9da23-f79c-4d20-81a3-656471bdda33",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        60
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "61532d90-1f65-48d0-a408-2e6edd9511b1",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        60
      ],
      "parameters": {
        "color": 7,
        "height": 240,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5b125fa6-8017-437e-bb20-b9deb5d52c63",
      "name": "์ตœ์ข… QuickChart URL",
      "type": "n8n-nodes-base.set",
      "position": [
        980,
        -140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "63bab42a-9b9b-4756-88d2-f41cff9a1ded",
              "name": "quickchart_url",
              "type": "string",
              "value": "={{ encodeURI($json.url) }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2c66055d-1ca2-40f3-a082-57232402fdd1",
      "name": "QuickChart GET URL",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        -140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d69995ae-413e-49e7-b6ec-17e9e034e4b6",
              "name": "url",
              "type": "string",
              "value": "={{ \"https://quickchart.io/chart?width=250&height=150&chart=\" + $json.output.toJsonString() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0a0f024d-24fa-43e9-bfa6-b841902b5e5e",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -1600
      ],
      "parameters": {
        "color": 7,
        "width": 1760,
        "height": 1980,
        "content": "# โœจ๐Ÿ“ŠMulti-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router"
      },
      "typeVersion": 1
    },
    {
      "id": "a50b4d31-7e9e-4cd0-84b9-f4755deb6efd",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -1180
      ],
      "parameters": {
        "width": 540,
        "height": 240,
        "content": "## Setup\n\n1. Create a Postgres compatible database (Supabase)\n\n2. Add your Postgres and OpenAI credentials\n\n3. Click Chat button and start chatting with your database and creating QuickChart to visualize the results\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3df0304a-323b-4bd4-96ce-2907367ede8d",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -860
      ],
      "parameters": {
        "width": 542,
        "height": 296,
        "content": "## Postgres Tools Used\n\n1. **Execute SQL Query** \nUsed to execute any query generated by the agent.\n\n2. **DB Schema and Tables** \nReturns the list of all the tables with its schema name.\n\n3. **Table Definition** \nReturns table details like column names, foreign keys and more of a particular table in a schema."
      },
      "typeVersion": 1
    },
    {
      "id": "feaeaf6d-f5b8-4dbe-a39b-d07882142ead",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -40
      ],
      "parameters": {
        "width": 542,
        "height": 376,
        "content": "## Generate a Quickchart\n\n**Secondary QuickChart Agent Tool**\nThis section handles the chart generation process through several steps by sending the database records and user prompt to OpenAI to create a JSON object based on Chart.js and QuickChart.io definitions\n\n**QuickChart GET URL node**\nThis sections adds chart definitions to a QuickChart.io URL\n\n**Create QuickChart node**\nThis sections sends chart queries to QuickCharts with a defined JSON format\n\n\n\nThis integration allows you to dynamically generate charts based on data queries, with AI assistance for formatting and optimization.\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6c9be4d2-46e9-44ae-8751-f4f4964323e9",
      "name": "DB ์Šคํ‚ค๋งˆ ๋ฐ ํ…Œ์ด๋ธ”",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        720,
        -500
      ],
      "parameters": {
        "query": "SELECT \n    table_schema,\n    table_name\nFROM information_schema.tables\nWHERE table_type = 'BASE TABLE'\n    AND table_schema NOT IN ('pg_catalog', 'information_schema')\nORDER BY table_schema, table_name;",
        "options": {},
        "operation": "executeQuery",
        "descriptionType": "manual",
        "toolDescription": "Use this tool to get a list of all tables with their schema in the database"
      },
      "credentials": {
        "postgres": {
          "id": "wZnget4L3P3bnlfh",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "4e779b6f-963c-4efb-af43-bec0e5c3228c",
      "name": "gpt-40-mini-1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        200,
        -500
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "responseFormat": "text"
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "jEMSvKmtYfzAkhe6",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a6cc9a4e-b016-47f6-9f9f-9c77a15c2be2",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        180
      ],
      "parameters": {
        "width": 440,
        "height": 120,
        "content": "## QuickChart Schema\nAdjust the QuickChart Schema to match your use case.\n\nhttps://quickchart.io/documentation/"
      },
      "typeVersion": 1
    },
    {
      "id": "9855ba6a-d46b-4461-a397-02108023abc5",
      "name": "์Šคํ‹ฐ์ปค ๋…ธํŠธ20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        60
      ],
      "parameters": {
        "width": 440,
        "height": 100,
        "content": "## Chart Size\nAdjust the chart size in the QuickChart GET URL node.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "When Executed by Another Workflow": [
      {
        "json": {
          "route": "generate_chart_tool",
          "db_records": "[{\"mls_num\":\"R292309\",\"list_price\":1148000},{\"mls_num\":\"R292302\",\"list_price\":1298000},{\"mls_num\":\"R294786\",\"list_price\":1280000},{\"mls_num\":\"V17840\",\"list_price\":939000},{\"mls_num\":\"V10178\",\"list_price\":420000},{\"mls_num\":\"V18007\",\"list_price\":296500},{\"mls_num\":\"V18136\",\"list_price\":379000},{\"mls_num\":\"V18643\",\"list_price\":329000},{\"mls_num\":\"V17755\",\"list_price\":236000},{\"mls_num\":\"V19126\",\"list_price\":245500}]",
          "user_prompt": "provide a bar chart showing mls# and list price"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9781f576-38ef-4e18-9fbe-8383565cb032",
  "connections": {
    "b1037112-f5af-4e61-8bd1-0d9b0a9ad2e1": {
      "ai_languageModel": [
        [
          {
            "node": "f6534374-cc07-429a-b27c-b38835c96465",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "4e779b6f-963c-4efb-af43-bec0e5c3228c": {
      "ai_languageModel": [
        [
          {
            "node": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "5ea5ba56-2368-4e95-a98f-2c7548a66a9b": {
      "ai_languageModel": [
        [
          {
            "node": "02d741d3-4b6e-4e19-8aca-3e15175e9667",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "e3caa1b3-7bdb-43c1-a749-74ae02912d84": {
      "ai_tool": [
        [
          {
            "node": "f6534374-cc07-429a-b27c-b38835c96465",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "580426ac-0fb7-4f14-af7b-e497b7cb08f8": {
      "main": [
        [
          {
            "node": "5b125fa6-8017-437e-bb20-b9deb5d52c63",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6c707ee7-95e9-4ebd-9373-a2dac0ea73a7": {
      "ai_tool": [
        [
          {
            "node": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "27c30d2c-3af3-4d05-aadb-9f18751fb9ce": {
      "ai_tool": [
        [
          {
            "node": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f6534374-cc07-429a-b27c-b38835c96465": {
      "main": [
        []
      ]
    },
    "2c66055d-1ca2-40f3-a082-57232402fdd1": {
      "main": [
        [
          {
            "node": "580426ac-0fb7-4f14-af7b-e497b7cb08f8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6c9be4d2-46e9-44ae-8751-f4f4964323e9": {
      "ai_tool": [
        [
          {
            "node": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "59dfd315-fb02-425c-a6ca-2d63167c2e24": {
      "ai_memory": [
        [
          {
            "node": "f6534374-cc07-429a-b27c-b38835c96465",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "4f41690b-313a-4ce3-ba65-a2ce2c3ee9b9": {
      "main": [
        [
          {
            "node": "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "02d741d3-4b6e-4e19-8aca-3e15175e9667",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b7085357-ebe9-4564-868d-b31fc2e9734a": {
      "ai_outputParser": [
        [
          {
            "node": "02d741d3-4b6e-4e19-8aca-3e15175e9667",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "594e6fd3-084a-4100-ac16-1cc4068e03c1": {
      "ai_tool": [
        [
          {
            "node": "f6534374-cc07-429a-b27c-b38835c96465",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "3a332532-a56e-42f5-a114-4a7e138b5e0f": {
      "main": [
        [
          {
            "node": "f6534374-cc07-429a-b27c-b38835c96465",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cf246e46-b3e4-4c9f-96f9-be1b91c0a3eb": {
      "main": [
        []
      ]
    },
    "02d741d3-4b6e-4e19-8aca-3e15175e9667": {
      "main": [
        [
          {
            "node": "2c66055d-1ca2-40f3-a082-57232402fdd1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1d5572e1-de5a-4e67-8ba1-82196bd62e9b": {
      "main": [
        [
          {
            "node": "4f41690b-313a-4ce3-ba65-a2ce2c3ee9b9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

์ด ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋‚˜์š”?

์œ„์˜ JSON ๊ตฌ์„ฑ ์ฝ”๋“œ๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ n8n ์ธ์Šคํ„ด์Šค์—์„œ ์ƒˆ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  "JSON์—์„œ ๊ฐ€์ ธ์˜ค๊ธฐ"๋ฅผ ์„ ํƒํ•œ ํ›„, ๊ตฌ์„ฑ์„ ๋ถ™์—ฌ๋„ฃ๊ณ  ํ•„์š”์— ๋”ฐ๋ผ ์ธ์ฆ ์„ค์ •์„ ์ˆ˜์ •ํ•˜์„ธ์š”.

์ด ์›Œํฌํ”Œ๋กœ์šฐ๋Š” ์–ด๋–ค ์‹œ๋‚˜๋ฆฌ์˜ค์— ์ ํ•ฉํ•œ๊ฐ€์š”?

๊ณ ๊ธ‰ - ์ธ๊ณต์ง€๋Šฅ

์œ ๋ฃŒ์ธ๊ฐ€์š”?

์ด ์›Œํฌํ”Œ๋กœ์šฐ๋Š” ์™„์ „ํžˆ ๋ฌด๋ฃŒ์ด๋ฉฐ ์ง์ ‘ ๊ฐ€์ ธ์™€ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋งŒ, ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํƒ€์‚ฌ ์„œ๋น„์Šค(์˜ˆ: OpenAI API)๋Š” ์‚ฌ์šฉ์ž ์ง์ ‘ ๋น„์šฉ์„ ์ง€๋ถˆํ•ด์•ผ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ด€๋ จ ์›Œํฌํ”Œ๋กœ์šฐ ์ถ”์ฒœ

โšก๐Ÿ“ฝ๏ธ ์ตœ์ข… AI ์ถ”๋™ YouTube ์š”์•ฝ ๋ฐ ๋ถ„์„ ์ฑ—๋ด‡
โšก๐Ÿ“ฝ๏ธ YouTube ์š”์•ฝ ๋ฐ ๋ถ„์„์— ์‚ฌ์šฉ๋˜๋Š” ๋ชจ๋“  ๊ธฐ๋Šฅ์„ ๊ฐ–์ถ˜ AI ์ฑ„ํŒ… ๋กœ๋ด‡
Set
Code
Merge
+
Set
Code
Merge
29 ๋…ธ๋“œJoseph LePage
์ธ๊ณต์ง€๋Šฅ
๐Ÿ”๐Ÿ› ๏ธ Perplexity ์—ฐ๊ตฌ์›์„ HTML ์›น ํŽ˜์ด์ง€๋กœ ๋ณ€ํ™˜
๐Ÿ” Perplexity ์—ฐ๊ตฌ๋ฅผ HTML๋กœ ๋ณ€ํ™˜: AI ์ฃผ๋„์˜ ์ฝ˜ํ…์ธ  ์ฐฝ์ž‘
If
Set
Webhook
+
If
Set
Webhook
47 ๋…ธ๋“œJoseph LePage
์ธ๊ณต์ง€๋Šฅ
๐Ÿ”ฅ๐Ÿ“ˆ๐Ÿค– n8n ์ž‘์„ฑ์ž ๋žญํ‚น์— ์ ํ•ฉํ•œ AI ๋Œ€๋ฆฌ์ธ - ์ธ๊ธฐ ์ž‘์—… ํ๋ฆ„ ์ฐพ๊ธฐ
๐Ÿ”ฅ๐Ÿ“ˆ๐Ÿค– n8n ํฌ๋ฆฌ์—์ดํ„ฐ ๋žญํ‚น AI ์—์ด์ „ํŠธ - ์ธ๊ธฐ ์›Œํฌํ”Œ๋กœ์šฐ ์ฐพ๊ธฐ
Set
Sort
Limit
+
Set
Sort
Limit
43 ๋…ธ๋“œJoseph LePage
๊ธฐํƒ€
๐Ÿง  AI ์ฑ„ํŒ… ๋กœ๋ด‡์— ์žฅ๊ธฐ ๊ธฐ์–ต๊ณผ ๋™์  ๋„๊ตฌ ๋ผ์šฐํŒ… ์ œ๊ณต
๐Ÿง  AI ์ฑ„ํŒ… ๋กœ๋ด‡์— ์žฅ๊ธฐ ๊ธฐ์–ต๊ณผ ๋™์  ๋„๊ตฌ ๋ผ์šฐํŒ…์„ ์ œ๊ณตํ•˜์„ธ์š”
Set
Gmail
Switch
+
Set
Gmail
Switch
39 ๋…ธ๋“œJoseph LePage
๋นŒ๋”ฉ ๋ธ”๋ก
AI์ด๋ฉ”์ผๅˆ†่ฏŠไธŽGPT-4่ญฆๆŠฅ็ณป็ปŸๅŠTelegram์•Œ๋ฆผ
AI์ด๋ฉ”์ผๅˆ†่ฏŠไธŽGPT-4่ญฆๆŠฅ็ณป็ปŸๅŠTelegram์•Œ๋ฆผ
If
Set
Gmail
+
If
Set
Gmail
104 ๋…ธ๋“œPeter Joslyn
์ง€์›
์ž๋™ํ™”๋œ ๋ฉ€ํ‹ฐํ”Œ๋žซํผ ํŒ๋งค ์—์ด์ „ํŠธ
RAG, CRM ๋ฐ ๊ฒฐ์ œ ์ฒ˜๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•œ ๋ฉ€ํ‹ฐ ํ”Œ๋žซํผ ์„ธ์ผ์ฆˆ ์—์ด์ „ํŠธ
If
Set
Switch
+
If
Set
Switch
83 ๋…ธ๋“œElectrabot
์˜์—…
์›Œํฌํ”Œ๋กœ์šฐ ์ •๋ณด
๋‚œ์ด๋„
๊ณ ๊ธ‰
๋…ธ๋“œ ์ˆ˜40
์นดํ…Œ๊ณ ๋ฆฌ1
๋…ธ๋“œ ์œ ํ˜•12
๋‚œ์ด๋„ ์„ค๋ช…

๊ณ ๊ธ‰ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•œ 16+๊ฐœ ๋…ธ๋“œ์˜ ๋ณต์žกํ•œ ์›Œํฌํ”Œ๋กœ์šฐ

์ €์ž
Joseph LePage

Joseph LePage

@joe

As an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.

์™ธ๋ถ€ ๋งํฌ
n8n.io์—์„œ ๋ณด๊ธฐ โ†’

์ด ์›Œํฌํ”Œ๋กœ์šฐ ๊ณต์œ 

์นดํ…Œ๊ณ ๋ฆฌ

์นดํ…Œ๊ณ ๋ฆฌ: 34