FlowiseAI/Flowise · error · Error

Team ID and Display Name are required to create a channel

Error message

Team ID and Display Name are required to create a channel

What it means

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.

Source

Thrown at packages/components/nodes/tools/MicrosoftTeams/core.ts:197

                    .enum(['standard', 'private', 'shared'])
                    .optional()
                    .default('standard')
                    .describe('Type of channel membership')
            }),
            baseUrl: BASE_URL,
            method: 'POST',
            headers: {}
        }

        super({ ...toolInput, accessToken: args.accessToken, defaultParams: args.defaultParams })
    }

    protected async _call(arg: any): Promise<string> {
        const params = { ...arg, ...this.defaultParams }
        const { teamId, displayName, description, membershipType = 'standard' } = params

        if (!teamId || !displayName) {
            throw new Error('Team ID and Display Name are required to create a channel')
        }

        try {
            const body = {
                displayName,
                membershipType,
                ...(description && { description })
            }

            const endpoint = `/teams/${teamId}/channels`
            const result = await this.makeTeamsRequest(endpoint, 'POST', body)

            return this.formatResponse(
                {
                    success: true,
                    channel: result,
                    message: `Channel "${displayName}" created successfully`
                },

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Always supply a non-empty teamId and displayName.
  2. Verify defaultParams does not contain teamId: undefined or displayName: undefined.
  3. Reorder the params spread so caller args override defaults.
  4. Catch the Error at the orchestration layer.

Example fix

// before
const params = { ...arg, ...this.defaultParams }

// after
const params = { ...this.defaultParams, ...arg }
Defensive patterns

Strategy: validation

Validate before calling

function validateCreateChannelInput(input: unknown) {
  const { teamId, displayName } = (input ?? {}) as any
  if (typeof teamId !== 'string' || !teamId.trim()) throw new Error('teamId required')
  if (typeof displayName !== 'string' || !displayName.trim()) throw new Error('displayName required')
}

Type guard

function isCreateChannelArgs(x: unknown): x is { teamId: string; displayName: string; description?: string; membershipType?: 'standard' | 'private' | 'shared' } {
  return typeof x === 'object' && x !== null &&
    typeof (x as any).teamId === 'string' && (x as any).teamId.trim() !== '' &&
    typeof (x as any).displayName === 'string' && (x as any).displayName.trim() !== ''
}

Try / catch

try {
  if (!isCreateChannelArgs(input)) return { error: 'teamId and displayName required' }
  return await createChannelTool.invoke(input)
} catch (e) {
  return { error: (e as Error).message }
}

Prevention

When it happens

Trigger: create_channel invoked without displayName; defaultParams.teamId set to undefined; agent passes only the optional fields (description, membershipType) and forgets the required ones.

Common situations: Agent prompted with a channel description but no name; defaultParams misconfigured; UI bug submitting the form before the name field is filled.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/1b7db30916619bb8. Report an issue: GitHub.