Node Execution
This guide covers the execution contexts and helper functions available to nodes during runtime.Execution Contexts
Different node operations have access to different execution contexts, each providing specific capabilities.IExecuteFunctions
The primary execution context for programmatic nodes.Core Methods
Get input data from the previous node
Get parameter value for a specific item
Get the current node object
Get workflow metadata
Get/set persistent workflow data
Get decrypted credentials
Get the current execution ID
Get execution mode (manual, trigger, webhook, etc.)
Advanced Methods
Check if node should continue on error
Evaluate an n8n expression
Get/set context data
Pause execution until specified time
Send message to the UI
Execute another workflow
ITriggerFunctions
Execution context for trigger nodes.Trigger Function Implementation
Emit data to start workflow execution
Report fatal trigger error and deactivate workflow
Persist failed execution but keep trigger active
Get how the workflow was activated
IPollFunctions
Execution context for polling trigger nodes.Poll Function Implementation
IWebhookFunctions
Execution context for webhook nodes.Webhook Function Implementation
Get request body data
Get request headers
Get query parameters
Get Express request object
Get Express response object
ILoadOptionsFunctions
Context for loading dynamic options.Load Options Context
Helper Functions
All execution contexts provide ahelpers object with utility functions.
HTTP Requests
- httpRequest
- httpRequestWithAuthentication
- requestWithAuthenticationPaginated
HTTP Request
Binary Data
Data Transformation
Convert objects to node execution data array
Normalize data to execution format
Add pairedItem metadata to results
Deduplication
Prevent processing duplicate items in polling triggers.Deduplication Helpers
File System
Node Execution Data
The standard data format passed between nodes.INodeExecutionData Structure
Working with Items
Processing Items
Error Handling
Best Practices
- Performance
- State Management
- Error Handling
- Data Flow
- Process items in batches when possible
- Use streaming for large files
- Cache expensive operations
- Implement proper pagination
- Limit concurrent API requests
See Also
- Node Types - Node interfaces and implementation
- Node Parameters - Parameter configuration
- Credentials - Working with credentials