Automate Server Package Updates Notification with n8n SSH and Email

Struggling to keep your server’s software packages updated regularly? This n8n workflow automates daily checks for upgradable packages on your VPS and sends you an email alert if updates are available, saving you manual effort and enhancing server security.
ssh
emailSend
code
+3
Workflow Identifier: 1556
NODES in Use: Schedule Trigger, SSH, Code, If, Email Send, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow checks your Ubuntu server daily for upgradeable packages using SSH.

It sends an email only if updates are found.

This helps you keep your server safe by reminding you to update packages without logging in manually all the time.


Inputs, Processing Steps, and Output

Inputs

  • SSH credentials with password or key
  • SMTP email account details

Processing Steps

  • A scheduled trigger runs once each day.
  • An SSH connection to the server runs apt list --upgradable.
  • Raw command output is turned into a clean HTML bullet list using a Code node.
  • An If node decides if email should send based on list being empty or not.
  • If updates exist, workflow sends a notification email.

Output

A formatted email listing upgradable packages when updates are present.

If no updates found, no email is sent.


Who Should Use This Workflow

This workflow fits anyone managing Ubuntu or Debian-based Linux servers.

If daily manual checking wastes time or is forgotten, this helps.

No advanced skills needed; basic server and email info required.


Tools and Services Used

  • n8n: Automation platform to build and run workflows.
  • SSH node: Runs remote commands on servers via Secure Shell.
  • Email Send node: Sends email via SMTP with notification details.
  • SMTP email server: Any provider like Gmail or Outlook to send emails.


Beginner Step-by-Step: How to Use This Workflow in n8n

1. Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Inside the n8n editor, click on “Import from File” and select the downloaded workflow.

2. Configure Credentials

  1. Add required SSH credentials with server IP, username, and password or key.
  2. Set up SMTP email credentials for sending notifications.

3. Update Workflow Settings

  1. Change any email addresses to those you want notifications sent to.
  2. Check any other fields like email subject or update command if needed.

4. Test the Workflow

  1. Run the workflow manually once to verify it connects to SSH and sends email when updates exist.
  2. Check if the email is received properly.

5. Activate Workflow

  1. Turn the workflow live by toggling activation inside n8n.
  2. From now on, it will run daily and send updates automatically when needed.

Use this simple setup to avoid daily manual server checks.

For more control or hosting, consider self-host n8n.


Edge Cases and Errors

  • SSH connection errors often mean wrong IP, wrong credentials, or firewall blocks.
  • Email failures usually happen due to wrong SMTP settings or unverified sender/recipient addresses.
  • Empty or wrong update emails result if the If node does not check exactly for an empty HTML list.

Always test connection nodes independently before going live.


Customization Ideas

  • Use SSH Key instead of password for better security.
  • Add multiple recipients separated by commas in the Email Send node.
  • Change server command for other distros like CentOS (yum check-update) or Fedora (dnf check-update).
  • Update email subject to add dynamic date using {{ $now.toISOString().slice(0,10) }}.

Summary of Benefits

✓ Saves daily manual time checking server updates.

✓ Sends email alerts only if updates exist to avoid spam.

✓ Helps maintain server security by reminding about updates.

✓ Easy to configure and use inside n8n platform.


Frequently Asked Questions

The workflow runs the command apt list –upgradable through SSH and checks if the output contains any upgradable packages before sending email.
Yes, the SSH node supports private key authentication and it can be configured instead of password for secure access.
No, the workflow’s If node checks exactly if the HTML list is empty and stops sending emails if no updates are found.
No, the command in the SSH node can be changed to other package manager commands like yum or dnf for non-Ubuntu Linux distributions.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free