{
  "name": "CivicEye Email Workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "complaint-update",
        "options": {}
      },
      "name": "Supabase Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "fromEmail": "no-reply@civiceye.ai",
        "toEmail": "={{$node[\"Supabase Webhook\"].json[\"email\"]}}",
        "subject": "Update on your Complaint: {{$node[\"Supabase Webhook\"].json[\"id\"]}}",
        "text": "Your complaint status for CivicEye has been updated to: {{$node[\"Supabase Webhook\"].json[\"status\"]}}"
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    }
  ],
  "connections": {
    "Supabase Webhook": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}