Node Types
This guide covers the core interfaces and patterns for implementing n8n nodes.INodeType Interface
Every n8n node implements theINodeType interface, which defines the node’s structure and behavior.
INodeTypeDescription
required
Node metadata, UI configuration, and parameter definitions
function
Main execution function for programmatic nodes
function
Polling function for trigger nodes with
polling: truefunction
Generic trigger function for event-based triggers
function
Webhook handler for webhook-based triggers
object
Optional methods for dynamic options, credential testing, and resource mapping
loadOptions: Dynamic parameter optionslistSearch: Searchable list optionscredentialTest: Credential validationresourceMapping: Resource field mappingactionHandler: Custom button actions
object
Webhook lifecycle methods (checkExists, create, delete)
INodeTypeDescription
The description object defines all node metadata and UI configuration.Core Properties
string
required
Human-readable name shown in the UI
string
required
Internal identifier (kebab-case)
Icon
Node icon. Can be:
fa:icon-name- FontAwesome iconfile:icon.svg- Custom SVG filenode:package.nodeName- Icon from another node
ThemeIconColor
Icon color from design system:
gray, blue, green, red, orange, purple, etc.NodeGroupType[]
required
Node categories:
input, output, transform, trigger, schedulenumber | number[]
required
Node version(s). Use array for light versioning:
[1, 2, 3]Array<NodeConnectionType | INodeInputConfiguration>
required
Input connections. Common types:
NodeConnectionTypes.Main- Standard data flowNodeConnectionTypes.AiLanguageModel- AI model inputNodeConnectionTypes.AiMemory- AI memory input
Array<NodeConnectionType | INodeOutputConfiguration>
required
Output connections. Same types as inputs.
INodeProperties[]
required
Node parameters definition (see Node Parameters guide)
INodeCredentialDescription[]
Required credentials for the node
Advanced Properties
boolean
Set to
true for polling trigger nodesIWebhookDescription[]
Webhook configuration for webhook triggers
HttpRequestOptions
Default HTTP request options for declarative nodes
number
Maximum instances of this node allowed in a workflow
object
Lifecycle hooks:
activate, deactivateNodeFeaturesDefinition
Feature flags with version-based conditions
Node Types
Programmatic Nodes
Nodes with custom execution logic implement theexecute method.
packages/nodes-base/nodes/Set/v2/SetV2.node.ts
Declarative Nodes
Declarative nodes userequestDefaults and routing configuration instead of implementing execute.
Example Declarative Node
Trigger Nodes
Webhook Triggers
Webhook Trigger Implementation
Polling Triggers
Polling Trigger Implementation
Versioned Nodes
For major changes, use theVersionedNodeType class.
packages/nodes-base/nodes/Set/Set.node.ts
Dynamic Methods
Nodes can implement dynamic behavior through themethods object.
Load Options
Provide dynamic dropdown options:Load Options Method
List Search
Searchable resource lists:List Search Method
Credential Test
Validate credentials:Credential Test
Best Practices
- Structure
- Type Safety
- Error Handling
- Performance
- Use clear, descriptive
displayNamevalues - Set appropriate
groupfor node categorization - Provide meaningful
descriptionandsubtitle - Use semantic versioning for
version
See Also
- Node Execution - Execution contexts and helpers
- Node Parameters - Parameter types and configuration
- Credentials - Credential implementation