{
  "name": "Auto-Curate a Weekly Newsletter From Reddit Into Gmail draft",
  "nodes": [
    {
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "notes": "Weekly, before your send day.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Reddit — Fetch Week",
      "type": "n8n-nodes-base.reddit",
      "typeVersion": 1,
      "parameters": {
        "operation": "getAll"
      },
      "notes": "Pull this week's items.",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Rank + Summarise",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "user",
              "content": "Rank these items by relevance, pick the top 6, and summarise each in two sentences: {{ $json.items }}"
            }
          ]
        }
      },
      "notes": "Swap in Anthropic or any LLM node if you prefer.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Gmail draft — Draft Issue",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "parameters": {
        "operation": "create"
      },
      "notes": "Assemble the draft for review.",
      "position": [
        980,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        1220,
        300
      ]
    }
  ],
  "connections": {
    "Schedule": {
      "main": [
        [
          {
            "node": "Reddit — Fetch Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reddit — Fetch Week": {
      "main": [
        [
          {
            "node": "Rank + Summarise",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rank + Summarise": {
      "main": [
        [
          {
            "node": "Gmail draft — Draft Issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail draft — Draft Issue": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
