{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "WhatsApp — inbound messages",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "wa",
      "type": "input.whatsapp",
      "label": "WhatsApp inbound",
      "category": "trigger",
      "config": {},
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "optout",
      "type": "logic.if",
      "label": "Opt-out?",
      "category": "flow",
      "config": {
        "path": "text",
        "operator": "equals",
        "value": "STOP"
      },
      "position": {
        "x": 530,
        "y": 23
      }
    },
    {
      "id": "stop",
      "type": "utility.console",
      "label": "Opt-out",
      "category": "utility",
      "config": {
        "message": "🛑 {{ $json.from }} opted out — update the consent list"
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    },
    {
      "id": "route",
      "type": "utility.console",
      "label": "Support queue",
      "category": "utility",
      "config": {
        "message": "→ support queue: {{ $json.text }}"
      },
      "position": {
        "x": 1060,
        "y": 178
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "wa",
      "sourcePort": "output",
      "targetNodeId": "optout",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "optout",
      "sourcePort": "true",
      "targetNodeId": "stop",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "optout",
      "sourcePort": "false",
      "targetNodeId": "route",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "wa"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "SETUP: point a Meta WhatsApp Business webhook at this workflow's deployed URL — customer messages become runs. Test simulates one."
  }
}