Proxmox system monitor - VM status, host resources & temperature alerts via Telegram
Setup Instructions
Overview
This n8n workflow monitors your Proxmox VE server and sends automated reports to Telegram every 15 minutes. It tracks VM status, host resource usage, temperature sensors, and detects recently stopped VMs.
Prerequisites
Required Software
- n8n instance (self-hosted or cloud)
- Proxmox VE server with API access
- Telegram account with bot created via BotFather
- lm-sensors package installed on Proxmox host
Required Access
- Proxmox admin credentials (username and password)
- SSH access to Proxmox server
- Telegram Bot API token
- Telegram Chat ID
Installation Steps
Step 1: Install Temperature Sensors on Proxmox
SSH into your Proxmox server and run:
apt-get update
apt-get install -y lm-sensors
sensors-detect
Press ENTER to accept default answers during sensors-detect setup.
Test that sensors work:
sensors | grep -E 'Package|Core'
Step 2: Create Telegram Bot
- Open Telegram and search for BotFather
- Send
/newbotcommand - Follow prompts to create your bot
- Save the API token provided
- Get your Chat ID by sending a message to your bot, then visiting:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Look for "chat":{"id": YOUR_CHAT_ID in the response
Step 3: Configure n8n Credentials
SSH Password Credential
- In n8n, go to Credentials menu
- Create new credential: SSH Password
- Enter:
- Host: Your Proxmox IP address
- Port: 22
- Username: root (or your admin user)
- Password: Your Proxmox password
Telegram API Credential
- Create new credential: Telegram API
- Enter the Bot Token from BotFather
Step 4: Import and Configure Workflow
-
Import the JSON workflow into n8n
-
Open the "Set Variables" node
-
Update the following values:
- PROXMOX_IP: Your Proxmox server IP address
- PROXMOX_PORT: API port (default: 8006)
- PROXMOX_NODE: Node name (default: pve)
- TELEGRAM_CHAT_ID: Your Telegram chat ID
- PROXMOX_USER: Proxmox username with realm (e.g., root@pam)
- PROXMOX_PASSWORD: Proxmox password
-
Connect credentials:
- SSH - Get Sensors node: Select your SSH credential
- Send Telegram Report node: Select your Telegram credential
-
Save the workflow
-
Activate the workflow
Configuration Options
Adjust Monitoring Interval
Edit the "Schedule Every 15min" node:
- Change
minutesIntervalvalue to desired interval (in minutes) - Recommended: 5-30 minutes
Adjust Recently Stopped VM Detection Window
Edit the "Process Data" node:
- Find line:
const fifteenMinutesAgo = now - 900; - Change 900 to desired seconds (900 = 15 minutes)
Modify Temperature Warning Threshold
The workflow uses the "high" threshold defined by sensors. To manually set threshold, edit "Process Data" node:
- Modify the temperature parsing logic
- Change comparison:
if (current >= high)to use custom value
Testing
Test Individual Components
- Execute "Set Variables" node manually - verify output
- Execute "Proxmox Login" node - check for valid ticket
- Execute "API - VM List" - confirm VM data received
- Execute complete workflow - check Telegram for message
Troubleshooting
Login fails:
- Verify PROXMOX_USER format includes realm (e.g., root@pam)
- Check password is correct
- Ensure allowUnauthorizedCerts is enabled for self-signed certificates
No temperature data:
- Verify lm-sensors is installed on Proxmox
- Run
sensorscommand manually via SSH - Check SSH credentials are correct
Recently stopped VMs not detected:
- Check task log API endpoint returns data
- Verify VM was stopped within detection window
- Ensure task types qmstop or qmshutdown are logged
Telegram not receiving messages:
- Verify bot token is correct
- Confirm chat ID is accurate
- Check bot was started (send /start to bot)
- Verify parse_mode is set to HTML in Telegram node
How It Works
Workflow Architecture
The workflow executes in a sequential chain of nodes that gather data from multiple sources, process it, and deliver a formatted report.
Execution Flow
Schedule Trigger (15min)
- Set Variables
- Proxmox Login (get authentication ticket)
- Prepare Auth (prepare credentials for API calls)
- API - VM List (get all VMs and their status)
- API - Node Tasks (get recent task log)
- API - Node Status (get host CPU, memory, uptime)
- SSH - Get Sensors (get temperature data)
- Process Data (analyze and structure all data)
- Generate Formatted Message (create Telegram message)
- Send Telegram Report (deliver via Telegram)
Data Collection
VM Information (Proxmox API)
Endpoint: /api2/json/nodes/{node}/qemu
Retrieves:
- Total VM count
- Running VM count
- Stopped VM count
- VM names and IDs
Task Log (Proxmox API)
Endpoint: /api2/json/nodes/{node}/tasks?limit=100
Retrieves recent tasks to detect:
- qmstop operations (VM stop commands)
- qmshutdown operations (VM shutdown commands)
- Task timestamps
- Task status
Host Status (Proxmox API)
Endpoint: /api2/json/nodes/{node}/status
Retrieves:
- CPU usage percentage
- Memory total and used (in GB)
- System uptime (in seconds)
Temperature Data (SSH)
Command: sensors | grep -E 'Package|Core'
Retrieves:
- CPU package temperature
- Individual core temperatures
- High and critical thresholds
Data Processing
VM Status Analysis
- Counts total, running, and stopped VMs
- Queries task log for stop/shutdown operations
- Filters tasks within 15-minute window
- Extracts VM ID from task UPID string
- Matches VM ID to VM name from VM list
- Calculates time elapsed since stop operation
Temperature Intelligence
The workflow implements smart temperature reporting:
Normal Operation (all temps below high threshold):
- Calculates average temperature across all cores
- Displays min, max, and average values
- Example: "Average: 47.5 C (Min: 44.0 C, Max: 52.0 C)"
Warning State (any temp at or above high threshold):
- Displays all temperature readings in detail
- Shows full sensor output with thresholds
- Changes section title to "Temperature Warning"
- Adds fire emoji indicator
Resource Calculation
CPU Usage:
- API returns decimal (0.0 to 1.0)
- Converted to percentage:
cpu * 100
Memory:
- API returns bytes
- Converted to GB:
bytes / (1024^3) - Calculates percentage:
(used / total) * 100
Uptime:
- API returns seconds
- Converted to days and hours:
days = seconds / 86400,hours = (seconds % 86400) / 3600
Report Generation
Message Structure
The Telegram message uses HTML formatting for structure:
-
Header Section
- Report title
- Generation timestamp
-
Virtual Machines Section
- Total VM count
- Running VMs with checkmark
- Stopped VMs with stop sign
- Recently stopped count with warning
- Detailed list if VMs stopped in last 15 minutes
-
Host Resources Section
- CPU usage percentage
- Memory used/total with percentage
- Host uptime in days and hours
-
Temperature Section
- Smart display (summary or detailed)
- Warning indicator if thresholds exceeded
- Monospace formatting for sensor output
HTML Formatting Features
- Bold tags for headers and labels
- Italic for timestamps
- Code blocks for temperature data
- Unicode separators for visual structure
- Emoji indicators for status (checkmark, stop, warning, fire)
Security Considerations
Credential Storage
- Passwords stored in n8n Set node (encrypted in database)
- Alternative: Use n8n environment variables
- Recommendation: Use Proxmox API tokens instead of passwords
API Communication
- HTTPS with self-signed certificate acceptance
- Authentication via session tickets (15-minute validity)
- CSRF token validation for API requests
SSH Access
- Password-based authentication (can use key-based)
- Commands limited to read-only operations
- No privilege escalation required
Performance Impact
API Load
- 3 API calls per execution (VM list, tasks, status)
- Lightweight endpoints with minimal data
- 15-minute interval reduces server load
Execution Time
Typical workflow execution: 5-10 seconds
- Login: 1-2 seconds
- API calls: 2-3 seconds
- SSH command: 1-2 seconds
- Processing: less than 1 second
Resource Usage
- Minimal CPU impact on Proxmox
- Small memory footprint
- Negligible network bandwidth
Extensibility
Adding Additional Metrics
To monitor additional data points:
- Add new API call node after "Prepare Auth"
- Update "Process Data" node to include new data
- Modify "Generate Formatted Message" for display
Integration with Other Services
The workflow can be extended to:
- Send to Discord, Slack, or email
- Write to database or log file
- Trigger alerts based on thresholds
- Generate charts or graphs
Multi-Node Monitoring
To monitor multiple Proxmox nodes:
- Duplicate API call nodes
- Update node names in URLs
- Merge data in processing step
- Generate combined report
n8n Proxmox System Monitor - VM Status, Host Resources & Temperature Alerts via Telegram
This n8n workflow automates the monitoring of a Proxmox server, collecting key system metrics and sending alerts via Telegram. It's designed to provide proactive notifications about the status of your virtual machines (VMs), host resource utilization, and CPU temperature.
What it does
This workflow performs the following actions on a scheduled basis:
- Triggers on a Schedule: The workflow starts at predefined intervals (e.g., every 5 minutes).
- Connects to Proxmox via SSH: It uses an SSH connection to execute commands on your Proxmox host.
- Gathers System Metrics:
- VM/Container Status: Checks the status of all VMs and containers (running, stopped, etc.).
- Host CPU Usage: Retrieves the current CPU utilization of the Proxmox host.
- Host RAM Usage: Gathers information about the host's memory usage.
- Host Disk Usage: Collects data on disk space utilization.
- CPU Temperature: Reads the CPU temperature (e.g., from
/sys/class/thermal/thermal_zone0/temp).
- Processes and Formats Data: Uses a Code node to parse the raw output from SSH commands, extract relevant metrics, and format them into a human-readable message.
- Sends Telegram Alert: Dispatches a message to a specified Telegram chat with the collected system information and any critical alerts (e.g., high CPU temperature, stopped VMs).
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- Proxmox Server: Access to a Proxmox Virtual Environment (PVE) host.
- SSH Access: SSH access to your Proxmox host with a user that has permissions to execute the necessary commands (e.g.,
qm status,pct status,free,df,cat /sys/class/thermal/...). - Telegram Bot: A Telegram bot token and a chat ID where you want to receive alerts.
- n8n Credentials:
- SSH Credential: Configured in n8n for connecting to your Proxmox host.
- Telegram Credential: Configured in n8n for sending messages via your bot.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- SSH Node (ID: 490): Edit the "SSH" node and select or create an SSH credential for your Proxmox host. Ensure the user has the necessary permissions.
- Telegram Node (ID: 49): Edit the "Telegram" node and select or create a Telegram API credential. Provide your bot token and the chat ID where you want to receive notifications.
- Customize SSH Commands (ID: 490): Review the commands in the "SSH" node. You may need to adjust them based on your Proxmox setup or if you want to monitor different metrics.
- VM/Container Status: Commands like
qm statusandpct statusare typically used. - Temperature: The path
/sys/class/thermal/thermal_zone0/tempis common for Linux systems, but might vary.
- VM/Container Status: Commands like
- Adjust Code Node Logic (ID: 834): The "Code" node is responsible for parsing and formatting the data. You might need to modify its JavaScript code if:
- The output of your SSH commands differs.
- You want to add more sophisticated alerting logic (e.g., specific temperature thresholds, disk space warnings).
- You want to change the message format for Telegram.
- Set Schedule (ID: 839): Configure the "Schedule Trigger" node to define how often the workflow should run (e.g., every 5 minutes, every hour).
- Activate the Workflow: Once configured, activate the workflow in n8n.
This workflow provides a robust foundation for monitoring your Proxmox environment and staying informed about its health and performance.
Related Templates
Automate Dutch Public Procurement Data Collection with TenderNed
TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch π LinkedIn β Wessel Bulte
π How to transform unstructured email data into structured format with AI agent
This workflow automates the process of extracting structured, usable information from unstructured email messages across multiple platforms. It connects directly to Gmail, Outlook, and IMAP accounts, retrieves incoming emails, and sends their content to an AI-powered parsing agent built on OpenAI GPT models. The AI agent analyzes each email, identifies relevant details, and returns a clean JSON structure containing key fields: From β senderβs email address To β recipientβs email address Subject β email subject line Summary β short AI-generated summary of the email body The extracted information is then automatically inserted into an n8n Data Table, creating a structured database of email metadata and summaries ready for indexing, reporting, or integration with other tools. --- Key Benefits β Full Automation: Eliminates manual reading and data entry from incoming emails. β Multi-Source Integration: Handles data from different email providers seamlessly. β AI-Driven Accuracy: Uses advanced language models to interpret complex or unformatted content. β Structured Storage: Creates a standardized, query-ready dataset from previously unstructured text. β Time Efficiency: Processes emails in real time, improving productivity and response speed. *β Scalability: Easily extendable to handle additional sources or extract more data fields. --- How it works This workflow automates the transformation of unstructured email data into a structured, queryable format. It operates through a series of connected steps: Email Triggering: The workflow is initiated by one of three different email triggers (Gmail, Microsoft Outlook, or a generic IMAP account), which constantly monitor for new incoming emails. AI-Powered Parsing & Structuring: When a new email is detected, its raw, unstructured content is passed to a central "Parsing Agent." This agent uses a specified OpenAI language model to intelligently analyze the email text. Data Extraction & Standardization: Following a predefined system prompt, the AI agent extracts key information from the email, such as the sender, recipient, subject, and a generated summary. It then forces the output into a strict JSON structure using a "Structured Output Parser" node, ensuring data consistency. Data Storage: Finally, the clean, structured data (the from, to, subject, and summarize fields) is inserted as a new row into a specified n8n Data Table, creating a searchable and reportable database of email information. --- Set up steps To implement this workflow, follow these configuration steps: Prepare the Data Table: Create a new Data Table within n8n. Define the columns with the following names and string type: From, To, Subject, and Summary. Configure Email Credentials: Set up the credential connections for the email services you wish to use (Gmail OAuth2, Microsoft Outlook OAuth2, and/or IMAP). Ensure the accounts have the necessary permissions to read emails. Configure AI Model Credentials: Set up the OpenAI API credential with a valid API key. The workflow is configured to use the model, but this can be changed in the respective nodes if needed. Connect the Nodes: The workflow canvas is already correctly wired. Visually confirm that the email triggers are connected to the "Parsing Agent," which is connected to the "Insert row" (Data Table) node. Also, ensure the "OpenAI Chat Model" and "Structured Output Parser" are connected to the "Parsing Agent" as its AI model and output parser, respectively. Activate the Workflow: Save the workflow and toggle the "Active" switch to ON. The triggers will begin polling for new emails according to their schedule (e.g., every minute), and the automation will start processing incoming messages. --- Need help customizing? Contact me for consulting and support or add me on Linkedin.
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) π§ AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative β all powered by AI logic, sir. --- π‘ Key Advantages β‘ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. π§ AI Qualification Engine An OpenAI-powered Agent evaluates the leadβs industry, region, and needs to generate a persona summary and routing rationale. π Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. π¬ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. π Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- βοΈ How It Works HubSpot Trigger β Captures a new lead as soon as itβs created in HubSpot. Fetch Contact Data β Retrieves all relevant fields like name, company, and industry. Clean & Format Data β A Code node standardizes and structures the data for consistency. Airtable Record Creation β Logs the lead data into the βLeadsβ table for centralized tracking. AI Agent Qualification β The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update β Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification β Sends a real-time message tagging the rep with lead info. Gmail Notification β Sends a personalized handoff email with context and follow-up actions. HubSpot Sync β Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- π οΈ Setup Steps Trigger Node: HubSpot β Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the βLeadsβ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- π Credentials Required HubSpot OAuth2 API β To fetch and update leads. Airtable Personal Access Token β To store and update lead data. OpenAI API β To power the AI qualification and matching logic. Slack OAuth2 β For sending team notifications. Gmail OAuth2 β For automatic email alerts to assigned reps, sir. --- π€ Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- π¬ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular β perfect for scaling across global sales teams, sir.