Templates / Automated server log cleanup via email alerts with SSH - Nginx, Docker, System

Automated server log cleanup via email alerts with SSH - Nginx, Docker, System

Ready for 3.0

by Oneclick AI Squad ✓ · 1,384 views · created 2025-06-27 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 4 nodes and runs when a new email arrives over IMAP. It uses only n8n's built-in nodes.

How it runs

Trigger: When a new email arrives over IMAP.

  1. Extract Server IP from Email (Code): runs custom JavaScript code
  2. Prepare SSH Variables (Edit Fields (Set)): sets 3 fields: pwd, server_user, server_ip
  3. Run Log Cleanup Commands via SSH (SSH): uses SSH

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (4)

From the author

This n8n workflow monitors email alerts for disk utilization exceeding 80%, extracts the server IP, logs into the server, and purges logs from Nginx, PM2, Docker, and system files to clear disk space. Key Insights - Ensure email alerts are consistently…

Excerpt from Oneclick AI Squad's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.