Overview
n8n is a powerful, open-source workflow automation platform that can be self-hosted or used via n8n Cloud. Opsmatic can monitor both deployment types, providing comprehensive analytics and performance insights for your n8n workflows.
Prerequisites
Before connecting n8n to Opsmatic, ensure you have:n8n Instance
API Access
Supported n8n Versions
Opsmatic supports:- n8n Cloud: All current versions
- Self-hosted n8n: Version 0.190.0 and newer
- Docker deployments: All supported n8n Docker images
- Kubernetes deployments: Compatible with n8n Helm charts
Creating an n8n API Key
For n8n Cloud
Access Settings
Navigate to API Keys
Create New Key
Configure Key
- Name: Enter “Opsmatic Monitoring” or similar
- Permissions: Select appropriate permissions (see below)
- Expiration: Set to “Never” or long-term date
Copy Key
For Self-Hosted n8n
Access Admin Panel
Open Settings
Navigate to API Keys
Generate Key
- Label: “Opsmatic Integration”
- Permissions: Read access to workflows and executions
Save Key
Required API Permissions
For optimal monitoring, your n8n API key should have these permissions:Essential Permissions (Required)
Essential Permissions (Required)
- Workflow Read: View workflow definitions and metadata
- Execution Read: Access execution logs and history
- Instance Read: Get basic instance information
Recommended Permissions
Recommended Permissions
- Workflow List: Enumerate all available workflows
- User Read: Access user information for execution context
- Credential Read: Limited credential metadata (not values)
Optional Permissions
Optional Permissions
- Settings Read: Instance configuration for advanced analytics
- Tags Read: Workflow categorization and organization
Adding n8n Connection in Opsmatic
Step-by-Step Setup
Navigate to Connections
Add New Connection
Select n8n
Enter Connection Details
Basic Information
Basic Information
- Service Name: Descriptive name (e.g., “Production n8n Server”)
- Organization: Choose personal or organization context
Connection Settings
Connection Settings
- Base URL: Your n8n instance URL
- API Key: The API key you created earlier
Test Connection
Save Connection
Connection Configuration Details
- Starts with
n8n_api_
- Followed by random characters
- Example:
n8n_api_abc123def456ghi789
Verifying the Connection
Connection Test Results
When you test your n8n connection, you should see:Successful Connection
- ✅ API authentication successful
- ✅ Workflow count retrieved
- ✅ Instance version detected
- ✅ Response time measured
Connection Information
- n8n version number
- Number of accessible workflows
- Response time in milliseconds
- Instance type (cloud/self-hosted)
Troubleshooting Connection Issues
Authentication Failed
Authentication Failed
- Verify API key is copied correctly (no extra spaces)
- Check if API key has expired
- Ensure API key has proper permissions
- Re-generate API key if necessary
Cannot Reach Server
Cannot Reach Server
- Verify Base URL is correct and accessible
- Check if n8n instance is running
- Test URL in browser to confirm accessibility
- Check firewall and network settings
Permission Denied
Permission Denied
- Review API key permissions
- Ensure user account has admin access
- Check if API access is enabled in n8n settings
- Verify organization/team permissions
SSL/TLS Issues
SSL/TLS Issues
- Ensure valid SSL certificate on n8n instance
- Check certificate expiration
- For self-signed certificates, contact support
- Verify HTTPS configuration
What Data is Monitored
Once connected, Opsmatic will monitor:Workflow Information
Workflow Metadata
Workflow Metadata
- Workflow names and unique identifiers
- Creation and modification timestamps
- Active/inactive status
- Workflow complexity (node count)
- Tags and categories
Execution Data
Execution Data
- Execution start and end times
- Success/failure status
- Execution duration
- Error details and stack traces
- Data processed (size and volume)
Performance Metrics
Performance Metrics
- Average execution time per workflow
- Success rate over time
- Resource usage patterns
- Peak execution periods
- Error frequency and types
Instance Health
Availability Monitoring
Availability Monitoring
- API response time tracking
- Uptime/downtime detection
- Connection stability metrics
- Service availability percentage
Performance Tracking
Performance Tracking
- Request/response latency
- API endpoint responsiveness
- Data synchronization success
- System load indicators
Advanced Configuration
Custom Sync Settings
For high-volume n8n instances, you can configure:- Every 5 minutes (high activity)
- Every 30 minutes (standard)
- Hourly (low activity)
- Custom intervals
Webhook Integration (Advanced)
For real-time monitoring, set up webhooks:Enable Webhooks in n8n
Configure Opsmatic Webhook URL
Set Trigger Events
- Workflow execution start/end
- Execution failures
- System events
Test Webhook Delivery
Security Best Practices
API Key Management
- Create dedicated API keys for Opsmatic
- Use descriptive names for easy identification
- Regularly rotate API keys
- Never share keys or commit them to version control
Network Security
- Use HTTPS for all connections
- Implement IP allowlisting if possible
- Monitor API key usage and access
- Set appropriate permissions (read-only)
Monitoring Multiple n8n Instances
If you have multiple n8n deployments:Organization Strategy
Environment Separation
Environment Separation
- Production:
Production n8n - Main
- Staging:
Staging n8n - Testing
- Development:
Dev n8n - Local
Geographic Distribution
Geographic Distribution
- US East:
n8n US-East Production
- Europe:
n8n EU Production
- Asia Pacific:
n8n APAC Production
Client/Project Separation
Client/Project Separation
- Client A:
Client A - Production n8n
- Project X:
Project X - Automation Hub
- Internal:
Internal Tools - n8n