Back to Catalog

Monitor remote server file integrity with SSH and Slack alerts

MarthMarth
294 views
2/3/2026
Official Page

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.

How to Set Up

Implementing this essential cybersecurity monitor in your n8n instance is quick and straightforward.

1. Prepare Your Credentials & Server

Before building the workflow, ensure all necessary accounts are set up and their credentials are ready.

  • SSH Credential: Set up an SSH credential in n8n with your server's hostname, port, and authentication method (e.g., private key or password). The SSH user must have permission to run sha256sum on the files you want to monitor.
  • Slack Credential: Set up a Slack credential in n8n and note the Channel ID of your security alert channel (e.g., #security-alerts).
  • Get Checksums: This is a critical step. Manually run the sha256sum [file_path] command on your server for each file you want to monitor. Copy and save the generated checksum valuesβ€”these are the "known-good" checksums you will use as your reference.

2. Import the Workflow JSON

Get the workflow structure into your n8n instance.

  • Import: In your n8n instance, navigate to the "Workflows" section. Click the "New" or "+" icon, then select "Import from JSON." Paste the provided JSON code into the import dialog and import the workflow.

3. Configure the Nodes

Customize the imported workflow to fit your specific monitoring needs.

  • Scheduled Check (Cron): Set the schedule according to your preference (e.g., daily at 3:00 AM).
  • List Files & Checksums (Code): Open this node and edit the filesToCheck array. Enter your actual server file paths and paste the "known-good" checksums you manually obtained in step 1.
  • Get Remote File Checksum (SSH): Select your SSH credential.
  • Send Alert (Slack): Select your Slack credential and replace YOUR_SECURITY_ALERT_CHANNEL_ID with your actual Channel ID.

4. Test and Activate

Verify that your workflow is working correctly before setting it live.

  • Manual Test: Run the workflow manually. Verify that it connects to the server and checks the files without sending an alert (assuming the files haven't changed).
  • Verify: To test the alert, manually change one of the files on your server and run the workflow again. Check your Slack channel to ensure the alert is sent correctly.
  • Activate: Once you're confident in its function, activate the workflow. n8n will now automatically audit the integrity of your critical files on the schedule you set.

Monitor Remote Server File Integrity with SSH and Slack Alerts

This n8n workflow provides a robust solution for monitoring the integrity of a critical file on a remote server. It periodically checks a specified file's content using SSH, calculates its MD5 hash, and compares it to a previously known good hash. If the hashes do not match, indicating a change in the file, it sends an immediate alert to a Slack channel.

What it does

  1. Schedules Checks: Triggers the workflow at regular intervals (e.g., every 5 minutes, hourly, daily) using a Cron node.
  2. Connects via SSH: Establishes an SSH connection to a remote server.
  3. Calculates File Hash: Executes an md5sum command on a specified file on the remote server to get its current MD5 hash.
  4. Compares Hashes: Uses a Code node to compare the newly obtained hash with a predefined "known good" hash.
  5. Alerts on Mismatch: If the hashes do not match, indicating a file change, it sends a notification to a designated Slack channel.
  6. No Action on Match: If the hashes match, the workflow concludes without further action, signifying that the file is unchanged.

Prerequisites/Requirements

  • n8n Instance: A running n8n instance.
  • SSH Credentials: Access to a remote server via SSH, including:
    • Host
    • Port
    • Username
    • Private Key (or password, depending on your SSH setup)
  • Slack Account: A Slack workspace and a channel where you want to receive alerts.
  • Known Good MD5 Hash: The MD5 hash of the file when it is in its desired, untampered state.
  • Remote File Path: The full path to the file you want to monitor on the remote server.

Setup/Usage

  1. Import the Workflow:
    • Download the provided JSON file.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the three dots menu (...) in the top right and select "Import from JSON".
    • Paste the workflow JSON or upload the file.
  2. Configure SSH Credentials:
    • Locate the "SSH" node.
    • Click on the "Credential" field and select "Create New Credential".
    • Enter your SSH host, port, username, and private key. Save the credential.
  3. Configure File Path and Known Hash:
    • Locate the "SSH" node.
    • In the "Command" field, update the file path in the md5sum /path/to/your/file command to match your remote file.
    • Locate the "Code" node.
    • Edit the JavaScript code to update the knownGoodHash variable with the MD5 hash of your file when it's in its expected state.
  4. Configure Slack Credentials:
    • Locate the "Slack" node.
    • Click on the "Credential" field and select "Create New Credential".
    • Follow the instructions to connect your Slack workspace (usually involving an OAuth app or a bot token).
    • Specify the "Channel" where you want to receive alerts.
  5. Activate the Workflow:
    • Ensure all nodes are correctly configured.
    • Click the "Activate" toggle in the top right corner of the workflow editor to enable the scheduled checks.

The workflow will now run according to the schedule defined in the "Cron" node and alert you on Slack if the monitored file's integrity is compromised.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatβ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. πŸ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing πŸ”§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation πŸ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com β†’ API keys (sidebar) Click "Create new secret key" β†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β†’ Dashboard β†’ API Keys Generate a new API key β†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βš™οΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

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.

MANISH KUMARBy MANISH KUMAR
113