workflows.fit
Back to n8n workflows
n8n templateFreeBy Marth - Business Automation

Monitor remote server file integrity with SSH and Slack alerts

--- How It Works: The 5-Node Security Flow This workflow efficiently performs a scheduled file integrity audit. 1. Scheduled Check (Cron Node) This is the workflow's trigger. It schedules the workflow to run at a spec...

CommunicationHITLDevelopmentCore NodesCronCodeSshIf
Loading interactive preview...

Template notes

---

How It Works: The 5-Node Security Flow

This workflow efficiently performs a scheduled file integrity audit.

1. Scheduled Check (Cron Node) This is the workflow's trigger. It schedules the workflow to run at a specific, regular interval. Function: Continuously runs on a set schedule, for example, daily at 3:00 AM. Process: The Cron node automatically initiates the workflow on its schedule, ensuring consistent file integrity checks without manual intervention.

2. List Files & Checksums (Code Node) This node acts as your static database, defining which files to monitor and their known-good checksums. Function: Stores the file paths and their verified checksums in a single, easy-to-update array. Process: It configures the file paths and their valid checksums, which are then passed on to subsequent nodes for processing.

3. Get Remote File Checksum (SSH Node) This node connects to your remote server to get the current checksum of the file being monitored. Function: Executes a command on your server via SSH. Process: It runs a command like sha256sum /path/to/file on the server. The current checksum is then captured and passed to the next node for comparison.

4. Checksums Match? (If Node) This is the core detection logic. It compares the newly retrieved checksum from the server with the known-good checksum you stored. Function: Compares the two checksum values. Process: If the checksums do not match, it indicates a change in the file, and the workflow is routed to the notification node. If they do match, the workflow ends safely.

5. Send Alert (Slack Node) / End Workflow (No-Op Node) These nodes represent the final action of the workflow. Function: Responds to a detected file change. Process: If the checksums don't match, the Slack node sends a detailed alert with information about the modified file, the expected checksum, and the detected checksum. If the checksums match, the No-Op node ends the workflow without any notification.