{
  "name": "Reputation Monitor: negative reviews to Slack",
  "nodes": [
    {
      "parameters": {
        "content": "## Negative reviews on any platform \u2192 Slack\n1. Open **Run monitor** \u2192 Credential \u2192 *Header Auth*: Name `Authorization`, Value `Bearer YOUR_APIFY_TOKEN` (Apify Console \u2192 Settings \u2192 API & Integrations).\n2. Edit the JSON body: one line per business `Name | link1, link2` (Google Maps, Yelp, Tripadvisor, Booking, Facebook, App Store, Google Play) and a stable `trackingId` per client.\n3. Pick your Slack channel in **Post to Slack**.\n\nRuns daily at 08:00. The first run saves a baseline; later runs only return reviews you haven't seen.",
        "height": 300,
        "width": 420
      },
      "id": "9a4ee19c-2002-4dc9-9250-e2daeeb98e81",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -460,
        -120
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "8ae95ac9-5fe9-40df-a5d9-c74ee7d5216e",
      "name": "Every day 08:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/kirozhang~reputation-monitor/run-sync-get-dataset-items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "timeout",
              "value": "300"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"businesses\": [\n    \"Hotel Edison | https://www.google.com/maps?cid=4280570365733019477, https://www.tripadvisor.com/Hotel_Review-g60763-d93437-Reviews-Hotel_Edison_Times_Square-New_York_City_New_York.html\"\n  ],\n  \"competitors\": [],\n  \"trackingId\": \"client-acme\",\n  \"alertMaxRating\": 2,\n  \"maxReviewsFirstRun\": 20\n}",
        "options": {
          "timeout": 310000
        }
      },
      "id": "084cacb6-15b1-4a44-bc17-379f81ba124f",
      "name": "Run monitor",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c6fc1c01-f6dc-4ae1-8db7-141030f94e52",
              "leftValue": "={{ $json.isAlert }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "rightValue": ""
            },
            {
              "id": "1f649541-556f-494d-ba8e-40e0043cecb0",
              "leftValue": "={{ $json.isMyBusiness }}",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "rightValue": ""
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b01b23e0-6930-40da-8c69-b5b73772ca5d",
      "name": "Only my low ratings",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#reviews",
          "mode": "name"
        },
        "text": "={{ $json.rating }}\u2605 on {{ $json.platformLabel }} for *{{ $json.business }}* ({{ ($json.publishedAt || '').slice(0, 10) }})\n>{{ (($json.title ? $json.title + ' \u2014 ' : '') + ($json.text || '(no text)')).slice(0, 500) }}\nTopics: {{ ($json.topics || []).join(', ') || '-' }}\n{{ $json.reviewUrl || $json.profileUrl }}",
        "otherOptions": {}
      },
      "id": "0e1ec637-2d84-4576-a2bc-39102513b8e3",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        660,
        0
      ]
    }
  ],
  "connections": {
    "Every day 08:00": {
      "main": [
        [
          {
            "node": "Run monitor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run monitor": {
      "main": [
        [
          {
            "node": "Only my low ratings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only my low ratings": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}