Skip to main content

Monitor & manage Docker containers with Telegram bot & AI log analysis

Workflow preview

Workflow preview
100%
Monitor & manage Docker containers with Telegram bot & AI log analysis preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Monitor and manage Docker containers from Telegram with AI log analysis This workflow gives you a smart Telegram command center for your homelab. It lets you monitor Docker containers, get alerts t...

Best for

  • DevOps automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.telegramtrigger, n8n-nodes-base.switch, n8n-nodes-base.merge, n8n-nodes-base.if, n8n-nodes-base.telegram, n8n-nodes-base.ssh

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Malte Sohns.

Original n8n.io source

1.1 Workflow description

Title
Monitor & manage Docker containers with Telegram bot & AI log analysis
Workflow name
Monitor & manage Docker containers with Telegram bot & AI log analysis

Monitor and manage Docker containers from Telegram with AI log analysis

This workflow gives you a smart Telegram command center for your homelab. It lets you monitor Docker containers, get alerts the moment something fails, view logs, and restart services remotely. When you request logs, they're automatically analyzed by an LLM so you get a clear, structured breakdown instead of raw terminal output.

Who it's for

Anyone running a self-hosted environment who wants quick visibility and control without SSHing into a server. Perfect for homelab enthusiasts, self-hosters, and DevOps folks who want a lightweight on-call assistant.

What it does

Receives container heartbeat alerts via webhook

Sends Telegram notifications for status changes or failures

Lets you request logs or restart services from chat

Analyzes logs with GPT and summarizes them clearly

Supports manual “status” and “update all containers” commands

Requirements

  • Telegram Bot API credentials

  • SSH access to your Docker host

How to set it up

  1. Create a Telegram bot and add its token as credentials
  2. Enter your server SSH credentials in the SSH node
  3. Deploy the workflow and set your webhook endpoint
  4. Tailor container names or heartbeat logic to your environment

Customize it

Swap SSH commands for Kubernetes if you're on k8s

Change the AI model to another provider

Extend with health checks or auto-healing logic

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Message a model

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2

Block 3 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 4 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 5 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 6 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 7 - Switch1

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 8 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - OK Message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 10 - ERROR Message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Status Update

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - Log Analysis

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Restart Message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 14 - Success restart

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - Restart Failed

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 16 - Docker Status

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 17 - get logs

Type / Role
n8n-nodes-base.ssh - ssh
Config choices
Version 1

Block 18 - restart container

Type / Role
n8n-nodes-base.ssh - ssh
Config choices
Version 1

Block 19 - docker ps

Type / Role
n8n-nodes-base.ssh - ssh
Config choices
Version 1

Block 20 - Code in Python (Beta)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Update Docker

Type / Role
n8n-nodes-base.ssh - ssh
Config choices
Version 1

Block 22 - Update Msg

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 23 - Update Msg1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 24 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Monitor & manage Docker containers with Telegram bot & AI log analysis
Complexity advanced
Nodes 31
Categories DevOps, AI Chatbot
Author Malte Sohns
Published 03 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10476/10476.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Monitor & manage Docker containers with Telegram bot & AI log analysis do?

Monitor and manage Docker containers from Telegram with AI log analysis This workflow gives you a smart Telegram command center for your homelab. It lets you monitor Docker containers, get alerts t...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, AI Chatbot use case.