agent command centerTelegram approval workflowPagerDutyhuman-in-the-loopworkflow automationagent ops

The Agent Command Center: Telegram Approvals + PagerDuty Escalations for Production Workflows

nNode Team11 min read

If you’re running tool-connected agents against real systems (Gmail, Notion, Google Sheets/Drive, Wix, CRMs, payments), you eventually hit the same wall:

  • A workflow can run unattended… until it shouldn’t.
  • “Notify me about everything” becomes noise.
  • “Only wake me up for emergencies” requires a definition of emergency.

An agent command center is the missing control plane: a mobile-first channel where your workflows route decisions (approval gates) and exceptions (true incidents) to humans—without forcing you to babysit dashboards.

This playbook shows a practical pattern:

  1. Telegram approvals for high-risk actions (human-in-the-loop for AI agents)
  2. PagerDuty escalations for failures that break your workflow’s output contract
  3. Run receipts that make “silent failures” detectable and actionable

Along the way, we’ll share templates (copy/paste), an escalation matrix, and implementation examples.

nNode angle: nNode is built for this exact reality—start in agentic mode, lock in a reliable workflow, keep everything safe with sandboxing + approvals, and only escalate when it matters.


What an “agent command center” is (and isn’t)

It is:

  • A decision-and-exception channel
  • A lightweight control loop for production automations
  • A way to turn “agents run while I sleep” into something you can actually trust

It’s not:

  • A dashboard you promise you’ll check daily
  • A stream of raw logs
  • A fancy chat bot that pings you for every minor uncertainty

A good command center reduces your cognitive load. It should help you answer:

  • Should I allow this action?
  • Did the workflow produce the outputs it promised?
  • If it broke, is this a “fix tomorrow” issue—or a “wake someone up” incident?

The 3-channel model: Log / Notify / Wake

Before you wire up Telegram and PagerDuty, define your routing model. A simple, durable framework is:

1) Log (run receipts)

Everything gets a receipt—even “successful” runs.

A run receipt is structured output that answers:

  • What was the workflow trying to do?
  • What did it actually do?
  • What artifacts were created/updated?
  • What validations passed/failed?

Where to log:

  • Notion database (runs table)
  • Google Sheet (append-only)
  • A database table in your own stack

2) Notify (FYIs)

Low-risk summaries that don’t require action.

Examples:

  • “Weekly lead list: 10 leads added, 3 duplicates skipped.”
  • “Inbox triage completed: 0 high-priority threads.”

3) Wake (PagerDuty)

Only for incidents:

  • The workflow violated an output contract
  • A high-risk action was attempted without a valid approval
  • A repeated failure crossed a threshold (e.g., 3 consecutive runs)

This is where PagerDuty escalation for workflows shines—because the job isn’t “send a message,” it’s “make sure someone actually responds.”


Approval-first design: what qualifies as an approval gate

Approval gates aren’t about distrust; they’re about containing externalities.

Use a Telegram approval workflow whenever the agent might:

  • Send outbound communication (email, DMs, SMS)
  • Publish content (Wix/WordPress, social posts)
  • Edit or delete records (CRM updates, Notion pages, Drive files)
  • Spend money (ads, purchases, API credits)
  • Trigger irreversible operations (canceling subscriptions, refunds)

A practical standard:

If the action would be hard to undo and could embarrass you, cost money, or break customer trust—gate it.

nNode’s approach is to make this easy operationally:

  • Build safely in sandbox mode (drafts, redirected emails, no live publishing)
  • Promote to production gradually (approval required → limited autonomy → full autonomy)

Telegram approval messages that actually work (template + rules)

Most approval systems fail because the approver doesn’t have enough context.

A good approval request must be:

  • Unambiguous (what action will happen)
  • Previewable (what exactly will be sent/published/changed)
  • Bounded (constraints + scope)
  • Traceable (which workflow + run produced this)
  • Time-aware (what happens if nobody responds)

The approval message template (copy/paste)

Below is a template you can reuse across workflows.

✅ Approval needed: {{action_summary}}

Workflow: {{workflow_name}} ({{workflow_id}})
Run: {{run_id}}
Environment: {{env}}  (sandbox|prod)

Target:
- System: {{system}} (Gmail|Wix|Notion|Sheets|...)
- Object: {{object_id_or_url}}

Preview:
{{preview_block}}

Why the agent thinks this is correct:
- {{reason_1}}
- {{reason_2}}

Safety constraints (will be enforced):
- Max recipients: {{max_recipients}}
- Allowed domain(s): {{allowed_domains}}
- No attachments: {{no_attachments_true_false}}
- No deletes: {{no_deletes_true_false}}

If you approve:
- The workflow will {{approved_behavior}}

If you reject:
- The workflow will {{rejected_behavior}}

Timeout:
- If no response in {{timeout_minutes}} minutes: {{timeout_behavior}}

Button design: keep it binary

Telegram should offer two buttons in most cases:

  • Approve
  • Reject

If you add a third button, it should be an operational safety valve:

  • “Approve once” vs “Approve always for this domain” (only after you’ve proven the flow)
  • “Escalate to on-call” if the approver isn’t the right person

Approval timeouts: default to safe behavior

When approval is required and no human responds, the safest defaults are:

  • “Reject and log”
  • “Defer and retry later”

Avoid “approve on timeout” unless the action is truly low-risk.


PagerDuty escalation design for agent workflows

If Telegram is for decisions, PagerDuty is for incidents.

The biggest mistake teams make is paging on any error string. What you want is paging on broken contracts.

A simple severity taxonomy

Use a consistent severity scheme across workflows:

  • info — normal completion receipt
  • warning — degraded run, but output contract still satisfied (e.g., fewer items processed)
  • error — output contract failed; needs attention soon
  • critical — high-risk externality or repeated failure; page immediately

Dedupe keys (anti-noise)

PagerDuty supports deduplication. Without it, one stuck workflow will page you 30 times.

A solid dedup key pattern:

{{workflow_id}}::{{failure_class}}::{{time_bucket}}

Where:

  • failure_class is a stable label (e.g., OUTPUT_CONTRACT_MISSING, TOOL_AUTH_FAILED, APPROVAL_TIMEOUT)
  • time_bucket can be hourly or per-run depending on your tolerance

Cooldowns, grouping, and suppression windows

Noise control is part of “production agent ops.” Define:

  • Cooldown: don’t page more than once per N minutes for the same failure class
  • Grouping: multiple runs can roll up into a single incident
  • Suppression windows: silence non-critical alerts during known maintenance

Preventing “it failed silently”: output contracts → alerts

A real failure mode in agent workflows is:

  • The run claims success
  • But no artifact was produced (no draft, no sheet update, no email drafted)

This is exactly why you want output contracts.

Define an output contract per workflow

Examples:

Lead gen workflow (weekly):

  • Add 10 new leads (or explicitly report “insufficient supply”)
  • Append rows to Google Sheet
  • No duplicates

Content workflow (Wix):

  • Create a draft post
  • Validate Wix rich text format
  • Include title + slug + excerpt

Inbox triage workflow:

  • Produce a categorized list of threads
  • Log links to the threads
  • If “urgent” exists: notify; if “cannot access Gmail”: page

Validate the contract before claiming success

In nNode terms, this is where workflows beat open-ended agent runs:

  • You can standardize the “done” criteria.
  • You can implement a validation step.
  • You can route based on the validation result.

Example: contract validation (pseudo-code)

type RunReceipt = {
  workflowId: string;
  runId: string;
  status: "success" | "degraded" | "failed";
  outputs: {
    artifacts: Array<{type: string; url?: string; id?: string}>;
    counters: Record<string, number>;
  };
  validations: Array<{name: string; pass: boolean; details?: string}>;
};

function validateLeadGen(receipt: RunReceipt) {
  const leadsAdded = receipt.outputs.counters["leads_added"] ?? 0;
  const sheetRowsAppended = receipt.outputs.counters["sheet_rows_appended"] ?? 0;

  return [
    { name: "added_10_leads", pass: leadsAdded >= 10, details: `leads_added=${leadsAdded}` },
    { name: "sheet_updated", pass: sheetRowsAppended >= 10, details: `sheet_rows_appended=${sheetRowsAppended}` },
  ];
}

If validation fails:

  • Log the receipt
  • Notify in Telegram (if it’s actionable but not urgent)
  • Page via PagerDuty (if it breaks the contract and blocks business outcomes)

Reference architecture: Telegram approvals + PagerDuty paging

Here’s a clean, repeatable architecture you can implement in any automation platform.

The flow

  1. Scheduled workflow starts
  2. Preparation step (fetch inputs, dedupe, load state)
  3. Plan step (agent decides what it intends to do)
  4. Risk classification (approve vs notify vs wake)
  5. Approval gate (Telegram) if required
  6. Execution step (send/publish/update) only after approval
  7. Validation step (output contract checks)
  8. Run receipt logged
  9. PagerDuty incident created if validation fails or high-risk guardrails are breached

The routing matrix (copy/paste)

ScenarioExampleChannelWhy
Routine success“10 leads added”LogReceipts enable audits + trends
Actionable FYI“3 duplicates skipped”NotifyUseful, not urgent
High-risk action“Send email campaign”ApprovePrevent externalities
Approval timeout“No response in 30m”Notify → (maybe Wake)Don’t block silently
Output contract failed“No Wix draft created”WakeBusiness outcome blocked
Tool auth failure“Gmail 401”WakeWorkflow can’t run
Partial output acceptable“8 leads found, supply limited”NotifyDegraded but explainable

Implementation examples

1) Telegram approval request payload (conceptual)

Whether you’re using a bot directly or a platform integration, the concept is the same: send a message with buttons that map to callbacks.

{
  "chat_id": "<ops-channel-or-user>",
  "text": "✅ Approval needed: Send outreach email to 1 recipient\n\nWorkflow: outreach_v2\nRun: 2026-03-21T02:00Z::a1b2\n\nPreview:\nSubject: ...\nBody: ...\n\nTimeout: Reject in 30 minutes.",
  "reply_markup": {
    "inline_keyboard": [
      [{"text": "Approve", "callback_data": "approve:run=a1b2"}],
      [{"text": "Reject", "callback_data": "reject:run=a1b2"}]
    ]
  }
}

2) PagerDuty Events API payload (minimal checklist)

When you escalate, include enough context for the on-call to act without opening five tools.

{
  "routing_key": "<PAGERDUTY_INTEGRATION_KEY>",
  "event_action": "trigger",
  "dedup_key": "workflow=leadgen_v1::OUTPUT_CONTRACT_MISSING::2026-03-21T02",
  "payload": {
    "summary": "Leadgen workflow failed: sheet not updated (0 rows appended)",
    "source": "nnode-workflow/leadgen_v1",
    "severity": "error",
    "timestamp": "2026-03-21T02:03:11Z",
    "custom_details": {
      "workflow_id": "leadgen_v1",
      "run_id": "a1b2",
      "failure_class": "OUTPUT_CONTRACT_MISSING",
      "expected": {"sheet_rows_appended": 10},
      "actual": {"sheet_rows_appended": 0},
      "run_receipt_url": "<link-to-receipt>",
      "last_successful_run": "2026-03-14T02:00:00Z"
    }
  }
}

3) “Break-glass” controls (when the agent should stop)

Define hard stops:

  • If the workflow cannot validate outputs → do not proceed to downstream steps
  • If an approval gate is required and not received → do not execute the external action
  • If the agent is uncertain about target identity (wrong customer, wrong domain) → escalate

This is the difference between “cool demo” and “production workflow.”


Sandbox-to-prod promotion checklist

Use this checklist to graduate your command center safely:

  1. Sandbox mode on by default
    • Draft instead of publish
    • Redirect outbound emails to a test address
  2. Approval gates enabled for all high-risk actions
  3. Receipts logged for every run (including failures)
  4. Output contracts written down (in plain English)
  5. Validations implemented (contract checks before success)
  6. PagerDuty only on contract breaches + auth failures + repeated errors
  7. Noise controls (dedupe keys, cooldowns, grouping)
  8. Runbook links in alerts (what to do when paged)
  9. Gradual autonomy
    • Approve every time → approve by domain/customer → autonomous with audits

Why this pattern fits nNode (and why most stacks struggle)

A lot of agent tooling excels at “open-ended agent runs,” but production operations need more:

  • Standardization (anti-ambiguity prompting standards)
  • Repeatability (agentic → workflow conversion)
  • Safety layers (sandboxing + approvals)
  • Real integrations (Gmail/Notion/Wix/Drive/etc.)
  • Ops-grade alerting (PagerDuty when outcomes fail—not when a model gets verbose)

nNode is designed around that reliability loop: iterate in agentic mode, lock the winning pattern into a workflow, and run it on a schedule—while your command center handles decisions and incidents.


Quick-start: build your first agent command center

If you want the simplest version that still works:

  1. Pick one workflow that matters (lead gen, inbox triage, content publishing)
  2. Define one output contract (e.g., “create the draft”)
  3. Add one approval gate (Telegram) for the high-risk action
  4. Page via PagerDuty only when the contract fails
  5. Log receipts for every run

That’s enough to move from “I hope it worked” to “I can trust it.”


Soft CTA

If you’re building automations that need to run unattended—but still need human-in-the-loop approvals and ops-grade escalation when things break—nNode is built for that workflow-first reality.

Explore nNode and start turning successful agent runs into reliable, schedulable workflows at nnode.ai.

Build your first AI Agent today

Join the waiting list for nNode and start automating your workflows with natural language.

Get Started