{
  "name": "Detect fake product reviews with OpenAI and send alerts to Slack via Airtable",
  "nodes": [
    {
      "id": "02436f9e-fb75-4fc3-9bc5-766b8dacbc9b",
      "name": "Webhook – Receive Product Payload",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3776,
        432
      ]
    },
    {
      "id": "084e51a0-1c5d-475f-add7-75224fb5c682",
      "name": "Process Each Product",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -3328,
        432
      ]
    },
    {
      "id": "e1c92f87-b29e-43d1-aaed-0755ec651296",
      "name": "Fetch Product Reviews",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3056,
        416
      ]
    },
    {
      "id": "e126f003-cdd9-438f-9640-d35840ca2ead",
      "name": "Extract products",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -3552,
        432
      ]
    },
    {
      "id": "fe06f64f-315d-492b-bc03-9f95ae69601c",
      "name": "IF – Has Reviews?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2864,
        416
      ]
    },
    {
      "id": "800cf035-fda5-4a9a-b035-9eab56de30c7",
      "name": "Expand reviews[] to items",
      "type": "n8n-nodes-base.code",
      "position": [
        -2640,
        416
      ]
    },
    {
      "id": "db46b462-5c90-40e5-a342-fad3fce9da44",
      "name": "Split review in batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2304,
        272
      ]
    },
    {
      "id": "742c6b79-b365-410a-abf5-049bb3b3baef",
      "name": "List Bases",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -1552,
        -112
      ]
    },
    {
      "id": "5c1956b8-bf25-4531-99b2-04b592580013",
      "name": "Search Records by Hash",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -1376,
        -112
      ]
    },
    {
      "id": "3664fe23-aa07-45a0-86ed-bbf341586478",
      "name": "Normalize Airtable Result",
      "type": "n8n-nodes-base.code",
      "position": [
        -1168,
        -112
      ]
    },
    {
      "id": "1006fdeb-9121-4465-a7ac-ab930626fbca",
      "name": "Is New Review?",
      "type": "n8n-nodes-base.if",
      "position": [
        -976,
        -112
      ]
    },
    {
      "id": "b535d8ef-507f-4a70-bf22-80611e1392ef",
      "name": "Create Review Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -432,
        208
      ]
    },
    {
      "id": "d1ed1608-c59e-4c19-aa90-59c861f5e3b6",
      "name": "Update Review Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        496,
        208
      ]
    },
    {
      "id": "21604a2e-a9ef-4af8-895d-f6d3d58db8a5",
      "name": "AI Fake Review Analysis",
      "type": "n8n-nodes-base.openAi",
      "position": [
        -240,
        208
      ]
    },
    {
      "id": "0c58035e-ef3a-4781-b1af-a587cdc9d238",
      "name": "Parse AI Respons",
      "type": "n8n-nodes-base.code",
      "position": [
        -32,
        208
      ]
    },
    {
      "id": "fc495136-6533-4aac-b6b6-76dba3b4f749",
      "name": "Check Suspicious Score Threshold",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        208
      ]
    },
    {
      "id": "92e6a933-cc2a-40bd-aac7-a9c2e2c85bc2",
      "name": "Send Moderation Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1280,
        352
      ]
    },
    {
      "id": "cefaef6f-7fc2-4e2f-99a0-fd95c373b890",
      "name": "Generate Review Hash1",
      "type": "n8n-nodes-base.function",
      "position": [
        -1872,
        272
      ]
    },
    {
      "id": "eddc2f03-3cca-42ef-b357-13cef1abad03",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3824,
        240
      ],
      "parameters": {
        "width": 656,
        "height": 544,
        "content": "## Product Input & Setup\n### Receives product data from the webhook, extracts individual product entries, and prepares them for processing. This ensures each product request is handled independently a"
      }
    },
    {
      "id": "9e6accf5-f2a0-4b2f-b4ee-0ae8b3aef3bb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3104,
        240
      ],
      "parameters": {
        "width": 640,
        "height": 528,
        "content": "## Fetch Reviews\n### Fetches reviews from the external scraper API, checks whether valid review data exists, and expands the results into individual review items. This provides a clean, per-review for"
      }
    },
    {
      "id": "b68e969a-a8f6-40dd-a10f-220027ba24d9",
      "name": "Prepare Review Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -2064,
        272
      ]
    },
    {
      "id": "5f579bd6-f8f8-4d9b-834a-8e382fdc9add",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2336,
        128
      ],
      "parameters": {
        "width": 736,
        "height": 512,
        "content": "## Clean & Hash Review\n### Breaks reviews into single units, standardizes fields like reviewer, rating, and date, and generates a unique hash by combining key attributes. The hash supports consistent "
      }
    },
    {
      "id": "7ecc4592-16b5-4e8c-acba-f2754bd664c3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -352
      ],
      "parameters": {
        "width": 864,
        "height": 464,
        "content": "## Check for Duplicate\n### Searches Airtable for existing records using the generated hash and normalizes the response to avoid empty-object issues. Determines whether the review already exists or mus"
      }
    },
    {
      "id": "333b6164-c94f-4799-a203-7f53b7e25c0e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        64
      ],
      "parameters": {
        "width": 768,
        "height": 352,
        "content": "## Store & Analyze Review\n### Stores new reviews in Airtable and submits them to the AI model for fake-review analysis. The AI response is cleaned and structured into usable fields like fake score, ri"
      }
    },
    {
      "id": "2fda9471-cd99-4111-9785-e5ddea775b7f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        64
      ],
      "parameters": {
        "width": 640,
        "height": 352,
        "content": "## Update Review Status\n### Updates the Airtable record with AI analysis, computes the risk threshold, and determines whether the review qualifies as suspicious. Only high-risk reviews are escalated f"
      }
    },
    {
      "id": "600ba413-5958-461d-b22c-7bcb07e9a600",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        144
      ],
      "parameters": {
        "width": 352,
        "height": 432,
        "content": "## Send Moderation Alert\n### Sends a detailed Slack alert when a review is flagged as suspicious, including product details, fake score, reviewer information, and reasoning. This enables moderators to"
      }
    },
    {
      "id": "d2f26f92-cd39-4d9e-afb2-8af73cdf3580",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4608,
        -432
      ],
      "parameters": {
        "width": 704,
        "height": 976,
        "content": "## How It Works\n### This workflow helps you automatically check whether product reviews might be fake. It starts when a product and its review-scraper URL are received through a webhook. The workflow "
      }
    }
  ],
  "connections": {
    "List Bases": {
      "main": [
        [
          {
            "node": "Search Records by Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is New Review?": {
      "main": [
        [
          {
            "node": "Create Review Record",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split review in batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract products": {
      "main": [
        [
          {
            "node": "Process Each Product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Respons": {
      "main": [
        [
          {
            "node": "Update Review Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF – Has Reviews?": {
      "main": [
        [
          {
            "node": "Expand reviews[] to items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Review Record": {
      "main": [
        [
          {
            "node": "AI Fake Review Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Product": {
      "main": [
        [
          {
            "node": "Fetch Product Reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Review Record": {
      "main": [
        [
          {
            "node": "Check Suspicious Score Threshold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Product Reviews": {
      "main": [
        [
          {
            "node": "IF – Has Reviews?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Review Hash1": {
      "main": [
        [
          {
            "node": "List Bases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Review Fields": {
      "main": [
        [
          {
            "node": "Generate Review Hash1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Moderation Alert": {
      "main": [
        [
          {
            "node": "Split review in batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Records by Hash": {
      "main": [
        [
          {
            "node": "Normalize Airtable Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Fake Review Analysis": {
      "main": [
        [
          {
            "node": "Parse AI Respons",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split review in batches": {
      "main": [
        [],
        [
          {
            "node": "Prepare Review Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Expand reviews[] to items": {
      "main": [
        [
          {
            "node": "Split review in batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Airtable Result": {
      "main": [
        [
          {
            "node": "Is New Review?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Suspicious Score Threshold": {
      "main": [
        [
          {
            "node": "Send Moderation Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split review in batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook – Receive Product Payload": {
      "main": [
        [
          {
            "node": "Extract products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}