Production-ready n8n workflow automations for infrastructure management, monitoring, and operations
This repository contains automated workflows for n8n, covering:
- ποΈ Infrastructure - Server and container management (Portainer, Docker, system updates)
- π Monitoring - System health checks, alerts, and observability
- πΎ Backup - Automated backup routines and verification
- π’ Notifications - Centralized alerting and reporting
All workflows are:
- β Production-tested
- β Fully documented with setup guides
- β Versioned with semantic versioning
- β Secure (no credentials in repository)
- β CI/CD validated on every commit
This is a PUBLIC repository.
- β NO credentials or sensitive data are stored here
- β All credentials must be configured via n8n GUI
- β Example files use placeholder values only
- β
.gitignoreprevents accidental credential commits - β GitHub Actions scans for sensitive data
See Security Guidelines below.
- n8n installed (>= 1.15.0) - Installation Guide
- Access to target systems (servers, APIs, etc.)
- Required credentials configured in n8n
-
Clone this repository:
git clone https://github.com/spydi/spydi-n8n-automation.git cd spydi-n8n-automation -
Configure server inventory:
cp examples/configs/servers.example.json servers.json nano servers.json # Update with your actual server details -
Set up credentials in n8n:
- See examples/credentials/ for templates
- Configure SSH, SMTP, Slack, etc. in n8n GUI
- Never store actual credentials in files!
-
Import workflows:
- Open n8n β Workflows β Import from File
- Select workflow JSON from
workflows/directory - Map credentials to your n8n credentials
- Test in development first!
See docs/getting-started/ for detailed setup instructions.
| Workflow | Version | Description | Status |
|---|---|---|---|
| Portainer Upgrade | 1.0.0 | Automated Portainer container upgrades with validation | β Stable |
| Workflow | Version | Description | Status |
|---|---|---|---|
| Coming soon | - | Server health monitoring | π§ Planned |
| Workflow | Version | Description | Status |
|---|---|---|---|
| Coming soon | - | Database backup automation | π§ Planned |
| Workflow | Version | Description | Status |
|---|---|---|---|
| Coming soon | - | Centralized notification router | π§ Planned |
View full workflow catalog β
spydi-n8n-automation/
βββ workflows/ # n8n workflow files organized by category
β βββ infrastructure/ # Infrastructure management workflows
β βββ monitoring/ # Monitoring and alerting
β βββ backup/ # Backup automation
β βββ notifications/ # Notification workflows
βββ docs/ # Comprehensive documentation
β βββ getting-started/ # Setup and installation guides
β βββ guides/ # How-to guides and best practices
β βββ reference/ # Technical reference docs
β βββ contributing/ # Contribution guidelines
βββ examples/ # Example configurations (NO sensitive data)
β βββ configs/ # Server inventory examples
β βββ credentials/ # Credential setup templates
βββ templates/ # Workflow templates for new automations
βββ scripts/ # Validation and helper scripts
βββ .github/workflows/ # CI/CD automation
β Credentials or API keys
β Server IPs/hostnames (use servers.example.json for templates)
β Environment-specific data
β Database connection strings
β SSH keys or certificates
β Real webhook URLs
β Email passwords
β
Use .example suffix for template files
β
Configure credentials via n8n GUI
β
Use n8n variables ($vars) for environment-specific data
β
Review files before committing
β
Let CI/CD catch sensitive data before merge
All sensitive credentials must be stored in n8n's credential manager:
- n8n β Credentials β New Credential
- Select type (SSH, SMTP, API, etc.)
- Enter credentials
- Reference by name in workflows
Never hardcode credentials in workflow JSON files.
See examples/credentials/ for setup guides.
This project uses a branch-based development workflow to ensure stability:
main- Production-ready workflows (stable releases only)develop- Pre-release testing (beta features, integration testing)feature/*- Development branches for new workflows/features
Testing Stages:
- Local Testing - Test on development servers first
- Staging Testing - Integration testing in staging environment (24-48 hours)
- Production Release - Phased rollout with monitoring
Quick Start:
# Create feature branch
git checkout -b feature/my-new-workflow
# Develop and test locally
# ... make changes ...
# Create PR to develop branch
git push origin feature/my-new-workflow
# Open PR: feature/my-new-workflow β developπ Complete Guides:
- Development Workflow - Complete branching strategy, 16-step development lifecycle
- Testing Workflows - 3-stage testing process with validation checklists
- Workflow Versioning - Semantic versioning and CHANGELOG management
- Using Workflows Safely - End-user safety guidelines
-
Create workflow directory:
git checkout develop git checkout -b feature/new-workflow mkdir -p workflows/[category]/[workflow-name] cd workflows/[category]/[workflow-name] -
Use templates:
cp ../../../templates/_workflow-template/*.template.md . # Rename .template.md to .md and customize
-
Required files:
workflow-name.json- n8n workflow export with metadataREADME.md- Usage documentationprerequisites.md- Setup requirementstroubleshooting.md- Common issuesCHANGELOG.md- Version history
-
Add metadata to JSON:
{ "meta": { "templateVersion": "1.0.0", "author": "your-name", "category": "infrastructure", "description": "Brief description", ... } } -
Test locally (Stage 1):
# Validate workflow python scripts/check-version.py bash scripts/check-sensitive-data.sh # Test on development servers
-
Submit PR to develop:
git add workflows/[category]/[workflow-name] git commit -m "feat: add [workflow-name] automation" git push origin feature/new-workflow -
Staging testing (Stage 2):
- PR merged to
develop - Test in staging environment for 24-48 hours
- Monitor execution logs
- PR merged to
-
Production release (Stage 3):
- PR from
developβmain - Tag release (e.g.,
v1.1.0) - Phased rollout with monitoring
- PR from
See CONTRIBUTING.md for complete contribution guidelines.
# Validate all workflows
./scripts/check-version.py # Check version metadata
./scripts/validate-changelogs.sh # Validate CHANGELOG format
./scripts/check-sensitive-data.sh # Scan for credentials
./scripts/check-workflow-consistency.py # Check file structure- Getting Started - Installation and setup guides
- Using Workflows Safely - Safety guidelines for workflow usage
- Workflow Catalog - Complete workflow listing
- Contributing Guide - How to contribute workflows
- Development Workflow - Branching strategy and development lifecycle
- Testing Workflows - 3-stage testing process
- Workflow Versioning - Semantic versioning and CHANGELOG management
- Repository Structure - Complete repo organization guide
- Reference Documentation - Technical reference and API docs
- Validation Scripts - Script documentation
Never test untested workflows on production servers!
This project uses a 3-stage testing process:
- Test workflows on development/test servers only
- Validate JSON syntax and metadata
- Check for sensitive data exposure
- Verify expected outcomes
# Validation
python scripts/check-version.py
bash scripts/check-sensitive-data.sh
# Test execution on dev servers- Deploy to staging environment
- Run workflows for 24-48 hours
- Monitor execution logs
- Verify integration with other systems
- Performance and error rate monitoring
- Phased rollout (1-5 servers β 25% β 50% β 100%)
- Continuous monitoring
- Rollback plan ready
- Post-deployment verification
π Complete Testing Guide: docs/guides/testing-workflows.md
See individual workflow documentation for specific testing instructions.
We welcome contributions! This project follows a structured development workflow to ensure quality and stability.
- Fork this repository
- Create feature branch from
develop:git checkout -b feature/new-automation - Add your workflow following templates
- Test locally (Stage 1 testing required)
- Ensure all validations pass
- Update documentation
- Submit pull request to
developbranch
mainβ Production releases only (stable workflows)developβ Integration and staging testingfeature/*β New workflow developmentbugfix/*β Bug fixeshotfix/*β Critical production fixes
β
Local testing complete (Stage 1)
β
All validation scripts pass
β
Documentation updated (README, prerequisites, troubleshooting, CHANGELOG)
β
No sensitive data in commits
β
Semantic versioning followed
β
CHANGELOG updated
π Complete Guides:
- CONTRIBUTING.md - Full contribution guidelines
- DEVELOPMENT.md - Development workflow and lifecycle
- Testing Guide - Testing process and checklists
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- n8n Community: community.n8n.io
- β Repository structure and documentation
- β Portainer upgrade automation
- β CI/CD validation pipeline
- β Security scanning
- π Docker cleanup automation
- π Server health monitoring
- π Slack notification integration
- π Batch server processing
- π Database backup automation
- π SSL certificate renewal
- π Log aggregation workflows
- π Incident response automation
- Workflows: 1 (more coming soon!)
- Categories: 4
- Documentation Pages: 15+
- Automated Validations: 5
- n8n - Workflow automation tool
- n8n-nodes-base - n8n core nodes
- Awesome n8n - Curated list of n8n resources
- n8n team for the amazing workflow automation platform
- Community contributors
- Open source projects that inspired this repository
Maintained by: spydi
Last Updated: 2025-12-21
Repository Version: 1.0.0
β Star this repo if you find it useful!