{
  "name": "Moderate Facebook comments with AI and send reports to Slack & Telegram",
  "nodes": [
    {
      "id": "275e5629-a9b6-48bc-9000-b4bace41e843",
      "name": "Scheduled Workflow Trigger",
      "type": "n8n-nodes-base.cron",
      "position": [
        848,
        -160
      ]
    },
    {
      "id": "3c144fd8-c4f3-4fa7-8558-a65fa2132647",
      "name": "Fetch Facebook Page Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        -160
      ]
    },
    {
      "id": "60480f09-55bd-48b6-b7e2-a7e325cd8de3",
      "name": "Prepare Comment Items for Processing",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        -160
      ]
    },
    {
      "id": "a39975f1-36e6-49cd-87fe-557cd8b60a41",
      "name": "AI-Based Comment Moderation",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1520,
        -160
      ]
    },
    {
      "id": "3888dee5-bfbf-45cf-8bf1-e1ca8edfaa06",
      "name": "Normalize AI Moderation Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1872,
        -160
      ]
    },
    {
      "id": "75ebefde-22d3-4ad9-8bc6-ecd8e9f4b04c",
      "name": "Store Moderation Logs in Database",
      "type": "n8n-nodes-base.supabase",
      "position": [
        2096,
        -160
      ]
    },
    {
      "id": "b4016ae0-bf6f-4f2b-b466-a6d1fe726717",
      "name": "Aggregate Moderation Statistics",
      "type": "n8n-nodes-base.code",
      "position": [
        2320,
        -160
      ]
    },
    {
      "id": "d06b0dbc-3ae5-47ae-974b-9986dfc116fa",
      "name": "Send Moderation Reports to Telegarm",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2544,
        -256
      ]
    },
    {
      "id": "66638b05-d21a-4fac-be3f-fbef515ef4af",
      "name": "Send Moderation Reports to Team via Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2544,
        -64
      ]
    },
    {
      "id": "4333d5c6-d906-4442-b468-49df5a772352",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -448
      ],
      "parameters": {
        "width": 416,
        "height": 480,
        "content": "# Workflow Trigger & Data Collection\n \n## Description\nThis section automatically triggers the workflow every six hours and fetches recent comments from the Facebook Page. It ensures the workflow runs "
      }
    },
    {
      "id": "d90b1e1a-69d2-4176-b5ee-0d9856355188",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -448
      ],
      "parameters": {
        "width": 544,
        "height": 480,
        "content": "# Comment Preparation & AI Moderation\n \n## Description\n### This section prepares Facebook comments into individual items and sends each comment to OpenAI for moderation. The AI analyzes intent, toxici"
      }
    },
    {
      "id": "8e793df6-0494-44be-87f4-8dfb62429da1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        -464
      ],
      "parameters": {
        "width": 448,
        "height": 496,
        "content": "# Normalize, Flag & Store Results\n \n## Description\n### This section cleans and normalizes the AI moderation output, calculates whether a comment should be flagged, and stores the final moderation data"
      }
    },
    {
      "id": "e57d791f-5e00-486d-b4a5-98007f2974d2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        -544
      ],
      "parameters": {
        "width": 576,
        "height": 656,
        "content": "# Aggregate Statistics & Team Notifications\n \n## Description\n### This section aggregates all moderated comments into meaningful statistics, including totals, flagged counts, spam, and toxicity. It the"
      }
    },
    {
      "id": "30948ae8-8780-4042-aabc-86ff5886a8b8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -688
      ],
      "parameters": {
        "width": 928,
        "height": 720,
        "content": "# How it works.\n\n### This workflow automatically monitors comments from a Facebook Page and turns them into a clear moderation report for your team. Every six hours, the workflow fetches the latest co"
      }
    }
  ],
  "connections": {
    "Scheduled Workflow Trigger": {
      "main": [
        [
          {
            "node": "Fetch Facebook Page Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI-Based Comment Moderation": {
      "main": [
        [
          {
            "node": "Normalize AI Moderation Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Facebook Page Comments": {
      "main": [
        [
          {
            "node": "Prepare Comment Items for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Moderation Statistics": {
      "main": [
        [
          {
            "node": "Send Moderation Reports to Team via Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Moderation Reports to Telegarm",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize AI Moderation Results": {
      "main": [
        [
          {
            "node": "Store Moderation Logs in Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Moderation Logs in Database": {
      "main": [
        [
          {
            "node": "Aggregate Moderation Statistics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Comment Items for Processing": {
      "main": [
        [
          {
            "node": "AI-Based Comment Moderation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Moderation Reports to Team via Slack": {
      "main": [
        []
      ]
    }
  }
}