{"record":{"id":"1b7db30916619bb8","repo":"FlowiseAI/Flowise","slug":"team-id-and-display-name-are-required-to-create-a","errorCode":null,"errorMessage":"Team ID and Display Name are required to create a channel","messagePattern":"Team ID and Display Name are required to create a channel","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/tools/MicrosoftTeams/core.ts","lineNumber":197,"sourceCode":"                    .enum(['standard', 'private', 'shared'])\n                    .optional()\n                    .default('standard')\n                    .describe('Type of channel membership')\n            }),\n            baseUrl: BASE_URL,\n            method: 'POST',\n            headers: {}\n        }\n\n        super({ ...toolInput, accessToken: args.accessToken, defaultParams: args.defaultParams })\n    }\n\n    protected async _call(arg: any): Promise<string> {\n        const params = { ...arg, ...this.defaultParams }\n        const { teamId, displayName, description, membershipType = 'standard' } = params\n\n        if (!teamId || !displayName) {\n            throw new Error('Team ID and Display Name are required to create a channel')\n        }\n\n        try {\n            const body = {\n                displayName,\n                membershipType,\n                ...(description && { description })\n            }\n\n            const endpoint = `/teams/${teamId}/channels`\n            const result = await this.makeTeamsRequest(endpoint, 'POST', body)\n\n            return this.formatResponse(\n                {\n                    success: true,\n                    channel: result,\n                    message: `Channel \"${displayName}\" created successfully`\n                },","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/tools/MicrosoftTeams/core.ts#L179-L215","documentation":"Thrown synchronously by CreateChannelTool._call when teamId or displayName is missing after the params merge. Above the try block at core.ts:196, so it propagates as a raw Error. The zod schema (core.ts:174) requires both teamId and displayName; membershipType defaults to 'standard'. Unreachable under valid zod-validated input unless defaultParams nullifies a required field.","triggerScenarios":"create_channel invoked without displayName; defaultParams.teamId set to undefined; agent passes only the optional fields (description, membershipType) and forgets the required ones.","commonSituations":"Agent prompted with a channel description but no name; defaultParams misconfigured; UI bug submitting the form before the name field is filled.","solutions":["Always supply a non-empty teamId and displayName.","Verify defaultParams does not contain teamId: undefined or displayName: undefined.","Reorder the params spread so caller args override defaults.","Catch the Error at the orchestration layer."],"exampleFix":"// before\nconst params = { ...arg, ...this.defaultParams }\n\n// after\nconst params = { ...this.defaultParams, ...arg }","handlingStrategy":"validation","validationCode":"function validateCreateChannelInput(input: unknown) {\n  const { teamId, displayName } = (input ?? {}) as any\n  if (typeof teamId !== 'string' || !teamId.trim()) throw new Error('teamId required')\n  if (typeof displayName !== 'string' || !displayName.trim()) throw new Error('displayName required')\n}","typeGuard":"function isCreateChannelArgs(x: unknown): x is { teamId: string; displayName: string; description?: string; membershipType?: 'standard' | 'private' | 'shared' } {\n  return typeof x === 'object' && x !== null &&\n    typeof (x as any).teamId === 'string' && (x as any).teamId.trim() !== '' &&\n    typeof (x as any).displayName === 'string' && (x as any).displayName.trim() !== ''\n}","tryCatchPattern":"try {\n  if (!isCreateChannelArgs(input)) return { error: 'teamId and displayName required' }\n  return await createChannelTool.invoke(input)\n} catch (e) {\n  return { error: (e as Error).message }\n}","preventionTips":["Display names must be unique within a team — check with list_channels first.","Private/shared channels require additional Graph permissions and tenant policy enablement.","Audit defaultParams; ensure agent prompts surface displayName as required."],"tags":["validation","microsoft-teams","required-field","channel","create"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}