{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Ops pager — when a run fails",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Nightly export",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "export": "daily-ledger"
        }
      },
      "position": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "boom",
      "type": "error-handling.stop-and-error",
      "label": "Export (fails)",
      "category": "utility",
      "config": {
        "message": "export path \\\\vault\\ledger is unreachable",
        "errorCode": "EXPORT_UNREACHABLE"
      },
      "position": {
        "x": 530,
        "y": 0
      }
    },
    {
      "id": "onerr",
      "type": "error-handling.error",
      "label": "On failure",
      "category": "trigger",
      "config": {
        "includeNodeErrors": true
      },
      "position": {
        "x": 0,
        "y": 228
      }
    },
    {
      "id": "page",
      "type": "utility.console",
      "label": "Page on-call",
      "category": "utility",
      "config": {
        "message": "🚨 PAGE ONCALL: {{ $json }}"
      },
      "position": {
        "x": 530,
        "y": 228
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "boom",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "onerr",
      "sourcePort": "output",
      "targetNodeId": "page",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "The recovery lane: a nightly export fails on purpose (bad path), and the Error Trigger fires IN THE SAME RUN with the failure details — wire the recovery lane to a real pager or email. THE TEST FAILS BY DESIGN; look at the recovery lane's console output."
  }
}