Opsmeter logo
Opsmeter
AI Cost & Inference Control

Integrations

Use Opsmeter with n8n: workspace status, budgets, and plan-limit branching

This guide shows how to wire n8n branching with workspace-status booleans and explicit 402 reason handling.

Integrationsn8nBudgets

Full guide: LLM budget alert policy: thresholds and escalation

Why workspace status endpoint matters in automations

n8n flows should not infer budget or plan state from multiple fields. A single status payload keeps routing logic deterministic.

Opsmeter exposes top-level booleans for direct branching: plan-limit pause, budget warning, and budget exceeded.

Branch logic for common states

  • If `telemetryPaused=true`, pause telemetry ingest and notify operators.
  • If `isBudgetExceeded=true`, trigger escalation and containment checks.
  • If `isBudgetWarning=true`, send early warning without stopping traffic.
  • Otherwise continue normal ingest and dashboards.

Plan limit reached vs budget exceeded

These states are not the same. Plan limit is request-capacity based and returns `402` with `reason=plan_limit_reached`.

Budget exceeded is USD-threshold based and may stay alert-only unless hard-stop policy is enabled.

  • Plan limit: telemetry paused, provider calls continue.
  • Budget exceeded: severity critical, policy-dependent enforcement.
  • Budget warning: warning-only signal for pre-incident action.

n8n workflow sequence

  1. HTTP Request -> GET /v1/diagnostics/workspace-status (X-API-Key)
  2. If node -> check telemetryPaused/isBudgetExceeded/isBudgetWarning
  3. Set node -> message payload for Slack/email/webhook
  4. Optional branch -> ingest 402 reason plan_limit_reached

Operational guardrails

  1. Set polling interval based on traffic criticality and alert tolerance.
  2. Use idempotent message keys to avoid repeated Slack spam.
  3. Keep workflow credentials scoped to one workspace API key.
  4. Document owner and escalation channel in workflow notes.

What to alert on

  • burn-rate acceleration vs baseline
  • endpointTag concentration changes in short windows
  • unexpected tenant concentration in Top Users
  • budget warning, spend-alert, and exceeded state transitions

Execution checklist

  1. Confirm alert is real: dataMode, environment, and time window.
  2. Identify dominant endpointTag and tenant/user contributors.
  3. Contain: cap output, lower max tokens, or throttle non-critical paths.
  4. Assign one incident owner and one communication channel.
  5. Update policy thresholds or ownership to prevent repeat incidents.

FAQ

Do I need SDK wrappers to use this n8n flow?

No. The flow works with direct HTTP calls to Opsmeter endpoints. SDK wrappers are optional convenience layers.

Will plan-limit pause stop my provider requests?

No. Plan-limit pause affects telemetry ingest only. Provider calls continue and your app traffic is not blocked by Opsmeter.

Related guides

Open n8n docsOpen limits and budgetsCompare alternatives

Evaluation resources

For security and procurement reviews, use our trust summary before final tool selection.

Open trust proof pack