{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "Support inbox — pull the facts from an email",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Customer email",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "from": "billing@acme.test",
          "receivedAt": "2026-07-10T09:00:00Z",
          "body": "Hello — invoice INV-4402 for $1,250.00 looks wrong, please review."
        }
      },
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "facts",
      "type": "processing.email-regex-parser",
      "label": "Lift the facts",
      "category": "processing",
      "config": {
        "sourcePath": "body",
        "includeSource": true,
        "patterns": [
          {
            "name": "invoice",
            "pattern": "INV-(\\d+)",
            "flags": "i",
            "group": 1
          },
          {
            "name": "amount",
            "pattern": "\\$([0-9,]+\\.\\d{2})",
            "flags": "",
            "group": 1
          }
        ]
      },
      "position": {
        "x": 530,
        "y": 23
      }
    },
    {
      "id": "due",
      "type": "processing.datetime",
      "label": "Follow-up deadline",
      "category": "processing",
      "config": {
        "operation": "add",
        "inputField": "receivedAt",
        "outputField": "followUpBy",
        "amount": 3,
        "unit": "days",
        "format": "iso",
        "timezone": ""
      },
      "position": {
        "x": 1060,
        "y": 0
      }
    },
    {
      "id": "out",
      "type": "utility.console",
      "label": "Ticket fields",
      "category": "utility",
      "config": {
        "message": "Ticket: invoice {{ $json.invoice }} · ${{ $json.amount }} · follow up by {{ $json.followUpBy }}"
      },
      "position": {
        "x": 1590,
        "y": 0
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "facts",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "facts",
      "sourcePort": "output",
      "targetNodeId": "due",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "due",
      "sourcePort": "output",
      "targetNodeId": "out",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "A customer email mentions an invoice and an amount; the regex parser lifts both into fields, and Date & Time computes the follow-up deadline three days out."
  }
}