Live dashboard that flags any Gorgias agent who is offline or out of office — using Gorgias's own audit trail. An agent is considered Active only if they've performed an action in Gorgias within the last 10 minutes.
| Status | Meaning |
|---|---|
| ✅ Active | Has taken an action in Gorgias within the last 10 minutes. |
| 🔴 Offline | No action in 10+ minutes (their browser may be closed or they're idle). |
| 🌴 Out of Office | Agent has explicitly marked availability/OOO (or is in the OOO override list). |
Activity is read from the Gorgias audit log (GET /api/events), which records who did what and when. Agents with no attributable event fall back to their most recently updated assigned ticket.
The dashboard needs two environment variables:
GORGIAS_DOMAIN — your Gorgias subdomain (the part before .gorgias.com).GORGIAS_API_KEY — an API key created in Gorgias: Settings → Account → REST API (copy the "Password (API key)").Optional:
OUT_OF_OFFICE_AGENTS — comma-separated agent emails to force into Out of Office status (handy when Gorgias's availability flag isn't exposed via API).The dashboard auto-refreshes every 30 seconds.
/) — card per agent, color-coded, with last-action time and idle minutes./api) — machine-readable report for embedding in Slack bots, PagerDuty, or cron checks.{ "summary": { "total": 5, "active": 3, "out_of_office": 1, "offline": 1 }, "agents": [ { "name": "...", "status": "offline", "minutes_idle": 14 } ] }
An interval job (slack_alert.ts) runs every 15 minutes and posts to a Slack channel whenever a monitored agent is offline/idle >10 min or out of office. To avoid spam, it only posts when an agent's status changes, and sends a "back online" note on recovery.
Setup (one-time):
Create your Slack channel if you haven't (e.g. #agent-monitoring).
Create a Slack Incoming Webhook pointed at that channel:
Add these env vars to the val:
ALERT_AGENTS is optional — a comma-separated list of agent emails or names to monitor (e.g. ada@koala.com, sam). Leave it empty to alert on all agents.