{
  "name": "Automatically Post Latest Reddit Content to Discord with Image Extraction",
  "nodes": [
    {
      "id": "93d15b82-9ce5-4189-8913-1f29bea05a23",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -140,
        -40
      ]
    },
    {
      "id": "4bd7becf-e6cc-4975-a098-441accc2d24b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -200
      ],
      "parameters": {
        "width": 600,
        "height": 440,
        "content": "## Fetch and filter reddit posts\n- Fetches latest post from a subreddit, filters out aome postIDs from mod posts.\n- Add another one if nessecary"
      }
    },
    {
      "id": "2602f8be-c1c3-4403-9b61-714bbfe517e7",
      "name": "Fetch latest reddit posts",
      "type": "n8n-nodes-base.reddit",
      "position": [
        220,
        -40
      ]
    },
    {
      "id": "1c24ec32-b231-4139-967d-677dad046ac6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -200
      ],
      "parameters": {
        "width": 560,
        "height": 440,
        "content": "## Post fetching and URL extraction\n- Fetches per post data, extracts direct URL for image."
      }
    },
    {
      "id": "fc5bca77-baaa-4e68-ae8c-4c246aea43bc",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        -200
      ],
      "parameters": {
        "width": 280,
        "height": 440,
        "content": "## Post To platforms\n- Send Direct image + context to social media platforms"
      }
    },
    {
      "id": "38f3aa18-95db-4814-9383-801d22b66cee",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -200
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## Scheduling\n- Set up the frequency of time to check for new posts\n"
      }
    },
    {
      "id": "2331d25e-9468-4787-871f-8692ff0b8546",
      "name": "Filter out announcement posts",
      "type": "n8n-nodes-base.if",
      "position": [
        440,
        -40
      ]
    },
    {
      "id": "a8126cca-1674-478a-878a-a69d1d002959",
      "name": "Fetch Reddit Post",
      "type": "n8n-nodes-base.reddit",
      "position": [
        800,
        -40
      ]
    },
    {
      "id": "85e63030-ed64-4f82-a2a5-c4aeecbb4679",
      "name": "Extract Image URL",
      "type": "n8n-nodes-base.code",
      "position": [
        1100,
        -40
      ]
    },
    {
      "id": "c11ecaf3-9f82-47cd-bc86-0a17b1c869db",
      "name": "Send to discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        1420,
        -40
      ]
    },
    {
      "id": "63672e8c-1ebc-44ca-845c-2a17ad0acc40",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -380
      ],
      "parameters": {
        "width": 940,
        "height": null,
        "content": "## SETUP\n- Set up a reddit account including reddit app, copy client/id secret.\n- Configure redirect URL as n8n base url.\n- Configure subreddit in both reddit nodes.\n- Add a webhook to discord."
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch latest reddit posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image URL": {
      "main": [
        [
          {
            "node": "Send to discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Reddit Post": {
      "main": [
        [
          {
            "node": "Extract Image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch latest reddit posts": {
      "main": [
        [
          {
            "node": "Filter out announcement posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter out announcement posts": {
      "main": [
        [],
        [
          {
            "node": "Fetch Reddit Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}