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
Automate server updates with n8n and SSH

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

Learn how to Build this Workflow with AI:

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.


Automate server updates with n8n and SSH

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.