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.
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
- HTTP Request -> GET /v1/diagnostics/workspace-status (X-API-Key)
- If node -> check telemetryPaused/isBudgetExceeded/isBudgetWarning
- Set node -> message payload for Slack/email/webhook
- Optional branch -> ingest 402 reason plan_limit_reached
Operational guardrails
- Set polling interval based on traffic criticality and alert tolerance.
- Use idempotent message keys to avoid repeated Slack spam.
- Keep workflow credentials scoped to one workspace API key.
- 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
- Confirm alert is real: dataMode, environment, and time window.
- Identify dominant endpointTag and tenant/user contributors.
- Contain: cap output, lower max tokens, or throttle non-critical paths.
- Assign one incident owner and one communication channel.
- 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
Evaluation resources
For security and procurement reviews, use our trust summary before final tool selection.