Module workflow

Source

Type Aliases§

Source§

type $Selector<T> = ExpressionBuilderProvider<ExtractChainContext<T>>

Source§

type ExpressionBuilderProvider<CC> = ReturnType<typeof $$>

Source§

type ExpressionOrValue<T> = ExpressionBuilder<any, any, T> | T | string

Type utility for values that can be either an ExpressionBuilder or a direct value

Also allows string as they can represent "={{ }}" expressions pointing to a T value

Source§

type ExtractChainContext<C> = C extends Chain<infer CC> ? CC : {}

Source§

type WorkflowDefinition = Awaited<ReturnType<Workflow["build"]>>

Variables§

Source§

const RESOLVED_NODE_ID_PREFIX: string = ...

Functions§

Source§

expr(
    strings: TemplateStringsArray,
    ...values: any[],
): string

Template literal function for creating n8n expressions. Combines string literals with ExpressionBuilder instances and other values to produce n8n-compatible expression strings.

Format to string{{ expression.format() }}

throws

Error if unsupported value type is provided

Source§

RESOLVED_NODE_ID(nodeId: string): string

Source§

resolveExpressionValue<T>(
    value: ExpressionOrValue<T>,
): string | T

Resolves an ExpressionOrValue to its string representation for use in n8n workflows. If the value is an ExpressionBuilder, returns its expression string. Otherwise, returns the value as-is.

Classes§

Chain

A collection of states to chain onto

ExpressionBuilder
Group

Make your workflow easier to understand

JsonExpression

Class for creating JSON-based n8n expressions with type safety. Allows combining static JSON data with ExpressionBuilder instances to create complex n8n expressions.

Placeholder

This "node" will be replaced by the actual node when the workflow is built.

ResolvedWorkflow
State
Workflow

Interfaces§

ConnectionOptions
Identifiable
WorkflowProps