FlowiseAI/Flowise · error · Error
Chat/Channel ID and Message ID are required
Error message
Chat/Channel ID and Message ID are required
What it means
Thrown by the GetMessage Teams tool's _call when chatChannelId or messageId is falsy. The tool fetches a single message from either a channel (GET /teams/{teamId}/channels/{chatChannelId}/messages/{messageId}) when teamId is present, or a chat (GET /chats/{chatChannelId}/messages/{messageId}). Both the scope ID and the message ID are required to build the path.
Source
Thrown at packages/components/nodes/tools/MicrosoftTeams/core.ts:1090
schema: z.object({
chatChannelId: z.string().describe('ID of the chat or channel'),
teamId: z.string().optional().describe('ID of the team (required for channel messages)'),
messageId: z.string().describe('ID of the message to retrieve')
}),
baseUrl: BASE_URL,
method: 'GET',
headers: {}
}
super({ ...toolInput, accessToken: args.accessToken, defaultParams: args.defaultParams })
}
protected async _call(arg: any): Promise<string> {
const params = { ...arg, ...this.defaultParams }
const { chatChannelId, teamId, messageId } = params
if (!chatChannelId || !messageId) {
throw new Error('Chat/Channel ID and Message ID are required')
}
try {
let endpoint: string
if (teamId) {
// Channel message
endpoint = `/teams/${teamId}/channels/${chatChannelId}/messages/${messageId}`
} else {
// Chat message
endpoint = `/chats/${chatChannelId}/messages/${messageId}`
}
const result = await this.makeTeamsRequest(endpoint)
return this.formatResponse(
{
success: true,
message: result,View on GitHub (pinned to abe4a8601a)
Solutions
- Pass both chatChannelId and messageId as non-empty strings.
- Capture messageId from a prior list/send message call and thread it in.
- For channel messages, also pass teamId.
- Expose both fields as required in the tool schema.
Example fix
// before
await getTool._call({ chatChannelId: '19:...' })
// after
await getTool._call({ chatChannelId: '19:...', messageId: '1701234567890' }) Defensive patterns
Strategy: validation
Validate before calling
function hasScopeAndMessage(params: any): boolean {
return Boolean(params && params.chatChannelId && params.messageId)
} Type guard
function isGetMessageArgs(a: unknown): a is { chatChannelId: string; messageId: string; teamId?: string } {
return typeof a === 'object' && a !== null
&& typeof (a as any).chatChannelId === 'string' && (a as any).chatChannelId.length > 0
&& typeof (a as any).messageId === 'string' && (a as any).messageId.length > 0
} Try / catch
try {
await getTool.call(arg)
} catch (e) {
if (e instanceof Error && e.message === 'Chat/Channel ID and Message ID are required') {
// request both IDs
} else throw e
} Prevention
- Thread messageId from a prior list/send step.
- Expose chatChannelId and messageId as required in the agent schema.
When it happens
Trigger: Calling GetMessage without chatChannelId or messageId; either value empty/null; defaultParams not filling the gap.
Common situations: Agent fetches a message but only knows the chat/channel, not the message ID; messageId from a prior step was lost; node wiring leaves an input unbound.
Related errors
- Both Chat ID and User ID are required
- Both Chat ID and Message ID are required
- Chat or Channel ID is required
- Chat/Channel ID and Message Body are required
- Chat/Channel ID, Message ID, and Reply Body are required
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/7377f80f7d10e258.
Report an issue: GitHub.