windmill-labs/windmill · error · Error

${opts.kind} trigger ${triggerPath} not found

Error message

${opts.kind} trigger ${triggerPath} not found

What it means

Thrown by the trigger token-granting command (trigger path + email form) when the remote reports that the specified trigger does not exist under the given --kind. The command already validated that --kind was supplied and is one of the valid kinds, so this error reflects a mismatch between the given triggerPath/kind and actual remote state — typically a mistyped path or a trigger that was never deployed.

Source

Thrown at cli/src/commands/trigger/trigger.ts:698

    "Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)"
  )
  .action((async (opts: any, triggerPath: string, email: string) => {
    const workspace = await resolveWorkspace(opts);
    await requireLogin(opts);

    if (!opts.kind) {
      throw new Error("--kind is required. Valid kinds: " + TRIGGER_TYPES.join(", "));
    }
    if (!checkIfValidTrigger(opts.kind)) {
      throw new Error("Invalid trigger kind: " + opts.kind + ". Valid kinds: " + TRIGGER_TYPES.join(", "));
    }

    const { lookupUsernameByEmail } = await import("../../core/permissioned_as.ts");
    const cache = new Map<string, { username: string; email: string }>();
    const username = await lookupUsernameByEmail(workspace.workspaceId, email, cache);

    const remote = await getTrigger(opts.kind as TriggerType, workspace.workspaceId, triggerPath);
    if (!remote) throw new Error(`${opts.kind} trigger ${triggerPath} not found`);

    await updateTrigger(opts.kind, workspace.workspaceId, triggerPath, {
      ...(remote as any),
      permissioned_as: `u/${username}`,
      preserve_permissioned_as: true,
      path: triggerPath,
    } as any);
    log.info(colors.green(
      `Updated permissioned_as for ${opts.kind} trigger ${triggerPath} to ${email} (username: ${username})`
    ));
  }) as any);

export default command;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Verify --kind matches the actual trigger type and the path is correct.
  2. List triggers with `wmill trigger list --kind <kind>` to find the right path.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/trigger/trigger.ts:698 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/1a612872f0635ac9. Report an issue: GitHub.