Budibase/budibase · error · Error

Cannot manually trigger automation '${automation.name}'. Onl

Error message

Cannot manually trigger automation '${automation.name}'. Only automations with APP trigger type can be manually triggered. This automation has trigger type: ${triggerType}

What it means

Thrown by `trigger` when the automation exists but its definition.trigger.stepId is not "APP". Only automations whose entry point is the Row/APP trigger can be triggered manually via this API; scheduled (CRON), webhook, or other trigger types are rejected with this message naming the actual trigger type found.

Source

Thrown at packages/server/src/sdk/workspace/automations/execution.ts:23

import * as triggers from "../../../automations/triggers"
import env from "../../../environment"

export async function trigger(
  automationId: string,
  fields: Record<string, any> = {},
  timeout?: number
) {
  const db = context.getWorkspaceDB()
  const automation = await db.get<Automation>(automationId)

  if (!automation) {
    throw new Error(`Automation with ID ${automationId} not found`)
  }

  // Check if automation has APP trigger (required for manual triggering)
  const triggerType = automation.definition?.trigger?.stepId
  if (triggerType !== "APP") {
    throw new Error(
      `Cannot manually trigger automation '${automation.name}'. Only automations with APP trigger type can be manually triggered. This automation has trigger type: ${triggerType}`
    )
  }

  let hasCollectStep = sdk.automations.utils.checkForCollectStep(automation)
  if (hasCollectStep && (await features.isSyncAutomationsEnabled())) {
    const response = await triggers.externalTrigger(
      automation,
      {
        fields,
        timeout: timeout ? timeout * 1000 : env.AUTOMATION_THREAD_TIMEOUT,
      },
      { getResponses: true }
    )

    if (!("steps" in response)) {
      throw new Error("Unable to collect response")
    }

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Open the automation in the builder and confirm its trigger is the "Row Action / APP" trigger type
  2. For CRON automations, test by adjusting the schedule or temporarily switching the trigger to APP in a dev environment
  3. For webhook automations, call the automation's dedicated webhook URL instead of the manual trigger endpoint
  4. Duplicate the automation, set its trigger to APP, and trigger the duplicate if a manual run is required

Example fix

// before
await sdk.automations.execution.trigger(cronAutomationId) // throws
// after
const automation = await db.get<Automation>(cronAutomationId)
if (automation.definition?.trigger?.stepId !== "APP") {
  // run via schedule or create an APP-triggered copy
} else {
  await sdk.automations.execution.trigger(cronAutomationId)
}
Defensive patterns

Strategy: validation

Validate before calling

const a = await db.get<Automation>(id)
if (a.definition?.trigger?.stepId !== "APP") {
  throw new Error("Manual trigger requires an APP trigger type")
}

Type guard

function isAppTriggered(a: Automation): boolean {
  return a.definition?.trigger?.stepId === "APP"
}

Try / catch

try {
  await sdk.automations.execution.trigger(id)
} catch (err: any) {
  if (err.message.includes("APP trigger type")) {
    // use webhook URL or schedule instead
  } else {
    throw err
  }
}

Prevention

When it happens

Trigger: Manually triggering (POST to the manual trigger endpoint or sdk.automations.execution.trigger) an automation whose trigger is CRON (schedule), WEBHOOK, or any non-APP stepId.

Common situations: Developers assume any automation can be run on demand from the API; a cron-driven automation is being tested via the manual endpoint; a webhook-triggered automation is invoked through the manual trigger route instead of its webhook URL.

Related errors


AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29). Data as JSON: /api/errors/ac5471529d5056b8. Report an issue: GitHub.