{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Refunds — human approval gate",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Refund request",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "orderId": "A-1002",
          "customer": "Globex",
          "amount": 249,
          "reason": "damaged in transit"
        }
      },
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "gate",
      "type": "logic.approval",
      "label": "Manager sign-off",
      "category": "flow",
      "config": {
        "title": "Refund $249 to Globex?",
        "description": "Order A-1002 — damaged in transit. Policy requires sign-off above $100.",
        "timeoutMs": 0,
        "onTimeout": "reject"
      },
      "position": {
        "x": 530,
        "y": 23
      }
    },
    {
      "id": "yes",
      "type": "utility.console",
      "label": "Release refund",
      "category": "utility",
      "config": {
        "message": "💸 refund released for {{ $json.orderId }}"
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    },
    {
      "id": "no",
      "type": "utility.console",
      "label": "Denied",
      "category": "utility",
      "config": {
        "message": "🚫 refund denied for {{ $json.orderId }} — notify the customer"
      },
      "position": {
        "x": 1060,
        "y": 178
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "gate",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "gate",
      "sourcePort": "approved",
      "targetNodeId": "yes",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "gate",
      "sourcePort": "rejected",
      "targetNodeId": "no",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "A refund above policy pauses the run and waits in the Approvals inbox (bell icon, top right). Approve it to release the refund lane; reject to route to the denial lane. Test it: the run pauses until you decide."
  }
}