{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Ops pager — Slack alert on failure",
  "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": "slack",
      "type": "output.slack",
      "label": "Slack #oncall",
      "category": "output",
      "config": {
        "text": "🚨 {{ $json.workflowName }} failed: {{ $json.error.message }}",
        "channel": "#oncall",
        "botToken": "${credential.slack.botToken}"
      },
      "position": {
        "x": 530,
        "y": 228
      }
    },
    {
      "id": "mirror",
      "type": "utility.console",
      "label": "Alert mirror",
      "category": "utility",
      "config": {
        "message": "would post to Slack: 🚨 {{ $json.workflowName }} failed"
      },
      "position": {
        "x": 530,
        "y": 406
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "boom",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "onerr",
      "sourcePort": "output",
      "targetNodeId": "slack",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "onerr",
      "sourcePort": "output",
      "targetNodeId": "mirror",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "FAILURE-ALERT PRESET: the Error Trigger's recovery lane posts straight to Slack — import, point the Slack node at your channel credential, done. The demo fails on purpose so the lane fires; the console mirrors what the Slack message would say. Pair with meta.autoreplay for retry-then-page."
  }
}