{"record":{"id":"66142491a97af5e4","repo":"FlowiseAI/Flowise","slug":"invalid-chatflow-id-must-be-a-valid-uuid","errorCode":null,"errorMessage":"Invalid chatflow ID: must be a valid UUID","messagePattern":"Invalid chatflow ID: must be a valid UUID","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts","lineNumber":180,"sourceCode":"        const _name = nodeData.inputs?.name as string\n        const description = nodeData.inputs?.description as string\n        const useQuestionFromChat = nodeData.inputs?.useQuestionFromChat as boolean\n        const returnDirect = nodeData.inputs?.returnDirect as boolean\n        const customInput = nodeData.inputs?.customInput as string\n        const overrideConfig =\n            typeof nodeData.inputs?.overrideConfig === 'string' &&\n            nodeData.inputs.overrideConfig.startsWith('{') &&\n            nodeData.inputs.overrideConfig.endsWith('}')\n                ? JSON.parse(nodeData.inputs.overrideConfig)\n                : nodeData.inputs?.overrideConfig\n\n        const startNewSession = nodeData.inputs?.startNewSession as boolean\n\n        const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)\n\n        // Validate selectedChatflowId is a valid UUID\n        if (!selectedChatflowId || !isValidUUID(selectedChatflowId)) {\n            throw new Error('Invalid chatflow ID: must be a valid UUID')\n        }\n\n        // Validate baseURL is a valid URL\n        if (!baseURL || !isValidURL(baseURL)) {\n            throw new Error('Invalid base URL: must be a valid URL')\n        }\n\n        const credentialData = await getCredentialData(nodeData.credential ?? '', options)\n        const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)\n\n        if (selectedChatflowId === options.chatflowid) throw new Error('Cannot call the same chatflow!')\n\n        let headers = {}\n        if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }\n\n        let toolInput = ''\n        if (useQuestionFromChat) {\n            toolInput = input","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts#L162-L198","documentation":"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.","triggerScenarios":"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.","commonSituations":"Referencing a chatflow from another workspace; chatflow was deleted after the tool was configured; copy-paste truncated the UUID.","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."],"exampleFix":"// before\nconst selectedChatflowId = nodeData.inputs?.selectedChatflowId as string\n// after\nconst selectedChatflowId = nodeData.inputs?.selectedChatflowId as string\nif (!selectedChatflowId || !isValidUUID(selectedChatflowId)) {\n  throw new Error('Invalid chatflow ID: must be a valid UUID')\n}","handlingStrategy":"validation","validationCode":"import { isValidUUID } from '../../../src/validator'\nfunction assertChatflowId(id: string | undefined): asserts id is string {\n  if (!id || !isValidUUID(id)) throw new Error('Invalid chatflow ID: must be a valid UUID')\n}","typeGuard":"const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\nfunction isUuid(v: unknown): v is string { return typeof v === 'string' && UUID_RE.test(v) }","tryCatchPattern":null,"preventionTips":["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."],"tags":["validation","uuid","config","chatflow"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}