{
  "name": "Daily subreddit digest with AI summary (ProLevelMax RSS)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "name": "Every morning",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ],
      "id": "b1b2c3d4-0002-4000-8000-000000000001"
    },
    {
      "parameters": {
        "url": "https://prolevelmax.com/rss/reddit/r/SaaS?sort=top&key=YOUR_RSS_KEY",
        "options": {}
      },
      "name": "Read subreddit feed",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        220,
        0
      ],
      "id": "b1b2c3d4-0002-4000-8000-000000000002"
    },
    {
      "parameters": {
        "jsCode": "const lines = $input.all().slice(0, 25).map((i, n) => `${n + 1}. ${i.json.title}\\n${i.json.link}\\n${(i.json.contentSnippet || '').slice(0, 400)}`);\nreturn [{ json: { posts: lines.join('\\n\\n') } }];"
      },
      "name": "Combine posts",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        440,
        0
      ],
      "id": "b1b2c3d4-0002-4000-8000-000000000003"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/chat/completions",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "openAiApi",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'gpt-4o-mini', messages: [{ role: 'system', content: 'Summarize these Reddit posts in 5 short bullet points: main topics, complaints and questions. Mention post numbers.' }, { role: 'user', content: $json.posts }] }) }}",
        "options": {}
      },
      "name": "Summarize with AI",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        660,
        0
      ],
      "id": "b1b2c3d4-0002-4000-8000-000000000004"
    },
    {
      "parameters": {
        "fromEmail": "digest@example.com",
        "toEmail": "you@example.com",
        "subject": "Daily r/SaaS digest",
        "emailFormat": "text",
        "text": "={{ $json.choices[0].message.content }}\n\n---\n{{ $('Combine posts').item.json.posts }}",
        "options": {}
      },
      "name": "Email the digest",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        880,
        0
      ],
      "id": "b1b2c3d4-0002-4000-8000-000000000005"
    }
  ],
  "connections": {
    "Every morning": {
      "main": [
        [
          {
            "node": "Read subreddit feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read subreddit feed": {
      "main": [
        [
          {
            "node": "Combine posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine posts": {
      "main": [
        [
          {
            "node": "Summarize with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize with AI": {
      "main": [
        [
          {
            "node": "Email the digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "pinData": {}
}