{
  "nodes": [
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d1a9159a-f6f8-400a-8b45-3fff39d22b74",
              "leftValue": "={{ !$json.data.stickied && $json.data.created_utc * 1000 > $now.minus({ hours: 72 }).toMillis() }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1584,
        1552
      ],
      "id": "e1c035c2-f987-4aec-af95-1d24a71279b8",
      "name": "Recent & not pinned (dataengineering)"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2032,
        1344
      ],
      "id": "b65a47b8-3435-4c9a-9fcb-47064dece6ae",
      "name": "Combine all sources"
    },
    {
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "dedupeValue": "={{ $json.url }}",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        2240,
        1344
      ],
      "id": "f4d048a1-3588-471e-9e4d-d3e20c71923f",
      "name": "Drop already-seen (cross-run)"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        2448,
        1344
      ],
      "id": "355a65a8-44a0-463c-968b-94c19914f219",
      "name": "Roll into one list"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "dd44ee55-ff66-0011-2233-445566778899",
              "name": "message",
              "value": "=\ud83d\udcf0 *Daily Web Scraping Digest* \u2014 {{ $now.toFormat('cccc, dd LLLL yyyy') }}\n\n{{ $json.data.map(a => a.source).filter((s,i,arr) => arr.indexOf(s) === i).map(src => '*'+src+'*\\n' + $json.data.filter(a => a.source === src).slice(0,6).map(a => '\u2022 <'+a.url+'|'+(a.title||'').replace(/[|<>]/g,'').trim()+'>').join('\\n')).join('\\n\\n') }}\n\n_Automated with Decodo + n8n._",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2656,
        1344
      ],
      "id": "3836572c-0b82-475c-a489-ea3878205372",
      "name": "Build digest message"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#random",
          "mode": "name"
        },
        "text": "={{ $json.message }}",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        2864,
        1344
      ],
      "id": "0e519bfd-b867-46e1-8725-ed564c3d6e01",
      "name": "Send digest to Slack",
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "30 7 * * *"
            },
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        960,
        1136
      ],
      "id": "08344dd6-d983-4e4b-8907-3c2e3b7ea236",
      "name": "Every day 7:30 AM"
    },
    {
      "parameters": {
        "operation": "reddit_subreddit",
        "subreddit": "webscraping",
        "reddit_sort": "new"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        1168,
        1136
      ],
      "id": "48cbf9ad-ef45-40c3-a907-ea6eb79bdfe4",
      "name": "Fetch r/webscraping",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "=results[0].content.data.children",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1376,
        1136
      ],
      "id": "dae646de-eae6-47ad-ac48-802d72f141ef",
      "name": "Split posts (webscraping)"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "b5a9159a-f6f8-400a-8b45-3fff39d22b72",
              "leftValue": "={{ !$json.data.stickied && $json.data.created_utc * 1000 > $now.minus({ hours: 72 }).toMillis() }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1584,
        1136
      ],
      "id": "52ad4217-3947-4602-82e0-e9e71d894ca7",
      "name": "Recent & not pinned (webscraping)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "27954417-03ae-4b86-951f-ff1819e7b29b",
              "name": "title",
              "value": "={{ $json.data.title }}",
              "type": "string"
            },
            {
              "id": "024eb2cd-0a4e-4fe3-b761-95714a609c46",
              "name": "url",
              "value": "={{ $json.data.url }}",
              "type": "string"
            },
            {
              "id": "f2664330-3f53-44b0-b8f2-6327d35a6d72",
              "name": "source",
              "value": "r/webscraping",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1792,
        1136
      ],
      "id": "293f8ae5-134b-4691-aece-a7075eff989c",
      "name": "Normalize (r/webscraping)"
    },
    {
      "parameters": {
        "operation": "reddit_subreddit",
        "subreddit": "proxies",
        "reddit_sort": "new"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        1168,
        1344
      ],
      "id": "e12aabf5-937b-4e0a-8fac-0a6ef816d18d",
      "name": "Fetch r/proxies",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "=results[0].content.data.children",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1376,
        1344
      ],
      "id": "8b4a25af-f039-4f53-8af3-c0ea499b09c2",
      "name": "Split posts (proxies)"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "c1a9159a-f6f8-400a-8b45-3fff39d22b73",
              "leftValue": "={{ !$json.data.stickied && $json.data.created_utc * 1000 > $now.minus({ hours: 72 }).toMillis() }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1584,
        1344
      ],
      "id": "b0529636-667b-4cba-9f83-83c8e32e0f6f",
      "name": "Recent & not pinned (proxies)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "37954417-03ae-4b86-951f-ff1819e7b29c",
              "name": "title",
              "value": "={{ $json.data.title }}",
              "type": "string"
            },
            {
              "id": "124eb2cd-0a4e-4fe3-b761-95714a609c47",
              "name": "url",
              "value": "={{ $json.data.url }}",
              "type": "string"
            },
            {
              "id": "a2664330-3f53-44b0-b8f2-6327d35a6d73",
              "name": "source",
              "value": "r/proxies",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1792,
        1344
      ],
      "id": "ddeb164f-4f9e-4bac-b328-7dea9d4d5576",
      "name": "Normalize (r/proxies)"
    },
    {
      "parameters": {
        "operation": "reddit_subreddit",
        "subreddit": "dataengineering",
        "reddit_sort": "new"
      },
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "typeVersion": 1,
      "position": [
        1168,
        1552
      ],
      "id": "d3887d4f-91d0-4ef4-96a0-4bb4885e2cb1",
      "name": "Fetch r/dataengineering",
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "=results[0].content.data.children",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1376,
        1552
      ],
      "id": "58c8b768-d9fa-4284-82b1-8e6c1f345ff2",
      "name": "Split posts (dataengineering)"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "52b8abea-a15d-4a8f-b3c3-2399bce3795d",
              "name": "title",
              "value": "={{ $json.data.title }}",
              "type": "string"
            },
            {
              "id": "bf619d91-6798-4e88-9c59-7eb378e0e277",
              "name": "url",
              "value": "={{ $json.data.url }}",
              "type": "string"
            },
            {
              "id": "1a08bacc-06cf-406a-8d1e-506f33c7d01c",
              "name": "source",
              "value": "r/dataengineering",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1792,
        1552
      ],
      "id": "4ba92d3b-cafc-4a83-92bf-bd80ed046463",
      "name": "Normalize (r/dataengineering)"
    }
  ],
  "connections": {
    "Recent & not pinned (dataengineering)": {
      "main": [
        [
          {
            "node": "Normalize (r/dataengineering)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine all sources": {
      "main": [
        [
          {
            "node": "Drop already-seen (cross-run)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Drop already-seen (cross-run)": {
      "main": [
        [
          {
            "node": "Roll into one list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Roll into one list": {
      "main": [
        [
          {
            "node": "Build digest message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build digest message": {
      "main": [
        [
          {
            "node": "Send digest to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every day 7:30 AM": {
      "main": [
        [
          {
            "node": "Fetch r/webscraping",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch r/proxies",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch r/dataengineering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch r/webscraping": {
      "main": [
        [
          {
            "node": "Split posts (webscraping)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split posts (webscraping)": {
      "main": [
        [
          {
            "node": "Recent & not pinned (webscraping)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recent & not pinned (webscraping)": {
      "main": [
        [
          {
            "node": "Normalize (r/webscraping)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize (r/webscraping)": {
      "main": [
        [
          {
            "node": "Combine all sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch r/proxies": {
      "main": [
        [
          {
            "node": "Split posts (proxies)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split posts (proxies)": {
      "main": [
        [
          {
            "node": "Recent & not pinned (proxies)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recent & not pinned (proxies)": {
      "main": [
        [
          {
            "node": "Normalize (r/proxies)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize (r/proxies)": {
      "main": [
        [
          {
            "node": "Combine all sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Fetch r/dataengineering": {
      "main": [
        [
          {
            "node": "Split posts (dataengineering)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split posts (dataengineering)": {
      "main": [
        [
          {
            "node": "Recent & not pinned (dataengineering)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize (r/dataengineering)": {
      "main": [
        [
          {
            "node": "Combine all sources",
            "type": "main",
            "index": 2
          }
        ]
      ]
    }
  }
}