FlowiseAI/Flowise · error · Error
Invalid JSON in executeFlowOverrideConfig: ${parseError.mess
Error message
Invalid JSON in executeFlowOverrideConfig: ${parseError.message} What it means
ExecuteFlow.run treats executeFlowOverrideConfig as a JSON object string only when it starts with '{' and ends with '}'; it then calls parseJsonBody. If parsing fails, it throws 'Invalid JSON in executeFlowOverrideConfig: <SyntaxError message>'. The error is raised before the outbound prediction call, so no request is sent.
Source
Thrown at packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts:174
const startAgentflowNode = previousNodes.find((node) => node.name === 'startAgentflow')
const state = startAgentflowNode?.inputs?.startState as ICommonObject[]
return state.map((item) => ({ label: item.key, name: item.key }))
}
}
async run(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const baseURL = (nodeData.inputs?.executeFlowBaseURL as string) || (options.baseURL as string)
const selectedFlowId = nodeData.inputs?.executeFlowSelectedFlow as string
const flowInput = nodeData.inputs?.executeFlowInput as string
const returnResponseAs = nodeData.inputs?.executeFlowReturnResponseAs as string
const _executeFlowUpdateState = nodeData.inputs?.executeFlowUpdateState
let overrideConfig = nodeData.inputs?.executeFlowOverrideConfig
if (typeof overrideConfig === 'string' && overrideConfig.startsWith('{') && overrideConfig.endsWith('}')) {
try {
overrideConfig = parseJsonBody(overrideConfig)
} catch (parseError) {
throw new Error(`Invalid JSON in executeFlowOverrideConfig: ${parseError.message}`)
}
}
const state = options.agentflowRuntime?.state as ICommonObject
const runtimeChatHistory = (options.agentflowRuntime?.chatHistory as BaseMessageLike[]) ?? []
const isLastNode = options.isLastNode as boolean
const sseStreamer: IServerSideEventStreamer | undefined = options.sseStreamer
try {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)
if (!baseURL || !isValidURL(baseURL)) throw new Error('Invalid base URL: must be a valid URL')
if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!')
let headers: Record<string, string> = {
'Content-Type': 'application/json',View on GitHub (pinned to abe4a8601a)
Solutions
- Paste the override config through a JSON validator/linter and fix reported syntax errors.
- Use double quotes for all keys and string values, remove trailing commas.
- If using template variables, ensure they resolve to valid JSON-compatible values before the node runs.
- Prefer passing overrideConfig as a real object rather than a string when the caller supports it.
Example fix
// before
executeFlowOverrideConfig = "{ sessionId: 'abc', }" // unquoted key + trailing comma
// after
executeFlowOverrideConfig = '{"sessionId":"abc"}' Defensive patterns
Strategy: validation
Validate before calling
function parseOverrideConfig(raw) {
if (typeof raw === 'string' && raw.startsWith('{') && raw.endsWith('}')) {
try { return JSON.parse(raw) }
catch (e) { throw new Error('executeFlowOverrideConfig is not valid JSON: ' + e.message) }
}
return raw
}
overrideConfig = parseOverrideConfig(nodeData.inputs?.executeFlowOverrideConfig) Type guard
function isJsonObjectString(s) {
return typeof s === 'string' && s.trim().startsWith('{') && s.trim().endsWith('}')
} Try / catch
try { await executeFlow.run(nodeData, '', options) }
catch (e) {
if (/Invalid JSON in executeFlowOverrideConfig/.test(e.message)) {
// prompt user to fix the JSON in the node, then retry
} else throw e
} Prevention
- Provide a JSON editor widget with live validation for override config.
- Avoid hand-typing JSON; prefer a structured form that serializes to JSON.
- Resolve template variables to JSON-safe values before injection.
When it happens
Trigger: executeFlowOverrideConfig set to a string that looks like a JSON object (brace-wrapped) but has syntax errors: trailing comma, unquoted keys, single quotes, unescaped newlines, or a copy-paste with smart quotes.
Common situations: Operator hand-typing override config in the node; UI text field accepting malformed JSON; template variable left unresolved inside the JSON (e.g. {{var}} breaking syntax); mixed tab/space or BOM characters from a paste.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Invalid base URL: must be a valid URL
- Cannot call the same agentflow!
- Invalid JSON in the Additional Configuration:
- chatflowId must be a valid array
- Model is required
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/246fbb2bec9ecad4.
Report an issue: GitHub.