AutomationFlowsAI & RAG › Analyze Zabbix Infrastructure Health with Gemini and Postgresql

Analyze Zabbix Infrastructure Health with Gemini and Postgresql

ByThiago Vazzoler Loureiro @thiagovazzoler on n8n.io

This workflow exposes a Basic Auth webhook that routes infrastructure questions to a IA agent, which queries a Zabbix PostgreSQL database for host, alert, and performance metrics and returns a Markdown response with inline SVG charts, using Redis for short-lived chat memory.…

Webhook trigger★★★★★ complexityAI-powered32 nodesPostgres ToolMemory Redis ChatGoogle Gemini ChatAgent
AI & RAG Trigger: Webhook Nodes: 32 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #16222 — we link there as the canonical source.

This workflow follows the Agent → Google Gemini Chat 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": "bc81BO6UYT5wtwCH",
  "name": "Zabbix AI Infrastructure Observability Agent",
  "tags": [
    {
      "id": "pBGFSq4b2d4uiTXT",
      "name": "Infraestrutura",
      "createdAt": "2026-06-09T11:19:10.007Z",
      "updatedAt": "2026-06-09T11:19:10.007Z"
    },
    {
      "id": "wIl4XDnjfDYE5nEK",
      "name": "Zabbix",
      "createdAt": "2026-06-09T11:19:10.013Z",
      "updatedAt": "2026-06-09T11:19:10.013Z"
    },
    {
      "id": "B6eaP6nxH8b4rG3k",
      "name": "AI Agent",
      "createdAt": "2026-06-09T11:19:10.003Z",
      "updatedAt": "2026-06-09T11:19:10.003Z"
    }
  ],
  "nodes": [
    {
      "id": "84465773-0a9b-4d49-916d-6f354ee6c93d",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3824,
        -80
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "dee4e1f9-df84-4b11-99d4-a9934f999edf",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        368,
        -16
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "dd8a2e5a-ea05-4605-b5d1-f5bb5025d8f6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3760,
        448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ca691a74-b240-409e-b895-fe0a9b424cc1",
      "name": "Fallback Response",
      "type": "n8n-nodes-base.set",
      "position": [
        3088,
        32
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "9f3658eb-89f3-4227-9da3-4268f8d7b77e",
      "name": "get_host_status",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        352,
        1056
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "482bfdeb-6124-4858-bc36-6556b6f8ae43",
      "name": "get_host_items",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        576,
        1584
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "228c2073-e345-457b-95cf-4d14a3380a76",
      "name": "get_item_history",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        1168,
        1952
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "79537477-380c-4d5a-a864-534979352513",
      "name": "get_host_alerts",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        1888,
        2096
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "19898b26-7328-444e-ae7d-8b6b954d5134",
      "name": "get_environment_anomalies",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        3040,
        2208
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "94232bb5-2963-4bab-bb79-dc5564fc73f9",
      "name": "search_hosts",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        3616,
        1920
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "707d528e-e70e-4fae-9b00-67c448e41b49",
      "name": "get_group_hosts",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        3792,
        688
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "650ed534-15eb-48b3-b3ce-b57af004475b",
      "name": "get_alert_ranking",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        4384,
        672
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "80682c9b-5533-49bc-bb4c-568773df8d6a",
      "name": "get_switch_bottlenecks",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        4192,
        672
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "5f3d98e7-d063-4304-9aed-f2b28828cfe5",
      "name": "get_group_summary",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        3968,
        688
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "2304c59f-1de2-4a41-bcc5-bdd6d5fefabd",
      "name": "get_disk_growth",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        4208,
        1360
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "bfe5f464-4e32-4d17-b73b-442316cc8dbc",
      "name": "Render SVG Charts",
      "type": "n8n-nodes-base.code",
      "notes": "Intercepta blocos %%CHART_START%%...%%CHART_END%% na resposta do Gemini e converte em SVG inline base64 para o Open WebUI renderizar.",
      "position": [
        3456,
        -64
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "1cb34d48-8df7-46bf-ab01-c0d91bab93b3",
      "name": "Redis Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "position": [
        1008,
        544
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "b980d5f1-e5ef-4562-ad49-7e87bd6d24c5",
      "name": "Gemini 2.0 Flash",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        784,
        464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f437bf00-7930-4b1f-a7f5-fefcfc76836e",
      "name": "Gemini \u00b7 Infra Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        2032,
        -32
      ],
      "parameters": {},
      "typeVersion": 1.7,
      "alwaysOutputData": false
    },
    {
      "id": "8d3915fc-8f11-4ead-bea6-4a6184b720c4",
      "name": "Prepare Context",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        -16
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "f0dd1539-876e-410e-96d4-453e09a7dd99",
      "name": "Normalize Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        -16
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "d36ae412-1653-42b0-bae0-d4a8c264299c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        752
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7d2d923e-118a-4acc-b062-fac38d9aca2f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        1216
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e8a6be8a-e5ec-4614-ad19-f81c62e0494d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        1536
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "84c3aef6-d61d-4cfb-8a90-d8b6ae8e0eef",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        1680
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6e9b0042-da62-4aad-872f-a0107eb759ac",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        1680
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c1b18ced-4407-458a-b2a9-01fb297e05f6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3360,
        1520
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0448a566-9425-4530-9859-2a6ac0c0dd50",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3904,
        928
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e7b4fe72-47bc-4aa2-82df-4de365a2a95f",
      "name": "Prepare Context1",
      "type": "n8n-nodes-base.code",
      "position": [
        1520,
        -1040
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "57b2a2d0-2370-473a-b000-b743a999a42d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -432
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "36652d3f-bd10-480e-b317-484ca9574a4b",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0ed1cbf4-185f-41ac-b379-0a3650775e65",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2976,
        -448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "21c0312e-6709-45e7-ad37-4c7d325fd3e0",
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Normalize Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "search_hosts": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_host_items": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Context": {
      "main": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_disk_growth": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_group_hosts": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_host_alerts": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_host_status": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.0 Flash": {
      "ai_languageModel": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "get_item_history": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Fallback Response": {
      "main": [
        [
          {
            "node": "Render SVG Charts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Payload": {
      "main": [
        [
          {
            "node": "Prepare Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Render SVG Charts": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_alert_ranking": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_group_summary": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gemini \u00b7 Infra Agent": {
      "main": [
        [
          {
            "node": "Render SVG Charts",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fallback Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_switch_bottlenecks": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_environment_anomalies": {
      "ai_tool": [
        [
          {
            "node": "Gemini \u00b7 Infra Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow exposes a Basic Auth webhook that routes infrastructure questions to a IA agent, which queries a Zabbix PostgreSQL database for host, alert, and performance metrics and returns a Markdown response with inline SVG charts, using Redis for short-lived chat memory.…

Source: https://n8n.io/workflows/16222/ — 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

CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +14
AI & RAG

my-secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 86 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +13
AI & RAG

secretaria. Uses postgres, n8n-nodes-evolution-api, openAi, httpRequest. Webhook trigger; 71 nodes.

Postgres, N8N Nodes Evolution Api, OpenAI +12
AI & RAG

Agent: IPTV (instance_e2165d22_1762376395079). Uses openAi, redis, supabase, httpRequest. Webhook trigger; 56 nodes.

OpenAI, Redis, Supabase +7
AI & RAG

Fluxo Nia App - Agendamento Multi-tenant. Uses redis, httpRequest, openAi, whatsApp. Webhook trigger; 52 nodes.

Redis, HTTP Request, OpenAI +6