Class Workflow<Input, Output>

Source

Constructors§

Source§

new Workflow<
    Input extends Type<unknown, {}> = any,
    Output extends Type<unknown, {}> = any,
>(
    app: App,
    id: string,
    props: WorkflowProps<Input, Output>,
): Workflow<Input, Output>

Properties§

Source§

public readonly id: string

Source§

public readonly props: WorkflowProps<Input, Output>

Methods§

Source§

addToDynamicalyAddedNodes(node: Node<any, any>): void

Source§

build(): Promise<
    {
        active: boolean;
        connections: Record<
            string,
            { [key: string]: Connection[][] },
        >;
        id: string;
        name: string;
        nodes: {
            alwaysOutputData: undefined | boolean;
            credentials:
                | undefined
                | { [type: string]: { id: string } };
            disabled: undefined | boolean;
            executeOnce: undefined | boolean;
            id: any;
            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;
        }[];
        settings: {
            callerPolicy?: "workflowsFromSameOwner";
            executionOrder?: "v1"
            | "v2";
            executionTimeout?: number;
            saveDataErrorExecution?: "all" | "none";
            saveDataSuccessExecution?: "all" | "none";
            saveExecutionProgress?: boolean;
            saveManualExecutions?: boolean;
            timezone?: string;
        };
        tags: Tag[];
    },
>

Source§

getDefinition(): (Node<any, any> | Chain<any, any, false>)[]

Source§

getHashId(): undefined | string

Source§

getInputSchema(): null | Input

Source§

getInputType(): Input["infer"]

Should only be used with typeof Returns null.

Source§

getInternalId(): string

Source§

getN8nWorkflowId(): undefined | string

Source§

getName(): string

Source§

getNodes(): Node<string, never>[]

Source§

getOutputSchema(): null | Output

Source§

getOutputType(): Output["infer"]

Should only be used with typeof Returns null.

Source§

import<
    Input extends Type<unknown, {}>,
    Output extends Type<unknown, {}>,
>(
    app: App,
    props: ImportedWorkflowProps<Input, Output>,
): ImportedWorkflow<Input, Output>

Source§

isResolved(): boolean

Source§

setHashId(id: string): void

Source§

setN8nWorkflowId(id: string): void

Source§

toWorkflowId(): string