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
function
required
Get input data from the previous node
function
required
Get parameter value for a specific item
function
Get the current node object
function
Get workflow metadata
function
Get/set persistent workflow data
function
Get decrypted credentials
function
Get the current execution ID
function
Get execution mode (manual, trigger, webhook, etc.)
Advanced Methods
function
Check if node should continue on error
function
Evaluate an n8n expression
function
Get/set context data
function
Pause execution until specified time
function
Send message to the UI
function
Execute another workflow
ITriggerFunctions
Execution context for trigger nodes.Trigger Function Implementation
function
required
Emit data to start workflow execution
function
Report fatal trigger error and deactivate workflow
function
Persist failed execution but keep trigger active
function
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
function
Get request body data
function
Get request headers
function
Get query parameters
function
Get Express request object
function
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
function
Convert objects to node execution data array
function
Normalize data to execution format
function
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