FlowiseAI/Flowise · error · Error
API Key Required
Error message
API Key Required
What it means
Thrown in Composio_Tools.init when composioApiKey is falsy after reading the credential. Before throwing, the code clears appName, connectedAccountId and actions in nodeData.inputs so the UI does not show stale tool metadata. Composio's LangchainToolSet needs the API key to even list apps/actions, so an empty key is a hard stop.
Source
Thrown at packages/components/nodes/tools/Composio/Composio.ts:240
name: c.id,
description: `Created: ${new Date(c.createdAt).toLocaleDateString()}`
}))
}
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
if (!nodeData.inputs) nodeData.inputs = {}
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const composioApiKey = getCredentialParam('composioApi', credentialData, nodeData)
if (!composioApiKey) {
nodeData.inputs = {
appName: undefined,
connectedAccountId: '',
actions: []
}
throw new Error('API Key Required')
}
const _actions = nodeData.inputs?.actions
let actions = []
if (_actions) {
try {
actions = typeof _actions === 'string' ? JSON.parse(_actions) : _actions
} catch (error) {
console.error('Error parsing actions:', error)
}
}
const toolset = new LangchainToolSet({ apiKey: composioApiKey })
const appName = nodeData.inputs?.appName as string
if (!appName) {
throw new Error('App name is required. Please select an app.')
}View on GitHub (pinned to abe4a8601a)
Solutions
- Create a Composio API key at app.composio.dev and add it to a credential of type Composio with field name 'composioApi'.
- Attach that credential to the node.
- Confirm nodeData.credential references the correct credential id and that getCredentialData resolves it.
Example fix
// before
if (!composioApiKey) {
nodeData.inputs = { appName: undefined, connectedAccountId: '', actions: [] }
throw new Error('API Key Required')
}
// after: name the missing field explicitly
if (!composioApiKey) {
nodeData.inputs = { appName: undefined, connectedAccountId: '', actions: [] }
throw new Error('Composio API Key Required: add a Composio credential with field "composioApi" and attach it to this node.')
} Defensive patterns
Strategy: validation
Validate before calling
function assertComposioKey(key: string | undefined): asserts key is string {
if (!key || !key.trim()) {
throw new Error('Composio API Key Required: add a Composio credential with field "composioApi" and attach it.')
}
} Type guard
function hasComposioKey(cred: unknown): cred is { composioApi: string } {
return typeof cred === 'object' && cred !== null && typeof (cred as any).composioApi === 'string' && (cred as any).composioApi.length > 0
} Prevention
- Create the Composio API key at app.composio.dev before configuring the node.
- Store it in a dedicated credential of type Composio (field name 'composioApi').
- Always attach the credential to the node and verify the credential id resolves.
When it happens
Trigger: No credential attached to the node; credential attached but the 'composioApi' field is empty; credential lookup failed (wrong id, deleted credential).
Common situations: First-time setup before creating a Composio API key; credential was rotated and the stored value removed; flow imported without its credential.
Related errors
- Firecrawl API key not set. You can set it as FIRECRAWL_API_K
- OpenAI ApiKey not found
- HuggingFace API key is required. Please configure it in the
- Perplexity API Key missing from credential
- Please set an API key for HuggingFace Hub in the environment
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/35b1cf26daa68038.
Report an issue: GitHub.