Skip to main content

Node Types

This guide covers the core interfaces and patterns for implementing n8n nodes.

INodeType Interface

Every n8n node implements the INodeType 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: true
function
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 options
  • listSearch: Searchable list options
  • credentialTest: Credential validation
  • resourceMapping: Resource field mapping
  • actionHandler: 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 icon
  • file:icon.svg - Custom SVG file
  • node: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, schedule
number | 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 flow
  • NodeConnectionTypes.AiLanguageModel - AI model input
  • NodeConnectionTypes.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 nodes
IWebhookDescription[]
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, deactivate
NodeFeaturesDefinition
Feature flags with version-based conditions

Node Types

Programmatic Nodes

Nodes with custom execution logic implement the execute method.
packages/nodes-base/nodes/Set/v2/SetV2.node.ts

Declarative Nodes

Declarative nodes use requestDefaults 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 the VersionedNodeType class.
packages/nodes-base/nodes/Set/Set.node.ts

Dynamic Methods

Nodes can implement dynamic behavior through the methods object.

Load Options

Provide dynamic dropdown options:
Load Options Method
Searchable resource lists:
List Search Method

Credential Test

Validate credentials:
Credential Test

Best Practices

  • Use clear, descriptive displayName values
  • Set appropriate group for node categorization
  • Provide meaningful description and subtitle
  • Use semantic versioning for version

See Also