{
  "name": "Synthetic Safe Support Draft",
  "nodes": [
    {
      "id": "n8n-safe-webhook",
      "name": "Support Event Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "synthetic-support-event"
      }
    },
    {
      "id": "n8n-safe-dedup",
      "name": "Deduplicate Event",
      "type": "n8n-nodes-base.dataStore",
      "parameters": {
        "operation": "get",
        "key": "={{ $json.event_id }}"
      }
    },
    {
      "id": "n8n-safe-loop",
      "name": "Bounded Batch Iterator",
      "type": "n8n-nodes-base.splitInBatches",
      "parameters": {
        "batchSize": 25
      }
    },
    {
      "id": "n8n-safe-ai",
      "name": "Draft Reply With LLM",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "parameters": {
        "model": "synthetic-small-model"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "n8n-safe-approval",
      "name": "Human Approval Gate",
      "type": "n8n-nodes-base.wait",
      "parameters": {
        "resume": "manual"
      }
    },
    {
      "id": "n8n-safe-send",
      "name": "Gmail Send Approved Reply",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "operation": "send",
        "recipient": "={{ $json.synthetic_recipient }}"
      }
    }
  ],
  "connections": {
    "Support Event Webhook": {
      "main": [
        [
          {
            "node": "Deduplicate Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deduplicate Event": {
      "main": [
        [
          {
            "node": "Bounded Batch Iterator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bounded Batch Iterator": {
      "main": [
        [
          {
            "node": "Draft Reply With LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Draft Reply With LLM": {
      "main": [
        [
          {
            "node": "Human Approval Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Human Approval Gate": {
      "main": [
        [
          {
            "node": "Gmail Send Approved Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "errorWorkflow": "synthetic-error-handler-reference"
  }
}