Quick overview
This workflow runs weekly (or on demand via webhook) to audit Proxmox VE guests for common hygiene gaps, posts a report to your alert webhook, and—after you approve—optionally fixes backup coverage, start-at-boot, delete protection, and missing owner tags while tracking history in an n8n Data Table.
How it works
- Runs every Monday at 7am or starts from a manual POST webhook to initiate a hygiene check.
- Calls the Proxmox VE API to list all guests, fetch backup jobs, and retrieve Proxmox’s “not backed up” coverage list.
- Filters out templates and excluded/"hygiene-skip" tagged guests, then fetches each remaining guest’s configuration from Proxmox.
- Evaluates each guest for backup coverage, start-at-boot, delete protection, owner tag presence, description, and QEMU guest agent status, compares results to prior runs from an n8n Data Table, and compiles a report plus an approval payload for eligible fixes.
- Writes the per-guest results to the
proxmox_hygiene_history Data Table and optionally posts the report to your alert webhook (including an approval link when fixes are offered).
- If approval is required, waits for your form submission, applies only the fixes you left in place by updating the Proxmox backup job and/or guest settings (with a re-check and config digest), then posts a final fix-results summary back to your alert webhook.
Setup
- Create a Proxmox VE API token and grant it VM.Audit, Sys.Audit, and VM.Config.Options on
/ (and also Sys.Modify, Datastore.Allocate, and VM.Backup if you want the workflow to update a backup job).
- In n8n, create an HTTP Header Auth credential that sends
Authorization: PVEAPIToken=user@pve!tokenid=SECRET and select it on the Proxmox HTTP Request nodes.
- Create an n8n Data Table named
proxmox_hygiene_history with columns run_id (string), guest (string), flags (string), run_at (date), vmid (number), and score (number).
- Update Set Hygiene Config with your
api_url, alert_url (the report and approval link destination), backup_job_id (to enable backup fixes), and default_owner/owner_tag_prefix (to enable owner-tag fixes).
- If you use the manual run, copy the Webhook for Hygiene Check URL and POST to it to test end-to-end reporting and the approval flow.