Automate n8n updates with version checking and Portainer webhook
Ready for 3.0What this workflow does
This workflow has 6 nodes and runs on a schedule (every 16 hours). It uses only n8n's built-in nodes. It also calls registry.npmjs.org and portainer.tld.com over HTTP.
How it runs
Trigger: On a schedule (every 16 hours).
- Get the latest n8n version (HTTP Request): calls registry.npmjs.org
- Get local n8n metrics (HTTP Request): calls an HTTP API
- local n8n version (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Portainer Webhook (HTTP Request): calls portainer.tld.com (POST)
HTTP calls to: registry.npmjs.org, portainer.tld.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (4)
- HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - If
n8n-nodes-base.if - Code
n8n-nodes-base.code
From the author
🔄 Purpose of the Workflow: The Update-N8N workflow is designed to automatically trigger a (Portainer) webhook to update an N8N container, but only if a new version of N8N is available. ⚙️ Detailed Workflow Steps: 🕒 Scheduled Trigger The workflow runs every…