2025-05-30 12:43:55 -06:00

146 lines
3.9 KiB
Markdown

# n8n
Workflow automation tool for connecting services and automating tasks.
## Overview
n8n is a powerful workflow automation tool that allows you to connect various apps and services together. It provides a visual interface for creating automated workflows, making it easy to integrate different systems and automate repetitive tasks.
## Features
- Visual workflow editor
- 400+ integrations
- Custom code execution (JavaScript/Python)
- Webhook support
- Scheduled workflows
- Error handling and retries
- User management
- API access
- Self-hosted and privacy-focused
## Access
- **Default Port**: 5678
- **URL**: `http://localhost:5678`
- **Default User Email**: Set via `N8N_DEFAULT_USER_EMAIL`
- **Default User Password**: Set via `N8N_DEFAULT_USER_PASSWORD`
## Configuration
### Environment Variables
- `N8N_HOST`: Hostname for n8n (default: `n8n.${DOMAIN}`)
- `N8N_PORT`: Internal port (5678)
- `N8N_PROTOCOL`: Protocol for webhooks (https)
- `NODE_ENV`: Environment (production)
- `WEBHOOK_URL`: Base URL for webhooks
- `GENERIC_TIMEZONE`: Timezone setting
- `N8N_ENCRYPTION_KEY`: Encryption key for credentials
- `N8N_USER_MANAGEMENT_DISABLED`: Enable/disable user management
- `N8N_DEFAULT_USER_EMAIL`: Default admin email
- `N8N_DEFAULT_USER_PASSWORD`: Default admin password
### Volumes
- `n8n_data`: Persistent data storage
- `./local-files`: Local file access for workflows
## Getting Started
1. Access n8n at `http://localhost:5678`
2. Log in with your admin credentials
3. Create your first workflow
4. Add nodes for different services
5. Configure connections between nodes
6. Test and activate your workflow
## Common Use Cases
### Documentation Automation
- Auto-generate documentation from code comments
- Sync documentation between different platforms
- Notify team when documentation is updated
### Email Campaign Integration
- Connect Listmonk with external data sources
- Automate subscriber management
- Trigger campaigns based on events
### Database Management with NocoDB
- Sync data between NocoDB and external APIs
- Automate data entry and validation
- Create backup workflows for database content
- Generate reports from NocoDB data
### Development Workflows
- Auto-deploy documentation on git push
- Sync code changes with documentation
- Backup automation
### Data Processing
- Process CSV files and import to databases
- Transform data between different formats
- Schedule regular data updates
## Example Workflows
### Simple Webhook to Email
```
Webhook → Email
```
### Scheduled Documentation Backup
```
Schedule → Read Files → Compress → Upload to Storage
```
### Git Integration
```
Git Webhook → Process Changes → Update Documentation → Notify Team
```
## Security Considerations
- Use strong encryption keys
- Secure webhook URLs
- Regularly update credentials
- Monitor workflow executions
- Implement proper error handling
## Integration with Other Services
n8n can integrate with all services in your Changemaker Lite setup:
- **Listmonk**: Manage subscribers and campaigns
- **PostgreSQL**: Read/write database operations
- **Code Server**: File operations and git integration
- **MkDocs**: Documentation generation and updates
## Troubleshooting
### Common Issues
- **Workflow Execution Errors**: Check node configurations and credentials
- **Webhook Issues**: Verify URLs and authentication
- **Connection Problems**: Check network connectivity between services
### Debugging
```bash
# Check container logs
docker logs n8n-changemaker
# Access container shell
docker exec -it n8n-changemaker sh
# Check workflow executions in the UI
# Visit http://localhost:5678 → Executions
```
## Official Documentation
For comprehensive n8n documentation:
- [n8n Documentation](https://docs.n8n.io/)
- [Community Workflows](https://n8n.io/workflows/)
- [Node Reference](https://docs.n8n.io/integrations/builtin/)
- [GitHub Repository](https://github.com/n8n-io/n8n)