FlowiseAI/Flowise · error · Error
Cannot call the same chatflow!
Error message
Cannot call the same chatflow!
What it means
Thrown when selectedChatflowId equals options.chatflowid — the chatflow-as-tool would invoke the very chatflow currently running. Same recursion guard as error 346 for the agentflow variant: prevents an infinite HTTP self-call loop.
Source
Thrown at packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts:191
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 = input
} else if (customInput) {
toolInput = customInput
}
let name = _name || 'chatflow_tool'
return new ChatflowTool({
name,
baseURL,
description,
returnDirect,View on GitHub (pinned to abe4a8601a)
Solutions
- Select a different chatflow as the tool target.
- If self-invocation is truly needed, call the internal logic directly instead of via HTTP.
- Filter the dropdown so the host flow's own id is not selectable.
Example fix
// before
if (selectedChatflowId === options.chatflowid) throw new Error('Cannot call the same chatflow!')
// after
if (selectedChatflowId === options.chatflowid) {
throw new Error(`Cannot call the same chatflow (id=${selectedChatflowId}). Pick a different target chatflow.`)
} Defensive patterns
Strategy: validation
Validate before calling
function assertNotSelfCallChatflow(targetId: string, hostId: string | undefined) {
if (targetId === hostId) {
throw new Error(`Cannot call the same chatflow (id=${targetId}). Pick a different target.`)
}
} Prevention
- Filter the dropdown so the host chatflow's own id is not selectable.
- When duplicating flows, re-target self-referential tool nodes immediately.
- Maintain a denylist of 'self' ids for orchestrator patterns.
When it happens
Trigger: A ChatflowTool node pointed at its own chatflow id; dynamic config that resolves to the host id; flow duplicated as a template without retargeting.
Common situations: Building an orchestrator chatflow that mistakenly lists itself; copy-paste of tool config across flows without updating the target.
Related errors
- Cannot call the same agentflow!
- Mem0: "Use Flowise Chat ID" is ON, but no runtime chat ID (o
- Key is required
- Invalid chatflow ID: must be a valid UUID
- Invalid base URL: must be a valid URL
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/6a18b8af55c153f4.
Report an issue: GitHub.