FlowiseAI/Flowise · error · Error

Execute Flow must have a predecessor!

Error message

Execute Flow must have a predecessor!

What it means

Same predecessor requirement as the other sequential nodes, enforced for Execute Flow at init: inputs.sequentialNode must be a non-empty array so the node joins the graph with at least one incoming edge.

Source

Thrown at packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts:168

    async init(nodeData: INodeData, input: string, options: ICommonObject): Promise<any> {
        const selectedFlowId = nodeData.inputs?.selectedFlow as string
        const _seqExecuteFlowName = nodeData.inputs?.seqExecuteFlowName as string
        if (!_seqExecuteFlowName) throw new Error('Execute Flow node name is required!')
        const seqExecuteFlowName = _seqExecuteFlowName.toLowerCase().replace(/\s/g, '_').trim()
        const startNewSession = nodeData.inputs?.startNewSession as boolean
        const appDataSource = options.appDataSource as DataSource
        const databaseEntities = options.databaseEntities as IDatabaseEntity
        const sequentialNodes = nodeData.inputs?.sequentialNode as ISeqAgentNode[]
        const seqExecuteFlowInput = nodeData.inputs?.seqExecuteFlowInput as string
        const overrideConfig =
            typeof nodeData.inputs?.overrideConfig === 'string' &&
            nodeData.inputs.overrideConfig.startsWith('{') &&
            nodeData.inputs.overrideConfig.endsWith('}')
                ? JSON.parse(nodeData.inputs.overrideConfig)
                : nodeData.inputs?.overrideConfig

        if (!sequentialNodes || !sequentialNodes.length) throw new Error('Execute Flow must have a predecessor!')

        const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)
        const returnValueAs = nodeData.inputs?.returnValueAs as string

        // Validate selectedFlowId is a valid UUID
        if (!selectedFlowId || !isValidUUID(selectedFlowId)) {
            throw new Error('Invalid flow ID: must be a valid UUID')
        }

        // Validate baseURL is a valid URL
        if (!baseURL || !isValidURL(baseURL)) {
            throw new Error('Invalid base URL: must be a valid URL')
        }

        const credentialData = await getCredentialData(nodeData.credential ?? '', options)
        const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)

        if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!')

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Draw a connection from an upstream sequential node into the Execute Flow's 'Sequential Node' input.
  2. Save the chatflow to persist the edge.
Defensive patterns

Strategy: validation

Validate before calling

const seq = nodeData.inputs?.sequentialNode
if (!Array.isArray(seq) || seq.length === 0) throw new Error('Execute Flow must have a predecessor!')

Type guard

const hasPredecessor = (n: INodeData): boolean => Array.isArray(n.inputs?.sequentialNode) && (n.inputs!.sequentialNode as any[]).length > 0

Prevention

When it happens

Trigger: Execute Flow node placed without a wire from an upstream sequential node; sequentialNode missing/empty in a saved chatflow.

Common situations: Forgotten wiring during flow construction; copy/import losing edges.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/3ba7a1d927e0710d. Report an issue: GitHub.