Root#
$()#
Description: Returns the data of the specified node
Syntax: $(nodeName)
Returns: NodeData
Source: Custom n8n functionality
Parameters:
nodeName(String) - The name of the node to retrieve data for
$binary#
Description: Returns any binary input data to the current node, for the current item. Shorthand for $input.item.binary.
Syntax: $binary
Returns: Array
Source: Custom n8n functionality
$execution#
Description: Retrieve or set metadata for the current execution
Syntax: $execution
Returns: ExecData
Source: Custom n8n functionality
$fromAI()#
Description: Use when a large language model should provide the value of a node parameter. Consider providing a description for better results.
Syntax: $fromAI(key, description?, type?, defaultValue?)
Returns: any
Source: Custom n8n functionality
Parameters:
key(String) - The name of the field to fetch. May only contain letters, numbers, underscores and hyphens.description(String) - optional - Use to give the model more context on exactly what it should returntype(String) - optional - The type of the value to return. One ofstring,number,boolean,json,date,datetime. Defaults tostring.defaultValue(any) - optional - A value to use if the model doesn’t return the key
Examples:
1 2 | |
1 2 | |
1 2 | |
$if()#
Description: Returns one of two values depending on the condition. Similar to the ? operator in JavaScript.
Syntax: $if(condition, valueIfTrue, valueIfFalse)
Returns: any
Source: Custom n8n functionality
Parameters:
condition(Boolean) - The check to make. Should evaluate to eithertrueorfalsevalueIfTrue(any) - The value to return if the condition is truevalueIfFalse(any) - The value to return if the condition is false
Examples:
1 2 | |
1 2 3 | |
$ifEmpty()#
Description: Returns the first parameter if it isn’t empty, otherwise returns the second parameter. The following count as empty: ””, [], {}, null, undefined
Syntax: $ifEmpty(value, valueIfEmpty)
Returns: any
Source: Custom n8n functionality
Parameters:
value(any) - The value to return, provided it isn’t emptyvalueIfEmpty(any) - What to return ifvalueis empty
Examples:
1 | |
$input#
Description: The input data of the current node
Syntax: $input
Returns: NodeData
Source: Custom n8n functionality
$itemIndex#
Description: The position of the item currently being processed in the list of input items
Syntax: $itemIndex
Returns: Number
Source: Custom n8n functionality
$jmespath()#
Description: Extracts data from an object (or array of objects) using a JMESPath expression. Useful for querying complex, nested objects. Returns undefined if the expression is invalid.
Syntax: $jmespath(obj, expression)
Returns: any
Source: Custom n8n functionality
Parameters:
obj(Object|Array) - The Object or array of Objects to retrieve data fromexpression(String) - A JMESPath expression defining the data to retrieve from the object
Examples:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
$json#
Description: Returns the JSON input data to the current node, for the current item. Shorthand for $input.item.json. More info
Syntax: $json
Returns: Object
Source: Custom n8n functionality
$max()#
Description: Returns the highest of the given numbers
Syntax: $max(num1, num2, …, numN)
Returns: Number
Source: Custom n8n functionality
Parameters:
num1(Number) - The first number to comparenum2(Number) - The second number to compare
$min()#
Description: Returns the lowest of the given numbers
Syntax: $min(num1, num2, …, numN)
Returns: Number
Source: Custom n8n functionality
Parameters:
num1(Number) - The first number to comparenum2(Number) - The second number to compare
$nodeVersion#
Description: The version of the current node (as displayed at the bottom of the nodes’s settings pane)
Syntax: $nodeVersion
Returns: String
Source: Custom n8n functionality
$now#
Description: A DateTime representing the current moment.
Uses the workflow’s time zone (which can be changed in the workflow settings).
Syntax: $now
Returns: DateTime
Source: Custom n8n functionality
$pageCount#
Description: The number of results pages the node has fetched. Only available in the ‘HTTP Request’ node.
Syntax: $pageCount
Returns: Number
Source: Custom n8n functionality
$parameter#
Description: The configuration settings of the current node. These are the parameters you fill out within the node’s UI (e.g. its operation).
Syntax: $parameter
Returns: NodeParams
Source: Custom n8n functionality
$prevNode#
Description: Information about the node that the current input came from.
When in a ‘Merge’ node, always uses the first input connector.
Syntax: $prevNode
Returns: PrevNodeData
Source: Custom n8n functionality
$request#
Description: The request object sent during the last run of the node. Only available in the ‘HTTP Request’ node.
Syntax: $request
Returns: Object
Source: Custom n8n functionality
$response#
Description: The response returned by the last HTTP call. Only available in the ‘HTTP Request’ node.
Syntax: $response
Returns: HTTPResponse
Source: Custom n8n functionality
$runIndex#
Description: The index of the current run of the current node execution. Starts at 0.
Syntax: $runIndex
Returns: Number
Source: Custom n8n functionality
$secrets#
Description: The secrets from an external secrets vault, if configured. Secret values are never displayed to the user. Only available in credential fields.
Syntax: $secrets
Returns: Object
Source: Custom n8n functionality
$today#
Description: A DateTime representing midnight at the start of the current day.
Uses the instance’s time zone (unless overridden in the workflow’s settings).
Syntax: $today
Returns: DateTime
Source: Custom n8n functionality
$vars#
Description: The variables available to the workflow
Syntax: $vars
Returns: Object
Source: Custom n8n functionality
$workflow#
Description: Information about the current workflow
Syntax: $workflow
Returns: WorkflowData
Source: Custom n8n functionality