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
- Download the workflow file using the Download button on this page.
- Inside the n8n editor, click on “Import from File” and select the downloaded workflow.
2. Configure Credentials
- Add required SSH credentials with server IP, username, and password or key.
- Set up SMTP email credentials for sending notifications.
3. Update Workflow Settings
- Change any email addresses to those you want notifications sent to.
- Check any other fields like email subject or update command if needed.
4. Test the Workflow
- Run the workflow manually once to verify it connects to SSH and sends email when updates exist.
- Check if the email is received properly.
5. Activate Workflow
- Turn the workflow live by toggling activation inside n8n.
- 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.
