Portal Community

What Are Shorthands?

Shorthands are directives that expand into longer reference patterns. They reduce boilerplate and improve readability. The system resolves them during the expression evaluation pipeline by detecting the prefix and expanding it into the full target directive.

For example:

When to Use Shorthands

Use CaseShorthandWhy
Quick field reference$outputFaster typing than @{output:...}
JSON response parsing$$jsonAutomatically parses JSON in one step
HTML/XML response parsing@@jsonAutomatically parses with DOM selectors
Input data reference$inputCleaner syntax for current node input
Workflow variables$varShorthand for variable lookup
Execution memory$memoryAccess shared execution-scoped data

Built-in Shorthands Reference

$output — Output Field Reference

Target Path: @{output:{nodeId}.{field}}

Description: Quick access to output fields from completed upstream nodes. Resolves the full node output and extracts the specified field.

Usage:

@{$output:form-1.email}

Real-World Examples:

  • @{$output:user-lookup-1.firstName} — Get first name from user lookup result
  • @{$output:api-call-1.statusCode} — Get HTTP status code from API response
  • @{$output:json-transform-1.result} — Get transformed JSON output

When to Use: Whenever you need a specific field from a node's output data. This is the most commonly used shorthand.

$$json — JSON Parsing

Target Path: @{output:{nodeId}.{field} | parseJson}

Description: Combines output reference with automatic JSON parsing. Useful for API responses that come as JSON strings.

Usage:

@{$$json:http-request-1.body}

Real-World Examples:

  • @{$$json:rest-api-1.responseBody} — Parse JSON response body from REST API call
  • @{$$json:webhook-1.payload} — Parse JSON webhook payload
  • @{$$json:transform-1.jsonString} — Parse JSON string output from transformation

When to Use: When you need to parse a JSON string from an API response or data transformation before accessing nested fields.

@@json — HTML/XML Parsing

Target Path: @{output:{nodeId}.{field} | parseHtml}

Description: Combines output reference with HTML/XML parsing. Supports DOM selectors like jQuery.

Usage:

@{@@json:web-scrape-1.htmlContent}

Real-World Examples:

  • @{@@json:scraper-1.pageHtml} — Parse HTML from web scraper
  • @{@@json:xml-response-1.body} — Parse XML from legacy API
  • @{@@json:download-1.htmlFile} — Parse downloaded HTML file

When to Use: When dealing with HTML or XML responses that need DOM-based extraction.

$input — Input Data Reference

Target Path: @{input:{field}}

Description: Access data arriving at the current node from upstream connections.

Usage:

@{$input:email}

Real-World Examples:

  • @{$input:userId} — Get user ID passed to this node
  • @{$input:queryParameter} — Get query parameter from trigger input
  • @{$input:payload} — Pass through the entire input payload

When to Use: When you need to reference data that was passed into the current node from a previous node.

$$input — Parsed Input Data

Target Path: @{input:{field} | parseJson}

Description: Access input data with automatic JSON parsing applied.

Usage:

@{$$input:jsonPayload}

Real-World Examples:

  • @{$$input:webhookPayload} — Parse webhook JSON from input
  • @{$$input:requestBody} — Parse JSON request body from input

When to Use: When input data arrives as a JSON string and you need to parse it before access.

$var — Workflow Variables

Target Path: @{var:{name}}

Description: Access workflow variables set by Variable Assignment nodes.

Usage:

@{$var:totalCount}

Real-World Examples:

  • @{$var:retryCount} — Check current retry count
  • @{$var:maxRecords} — Access configuration limit
  • @{$var:processStatus} — Get process status flag

When to Use: When you need to reference workflow variables for conditional logic or parameter passing.

$$var — Parsed Variable Data

Target Path: @{var:{name} | parseJson}

Description: Access workflow variables with automatic JSON parsing.

Usage:

@{$$var:configJson}

Real-World Examples:

  • @{$$var:settingsObject} — Parse stored configuration from variable
  • @{$$var:userPreferences} — Parse user preference JSON

When to Use: When a workflow variable contains a JSON string that needs parsing.

$memory — Execution Memory Access

Target Path: @{memory:{key}}

Description: Access execution memory (ExecutionMemory.Cache) — shared state within a single execution.

Usage:

@{$memory:loopIndex}

Real-World Examples:

  • @{$memory:currentLoopIteration} — Get current loop index in nested loops
  • @{$memory:accumulatedTotal} — Access accumulated value across iterations
  • @{$memory:scoped:myKey} — Access scoped execution memory

When to Use: When you need to access temporary state stored during execution, especially in loop contexts.

$$memory — Parsed Memory Data

Target Path: @{memory:{key} | parseJson}

Description: Access execution memory with automatic JSON parsing.

Usage:

@{$$memory:cachedData}

Real-World Examples:

  • @{$$memory:loopState} — Parse loop state object from memory
  • @{$$memory:aggregatedResults} — Parse aggregated results stored during execution

When to Use: When execution memory contains JSON data that needs parsing before use.

Complete Built-in Shorthands Table

Prefix Target Directive Purpose Example
$output @{output:{id}.{field}} Node output field reference @{$output:api-1.result}
$$json @{output:{id}.{field} | parseJson} Node output with JSON parsing @{$$json:api-1.body}
@@json @{output:{id}.{field} | parseHtml} Node output with HTML/XML parsing @{@@json:page-1.html}
$input @{input:{field}} Current node input data @{$input:email}
$$input @{input:{field} | parseJson} Current node input with JSON parsing @{$$input:payload}
$var @{var:{name}} Workflow variable reference @{$var:maxRetries}
$$var @{var:{name} | parseJson} Workflow variable with JSON parsing @{$$var:config}
$memory @{memory:{key}} Execution memory access @{$memory:loopIndex}
$$memory @{memory:{key} | parseJson} Execution memory with JSON parsing @{$$memory:state}

Shorthand Detection and Resolution

The resolver detects shorthands by examining the prefix after @{. If a shorthand is registered, it expands the expression before evaluation:

// Input expression
@{$output:form-1.email}

// Detected prefix: $output
// Expanded to:
@{output:form-1.email}

// Resolved value: alice@example.com

Combining Shorthands with JavaScript

You can use shorthands inside JavaScript expressions (@{js:...}) to make them more readable:

// Reference output with shorthand inside JS expression
@{js: $output['form-1'].email.toLowerCase()}

// Combine JSON parsing shorthand with logic
@{js: $$json['api-1'].body.result.length > 0 ? 'success' : 'empty'}
Shorthands Are Not Variables Shorthands are syntactic sugar resolved at parse time. They are not JavaScript variables. They work within directive syntax (@{...}) to expand into longer directive patterns. For JavaScript expressions, the system injects corresponding variables like $output, $input, $var, and $memory.

Common Patterns

// Get a field from multiple sources
User Email (from form):     @{$output:form-1.email}
User Email (from input):    @{$input:email}
User Email (from memory):   @{$memory:cachedEmail}

// Parse API responses
Raw response:               @{$output:api-1.body}
Parsed response:            @{$$json:api-1.body}

// Access loop state
Current iteration:          @{$memory:iteration}
Accumulated total:          @{$memory:total}

// Use in conditionals
@{js: @{$var:isActive} === true ? 'active' : 'inactive'}
@{js: @{$$json:api-1.body}.status === 'success'}
Shorthand Scope Built-in shorthands are defined at application startup. Custom shorthands must be registered in the DI container before the expression evaluator is used. You cannot add shorthands at runtime without custom implementation — see Custom Shorthands for details.