Daily Server Update Notification via Email - n8n Workflow

Automate daily server health checks using this n8n workflow. Run SSH commands, check for upgradable packages, and send instant email notifications via SMTP if updates are detected.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

DevOps Engineers and System Administrators who manage remote Linux servers.
Users looking for reliable server monitoring n8n templates.
Anyone needing a daily scheduled n8n workflow to check security and maintenance status.
Users utilizing the n8n node ecosystem for infrastructure checks.

Overview

Maintaining server security requires frequent checks for package updates. Manually logging into every VPS daily is inefficient. This robust n8n workflow solves this problem by automating the entire process. Utilizing the powerful SSH n8n node, the automation connects to your server, executes the apt list --upgradable command, and processes the output. Crucially, the n8n workflow includes an If statement to only proceed with sending a notification email if actual updates are detected, preventing unnecessary daily notifications. This efficient n8n automation template ensures you are immediately notified about pending system patches, improving operational security and efficiency.

How it Works

This server monitoring n8n workflow executes through a strict, linear flow:


  1. Scheduled Execution: The n8n trigger, configured as a daily Schedule Trigger, initiates the entire process at a defined interval (likely every day).

  2. SSH Command Execution: The List upgradable packages n8n node connects to the target server via SSH (using required credentials) and executes the apt list --upgradable command to retrieve a list of pending software updates.

  3. Data Formatting: The raw text output (stdout) is passed to the Format as HTML list n8n node, a custom Code block. This n8n node transforms the list of packages into a neatly formatted HTML unordered list (
      ).
    • Conditional Check: The Check if there are updates n8n node (an If statement) evaluates the formatted list. It checks if the generated list is anything other than the empty HTML list
        .

      • Notification (If True): If the condition is met (meaning updates exist), the Send Email through SMTP n8n node sends a subject-lined email ("Server needs updates") containing the complete HTML list of upgradable packages to the designated recipient. If no updates are found, the n8n workflow terminates without sending an email.

    Installation Guide

    To set up this essential n8n workflow template, follow these steps:


    1. Import the n8n workflow: Copy the provided JSON and paste it into your n8n instance using the "New" -> "Import from JSON" option.

    2. Configure SSH Credentials: Locate the List upgradable packages n8n node. You must set up an SSH Password credential. This credential requires the hostname, port, username, and password/key for the server you intend to monitor.

    3. Configure SMTP Credentials: Locate the Send Email through SMTP n8n node. Configure or select your existing SMTP credential to ensure n8n can send outbound emails.

    4. Update Email Addresses: In the Send Email through SMTP n8n node parameters, replace the placeholder [email protected] in both the "To Email" and "From Email" fields with your desired notification and sender addresses.

    5. Configure Schedule: Review the Run workflow every day n8n trigger to ensure the scheduled time meets your monitoring requirements.

    6. Activate: Save and activate the n8n workflow.

    Node Details

    This n8n workflow relies on several core n8n node types for its functionality:

    Run workflow every day (Schedule Trigger n8n trigger):
    Function: Serves as the primary n8n trigger, initiating the server check automatically based on a recurring daily schedule.
    Key Configuration: Configured using a standard time interval rule for daily execution.
    List upgradable packages (SSH n8n node):
    Function: Connects to a remote server using SSH credentials to execute system maintenance commands.
    Key Configuration: Command parameter is set to apt list --upgradable. Requires SSH Password credential setup.
    Format as HTML list (Code n8n node):
    Function: Custom scripting logic to parse the text output from the SSH node and convert the list of packages into a clean HTML unordered list (htmlList) suitable for email embedding.
    Key Configuration: Custom JavaScript function designed to split the stdout and wrap lines in

  4. tags.
    Check if there are updates (If n8n node):
    Function: Provides core logic control. This n8n node determines if the workflow should continue to the email step.
    Key Configuration: Condition checks if {{ $json.htmlList }} is not equal to
      .
      Send Email through SMTP (EmailSend n8n node):
      Function: Sends the notification email containing the list of available updates, utilizing the data processed earlier in the n8n workflow.
      * Key Configuration: Uses an expression {{ $json.htmlList }} to embed the update list into the email body (HTML content). Requires SMTP credentials.

    • Related n8n Workflows

      Free

      Nodes: 6 Nodes
      Updated: December 26 2025
      View all
      Created by

      Hostinger aims to make online presence accessible to everyone worldwide – from developers to aspiring bloggers and business owners. With our fast hosting technology, AI-powered Website Builder, and easy-to-operate hPanel you can succeed online faster and easier.

      Featured*