Trigger Nodes
Trigger nodes are the starting point of every n8n workflow. They define when and how a workflow begins execution. Understanding the different trigger types is essential for building effective automation.Trigger Types Overview
Webhook Triggers
Instant execution when external service calls your URL
Polling Triggers
Periodic checks for new data or changes
Schedule Triggers
Time-based execution on a schedule
Webhook Triggers
Webhook triggers create HTTP endpoints that external services can call to start your workflow instantly. They are event-driven and execute immediately when triggered.How Webhooks Work
- Overview
- Configuration
- Response Configuration
- Security
Architecture:Key Concepts:
- Test URL - Used during workflow development
- Production URL - Used when workflow is active
- Webhook Methods - Lifecycle management (create, check, delete)
- Authentication - Built-in security options
- Real-time event processing
- Third-party service integrations
- Form submissions
- API endpoints
- IoT device events
Service-Specific Webhook Triggers
Many integrations provide dedicated webhook triggers with automatic registration:GitHub Trigger
GitHub Trigger
Webhook Events:Implementation Note:
Uses
- Push events
- Pull requests
- Issues
- Releases
- Branch/tag creation
- Creates webhook in GitHub automatically
- Handles secret validation
- Cleans up on workflow deactivation
webhookMethods for lifecycle management:checkExists()- Verify webhookcreate()- Register webhookdelete()- Remove webhook
Slack Trigger
Slack Trigger
Event Types:
- New messages
- Reactions added
- User mentions
- Channel updates
- File shared
- Create Slack App
- Enable Event Subscriptions
- Add webhook URL
- Subscribe to bot events
Stripe Trigger
Stripe Trigger
Webhook Events:
- Payment succeeded
- Customer created
- Subscription updated
- Invoice paid
- Charge refunded
- Creates endpoint in Stripe
- Validates webhook signatures
- Handles event types
Microsoft Teams Trigger
Microsoft Teams Trigger
Event Types:
- Channel messages
- Team updates
- Meeting scheduled
WooCommerce Trigger
WooCommerce Trigger
Webhook Topics:
- Order created
- Order updated
- Product created
- Customer created
- Registers webhook via WooCommerce API
- Sets delivery URL
- Configures topic and secret
Webhook Node Implementation
The core Webhook node provides maximum flexibility:Polling Triggers
Polling triggers periodically check external services for new data or changes. They execute at regular intervals and trigger workflows when new items are detected.How Polling Works
- Polling Mechanism
- Configuration
- Best Practices
Execution Flow:State Management:Key Concepts:
- Uses
polling: truein node description - Implements
poll()function - Stores state in workflow static data
- Returns
nullwhen no new data
Common Polling Triggers
RSS Feed Trigger
RSS Feed Trigger
Implementation:Use Cases:
- Blog updates
- News feeds
- Podcast episodes
- Content aggregation
Google Sheets Trigger
Google Sheets Trigger
Trigger Events:Features:
- Row added
- Row updated
- Row added or updated
- Revision-based detection
- Row-level change tracking
- Handles updates and additions
Gmail Trigger
Gmail Trigger
Configuration:State Management:
- Tracks last message ID
- Handles pagination
- Processes attachments
- Email automation
- Attachment processing
- Notification routing
Salesforce Trigger
Salesforce Trigger
SOQL Query Polling:Implementation:
Airtable Trigger
Airtable Trigger
Polling Configuration:Features:
- Field-based change detection
- View-specific polling
- Formula field support
Notion Trigger
Notion Trigger
Database Polling:
Schedule Triggers
Schedule triggers execute workflows based on time patterns - perfect for recurring tasks and maintenance operations.Schedule Trigger Node
- Overview
- Simple Intervals
- Business Hours
- Cron Expressions
Schedule Types:
- Simple Intervals - Seconds, minutes, hours, days, weeks, months
- Specific Times - Daily at specific hour
- Day of Week - Weekly schedules
- Custom Cron - Advanced patterns
- Multiple schedules per trigger
- Timezone support
- Between times constraints
- Complex recurrence rules
Common Schedule Patterns
Data Backups
Data Backups
Daily at 2 AM:Use Case: Database backups, data exports, cleanup tasks
Report Generation
Report Generation
Weekly on Sunday at 11 PM:Use Case: Weekly reports, analytics summaries, invoicing
Monitoring
Monitoring
Every 5 Minutes:Use Case: Service health checks, API monitoring, uptime tracking
Monthly Maintenance
Monthly Maintenance
First Monday of Every Month:Use Case: Monthly cleanups, license checks, subscription renewals
Manual Triggers
Some triggers support manual execution for testing:Manual Trigger Node
Purpose:Features:
- Canvas-based testing
- Manual workflow execution
- Development and debugging
- Instant execution from canvas
- No external dependencies
- Sample data generation
Generic Trigger Interface
Some nodes implement custom trigger logic:MQTT Trigger
MQTT Trigger
Generic Trigger Implementation:Use Cases:
- Message queue subscriptions
- WebSocket connections
- Database change streams
- Custom event listeners
Redis Trigger
Redis Trigger
Subscribe to Pub/Sub:
Choosing the Right Trigger
- Decision Matrix
- Performance
- Best Practices
| Requirement | Trigger Type |
|---|---|
| Real-time events from external service | Webhook |
| Check for new emails/messages | Polling |
| Run on a schedule | Schedule |
| Manual testing | Manual |
| Database change streams | Generic (custom) |
| Message queue | Generic (custom) |
| Form submissions | Webhook |
| RSS/Feed monitoring | Polling (RSS) |
| Time-based reports | Schedule |
| Service supports webhooks | Webhook |
Next Steps
Action Nodes
Learn about data processing and transformation nodes
Popular Nodes
Explore commonly used integrations
Build Workflows
Create your first automated workflow
Webhook Guide
Deep dive into webhook configuration