FlowiseAI/Flowise · error · Error
Invalid chatflow ID: must be a valid UUID
Error message
Invalid chatflow ID: must be a valid UUID
What it means
Thrown in ChatflowTool_Tools.init when selectedChatflowId is falsy or fails isValidUUID. Identical shape to the agentflow equivalent (error 344): the id is a UUID used as a path segment in the /api/v1/chatflows/... call, so it is validated locally to avoid opaque remote 404s.
Source
Thrown at packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts:180
const _name = nodeData.inputs?.name as string
const description = nodeData.inputs?.description as string
const useQuestionFromChat = nodeData.inputs?.useQuestionFromChat as boolean
const returnDirect = nodeData.inputs?.returnDirect as boolean
const customInput = nodeData.inputs?.customInput 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
const startNewSession = nodeData.inputs?.startNewSession as boolean
const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)
// Validate selectedChatflowId is a valid UUID
if (!selectedChatflowId || !isValidUUID(selectedChatflowId)) {
throw new Error('Invalid chatflow 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 (selectedChatflowId === options.chatflowid) throw new Error('Cannot call the same chatflow!')
let headers = {}
if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }
let toolInput = ''
if (useQuestionFromChat) {
toolInput = inputView on GitHub (pinned to abe4a8601a)
Solutions
- Re-open the node and pick the target chatflow from the dropdown.
- Copy the UUID verbatim from the chatflow's URL.
- Ensure the listing endpoint the dropdown uses is reachable so choices populate.
Example fix
// before
const selectedChatflowId = nodeData.inputs?.selectedChatflowId as string
// after
const selectedChatflowId = nodeData.inputs?.selectedChatflowId as string
if (!selectedChatflowId || !isValidUUID(selectedChatflowId)) {
throw new Error('Invalid chatflow ID: must be a valid UUID')
} Defensive patterns
Strategy: validation
Validate before calling
import { isValidUUID } from '../../../src/validator'
function assertChatflowId(id: string | undefined): asserts id is string {
if (!id || !isValidUUID(id)) throw new Error('Invalid chatflow ID: must be a valid UUID')
} Type guard
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
function isUuid(v: unknown): v is string { return typeof v === 'string' && UUID_RE.test(v) } Prevention
- Always select the chatflow from the dropdown rather than typing the id.
- After deleting a chatflow, search flows for stale references.
- Preserve selectedChatflowId verbatim when exporting/importing flows.
When it happens
Trigger: The chatflow dropdown was not populated; flow JSON was hand-edited and the id removed; the user entered a slug or name instead of the UUID.
Common situations: Referencing a chatflow from another workspace; chatflow was deleted after the tool was configured; copy-paste truncated the UUID.
Related errors
- Invalid agentflow ID: must be a valid UUID
- Invalid base URL: must be a valid URL
- Model is required
- Invalid Flow State
- Tool not selected
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/66142491a97af5e4.
Report an issue: GitHub.