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: boolean | undefined;
            credentials:
                | { [type: string]: { id: string } }
                | undefined;
            disabled: boolean | undefined;
            executeOnce: boolean | undefined;
            id: any;
            maxTries: number | undefined;
            name: string;
            notes: string | undefined;
            notesInFlow: boolean | undefined;
            onError:
                | "continueRegularOutput"
                | "continueErrorOutput"
                | undefined;
            parameters: {}
            | undefined;
            position: NodePosition | undefined;
            retryOnFail: boolean | undefined;
            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(): string | undefined

Source§

getInputSchema(): Input | null

Source§

getInputType(): Input["infer"]

Should only be used with typeof Returns null.

Source§

getInternalId(): string

Source§

getN8nWorkflowId(): string | undefined

Source§

getName(): string

Source§

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

Source§

getOutputSchema(): Output | null

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