Class Group<LiteralId, C_CC, C_Ids>

Source
Expand description

Make your workflow easier to understand

Constructors§

Source§

new Group<
    LiteralId extends string,
    C_CC extends ChainContext = {},
    C_Ids extends string[] = [],
>(
    workflow: Workflow,
    id: LiteralId,
    _props: GroupProps,
    chain: Chain<C_CC, C_Ids>,
): Group<LiteralId, C_CC, C_Ids>

Properties§

Source§

public readonly _props: GroupProps

Source§

public readonly chain: Chain<C_CC, C_Ids>

Source§

public readonly id: LiteralId

Unique identifier for this state

Source§

public readonly label: undefined | string

The node label

Source§

public position?: NodePosition

Position of the node in the n8n workflow editor canvas When undefined, the node will be placed automatically

default
undefined
Source§

props: StickyNoteProps

Source§

public size: NodeSize = DEFAULT_NODE_SIZE

Size of the node in the n8n workflow editor

default
DEFAULT_NODE_SIZE

Methods§

Source§

canTakeInput(
    _fromState: IChainable,
    _withConnectionOptions?: ConnectionOptions,
): boolean

Determines if this state can accept input from another state

Source§

clone<Id extends string>(
    id: Id,
    props?: NodeProps,
    cloneOptions?: { preserveChainConnections?: boolean },
): Omit<Group<LiteralId, C_CC, C_Ids>, "id"> & Node<
    Id,
    {},
>

Creates a deep copy of this node with a new ID and optional property overrides

Source§

getCredentials(): | undefined
| (undefined | Credentials<any>)[]

Returns the credentials required by this node

Source§

getLabel(): string

Gets the display label for this node

Source§

getParameters(): Promise<
    {
        color: undefined
        | 1
        | 3
        | 2
        | 4
        | 5
        | 6
        | 7;
        content?: string;
        height: undefined | number;
        width: undefined | number;
    },
>

Retrieves the parameters configured for this node

Source§

getPath(): string

Gets the full path of this node including its parent workflow

Source§

listOutgoing(): IChainable<string, any>[]

Returns all states that are connected as next states from this state

Source§

toNode(): Promise<
    {
        alwaysOutputData: undefined
        | boolean;
        credentials:
            | undefined
            | { [type: string]: { id: string } };
        disabled: undefined | boolean;
        executeOnce: undefined | boolean;
        id: LiteralId;
        maxTries: undefined | number;
        name: string;
        notes: undefined | string;
        notesInFlow: undefined | boolean;
        onError:
            | undefined
            | "continueRegularOutput"
            | "continueErrorOutput";
        parameters: undefined
        | {};
        position: undefined | NodePosition;
        retryOnFail: undefined | boolean;
        type: string;
        typeVersion: number;
    },
>