Budibase/budibase · error · Error

Unable to collect response

Error message

Unable to collect response

What it means

Thrown by `trigger` when the internal automation run dispatcher returns a response without a `steps` array, so the COLLECT step's outputs cannot be extracted. This means the run did not return step-level results (e.g. the run errored, timed out, or the dispatcher shape changed) even though `getResponses: true` was requested.

Source

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

  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")
    }

    let collectedValue = response.steps.find(
      step => step.stepId === AutomationActionStepId.COLLECT
    )
    return collectedValue?.outputs
  } else {
    const appId = context.getWorkspaceId()
    await triggers.externalTrigger(automation, {
      fields,
      appId,
    })

    return {
      message: `Automation ${automation._id} has been triggered.`,
      automation,
    }
  }

View on GitHub (pinned to a81a902e9a)

Solutions

  1. Check server logs for the underlying automation run failure preceding this error
  2. Increase the timeout argument to trigger (seconds) so long COLLECT steps can finish
  3. Verify Redis and the automation queue infrastructure are healthy
  4. Retry the trigger once infrastructure issues are resolved; investigate the COLLECT step's query target separately

Example fix

// before
const res = await trigger(automationId, { timeout: 2 })
// after
const res = await trigger(automationId, { timeout: 60 }) // allow long COLLECT queries
Defensive patterns

Strategy: try-catch

Validate before calling

const timeout = 60 // generous default for automations with COLLECT steps

Type guard

function hasSteps(r: object): r is { steps: { stepId: string; outputs: unknown }[] } {
  return "steps" in r && Array.isArray((r as any).steps)
}

Try / catch

try {
  const res = await sdk.automations.execution.trigger(id, { timeout })
} catch (err: any) {
  if (err.message === "Unable to collect response") {
    // check run logs and retry after fixing infrastructure
  } else {
    throw err
  }
}

Prevention

When it happens

Trigger: Manual trigger of an automation containing a COLLECT (query) step where the queued run fails before producing steps, the thread times out (AUTOMATION_THREAD_TIMEOUT exceeded), or the dispatcher returns an error object instead of steps.

Common situations: The automation's underlying queries fail or hang in the environment; Redis/queue infrastructure is unhealthy so run responses are lost; the timeout (seconds) passed to trigger is too small for long-running COLLECT queries.

Related errors


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