{
  "name": "خلاصه‌ی روزانه‌ی اخبار حوزه‌ی کاری",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "5e235cf3-f1bf-407e-bb9d-d75e5c919d5f",
      "name": "هر روز ساعت ۸",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "url": "https://example.com/feed",
        "options": {}
      },
      "id": "ee55357e-62c8-47b0-a15b-f2491337b907",
      "name": "خواندن RSS (آدرس را عوض کنید)",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all().slice(0, 15);\nreturn [{ json: { headlines: items.map((i, n) => `${n + 1}. ${i.json.title}`).join('\\n') } }];"
      },
      "id": "b781b9f4-cb67-4a39-b6cb-2de576630625",
      "name": "جمع‌کردن تیترها",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://nabegheapi.ir/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'nabeghe/auto', messages: [ { role: 'system', content: \"این تیترها را بخوان و یک خلاصه‌ی روزانه‌ی فارسی در حداکثر ۷ بند کوتاه بنویس؛ مهم‌ترین‌ها اول. اگر تیتر انگلیسی است، ترجمه کن.\" }, { role: 'user', content: $json.headlines } ] }) }}",
        "options": {
          "timeout": 120000
        }
      },
      "id": "6a95700b-6a0d-435c-97d8-00a328f83510",
      "name": "خلاصه‌ی فارسی (Nabeghe API)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        660,
        0
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "nabeghe-api",
          "name": "Nabeghe API"
        }
      }
    },
    {
      "parameters": {
        "chatId": "YOUR_CHAT_ID",
        "text": "={{ '🗞️ خلاصه‌ی امروز:\\n\\n' + $json.choices[0].message.content }}",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "id": "68440367-e20f-4e93-b499-df46b7e4bab4",
      "name": "ارسال خلاصه",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        880,
        0
      ],
      "credentials": {
        "telegramApi": {
          "id": "telegram",
          "name": "Telegram Bot"
        }
      }
    }
  ],
  "connections": {
    "هر روز ساعت ۸": {
      "main": [
        [
          {
            "node": "خواندن RSS (آدرس را عوض کنید)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "خواندن RSS (آدرس را عوض کنید)": {
      "main": [
        [
          {
            "node": "جمع‌کردن تیترها",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "جمع‌کردن تیترها": {
      "main": [
        [
          {
            "node": "خلاصه‌ی فارسی (Nabeghe API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "خلاصه‌ی فارسی (Nabeghe API)": {
      "main": [
        [
          {
            "node": "ارسال خلاصه",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "source": "nabeghemarket.ir/automation"
  },
  "pinData": {},
  "tags": []
}