{
  "name": "Route Facebook Story replies to Slack, Telegram, and Supabase CRM by region",
  "nodes": [
    {
      "id": "3b800fff-134c-40fd-81be-7961815ee7d7",
      "name": "Facebook Story Reply Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1104,
        80
      ]
    },
    {
      "id": "daeefdb5-aa9c-42c6-bbf7-5e509da5b305",
      "name": "Normalize Story Reply Payload",
      "type": "n8n-nodes-base.function",
      "position": [
        -768,
        80
      ]
    },
    {
      "id": "aaab48b7-1f89-458b-b98c-5d432547f9ed",
      "name": "Time-Zone Router",
      "type": "n8n-nodes-base.function",
      "position": [
        -320,
        80
      ]
    },
    {
      "id": "1d0614bd-5166-40d1-b644-e8d0f5dfe25a",
      "name": "Assignment Successful?",
      "type": "n8n-nodes-base.if",
      "position": [
        -96,
        80
      ]
    },
    {
      "id": "ba916845-aa3b-4a7d-bdd9-6a286e0d050c",
      "name": "Telegram Notify – Human Assigned",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        -16
      ]
    },
    {
      "id": "f87f0b74-f466-4846-b1b1-d82b96846cec",
      "name": "Telegram Alert – Unassigned Story Reply",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        176
      ]
    },
    {
      "id": "50a9bf0c-b091-470e-8e9c-e5a7d4fc4246",
      "name": "Slack Alert – Unassigned Story Reply",
      "type": "n8n-nodes-base.slack",
      "position": [
        608,
        176
      ]
    },
    {
      "id": "b1317bb1-2a1f-44a3-9983-241b03d13443",
      "name": "Slack Notify – Human Assigned",
      "type": "n8n-nodes-base.slack",
      "position": [
        576,
        -16
      ]
    },
    {
      "id": "56d96140-eace-4bb5-a992-ff4749b511af",
      "name": "Insert Story Reply into Supabase",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -544,
        80
      ]
    },
    {
      "id": "25221da5-3901-4ef8-ba30-8b09a28dc74d",
      "name": "Update Supabase – Assigned",
      "type": "n8n-nodes-base.supabase",
      "position": [
        128,
        -16
      ]
    },
    {
      "id": "93c62a17-eb46-4fea-8ef4-43d0d46c5047",
      "name": "Update Supabase – Unassigned",
      "type": "n8n-nodes-base.supabase",
      "position": [
        128,
        176
      ]
    },
    {
      "id": "ee813015-e98f-4625-aefe-a9955afa1abb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -176
      ],
      "parameters": {
        "width": 416,
        "height": 432,
        "content": "# Incoming Facebook Story Replies\n**This section receives Facebook Story reply events in real time using a webhook. It captures basic details like sender ID, message content, story ID, and timestamp s"
      }
    },
    {
      "id": "ee43f8c6-5427-4e3b-9d55-a656f30c278a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -176
      ],
      "parameters": {
        "width": 864,
        "height": 432,
        "content": "# Normalize, Store & Assign Replies\n**This section cleans and standardizes incoming story reply data, saves it into Supabase, and assigns each reply to the correct support team based on the current ti"
      }
    },
    {
      "id": "142977fb-ddd7-420e-ad73-035b0084be2b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -224
      ],
      "parameters": {
        "width": 704,
        "height": 576,
        "content": "# Notify Teams & Update Status\n**This section sends notifications to Telegram and Slack based on assignment status. Assigned replies notify the responsible team, while unassigned replies trigger alert"
      }
    },
    {
      "id": "3ca6a221-1825-4332-9378-deaee93b497b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -432
      ],
      "parameters": {
        "width": 544,
        "height": 512,
        "content": "## **How It Works**\nThis workflow listens for new Facebook Story reply events in real time using a webhook. When a reply is received, the incoming payload is normalized into a clean and structured for"
      }
    }
  ],
  "connections": {
    "Time-Zone Router": {
      "main": [
        [
          {
            "node": "Assignment Successful?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assignment Successful?": {
      "main": [
        [
          {
            "node": "Update Supabase – Assigned",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Supabase – Unassigned",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook Story Reply Webhook": {
      "main": [
        [
          {
            "node": "Normalize Story Reply Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Supabase – Assigned": {
      "main": [
        [
          {
            "node": "Telegram Notify – Human Assigned",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Story Reply Payload": {
      "main": [
        [
          {
            "node": "Insert Story Reply into Supabase",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Supabase – Unassigned": {
      "main": [
        [
          {
            "node": "Telegram Alert – Unassigned Story Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert Story Reply into Supabase": {
      "main": [
        [
          {
            "node": "Time-Zone Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Notify – Human Assigned": {
      "main": [
        [
          {
            "node": "Slack Notify – Human Assigned",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Alert – Unassigned Story Reply": {
      "main": [
        [
          {
            "node": "Slack Alert – Unassigned Story Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}