{
  "name": "Reddit brand monitor: new posts about your keywords, every day",
  "nodes": [
    {
      "parameters": {
        "content": "## Reddit brand monitor\n\nEvery morning this workflow searches Reddit for your keywords and returns only the posts it has not returned before.\n\n**Set up (2 minutes)**\n1. Get your API token at console.apify.com \u2192 Settings \u2192 API & Integrations.\n2. Open **Run Reddit Scraper** \u2192 Credential \u2192 create a *Header Auth* credential: name `Authorization`, value `Bearer YOUR_TOKEN`.\n3. Open **Settings** and put in your own keywords.\n4. Connect **Shape rows** to Slack, Google Sheets, Airtable or email.\n\nActor: https://apify.com/memo23/reddit-scraper?fpr=cr1sc0",
        "height": 420,
        "width": 420
      },
      "id": "b1f0c001-0000-4000-8000-000000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        -140
      ]
    },
    {
      "parameters": {
        "content": "### What comes out\n\nOne item per new post: title, text, subreddit, author, score, comment count, link and date.\n\nWant the comments too? Set `searchIncludeComments` to `true` in **Run Reddit Scraper**. Comment rows arrive with `dataType: \"comment\"` and a `postId` that points at their post.\n\nComing from another Reddit Actor? Your old input JSON works here as it is: muhamed-didovic.github.io/reddit-scraper-migration.html",
        "height": 300,
        "width": 420,
        "color": 4
      },
      "id": "b1f0c001-0000-4000-8000-000000000002",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        640,
        220
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "b1f0c001-0000-4000-8000-000000000003",
      "name": "Every morning",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c1",
              "name": "keywords",
              "value": "={{ [\"your brand\", \"your product\"] }}",
              "type": "array"
            },
            {
              "id": "c2",
              "name": "maxPostsPerRun",
              "value": 50,
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "b1f0c001-0000-4000-8000-000000000004",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/memo23~reddit-scraper/run-sync-get-dataset-items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  searchQueries: $json.keywords,\n  searchSort: 'new',\n  searchTimeframe: 'week',\n  maxItems: $json.maxPostsPerRun,\n  onlyNewPosts: true,\n  searchIncludeComments: false\n}) }}",
        "options": {
          "timeout": 300000
        }
      },
      "id": "b1f0c001-0000-4000-8000-000000000005",
      "name": "Run Reddit Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d1",
              "name": "title",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "d2",
              "name": "text",
              "value": "={{ $json.body }}",
              "type": "string"
            },
            {
              "id": "d3",
              "name": "subreddit",
              "value": "={{ $json.communityName }}",
              "type": "string"
            },
            {
              "id": "d4",
              "name": "author",
              "value": "={{ $json.username }}",
              "type": "string"
            },
            {
              "id": "d5",
              "name": "score",
              "value": "={{ $json.upVotes }}",
              "type": "number"
            },
            {
              "id": "d6",
              "name": "comments",
              "value": "={{ $json.numberOfComments }}",
              "type": "number"
            },
            {
              "id": "d7",
              "name": "link",
              "value": "={{ $json.thread_url }}",
              "type": "string"
            },
            {
              "id": "d8",
              "name": "postedAt",
              "value": "={{ $json.createdAt }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "b1f0c001-0000-4000-8000-000000000006",
      "name": "Shape rows",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        660,
        0
      ]
    }
  ],
  "connections": {
    "Every morning": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Run Reddit Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Reddit Scraper": {
      "main": [
        [
          {
            "node": "Shape rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}