{
    "name": "Telegram News Summarizer",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "triggerAtMinute": 15
                        }
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -240,
                -80
            ],
            "id": "c0f99451-4a79-4632-9c62-cfeacfcf0102",
            "name": "Schedule Trigger"
        },
        {
            "parameters": {
                "url": "https:\/\/feeds.bbci.co.uk\/news\/rss.xml",
                "options": []
            },
            "type": "n8n-nodes-base.rssFeedRead",
            "typeVersion": 1.2,
            "position": [
                -20,
                -80
            ],
            "id": "befdfe55-38f6-494e-ad98-702340a10b6f",
            "name": "RSS Read",
            "executeOnce": false
        },
        {
            "parameters": {
                "mode": "combine",
                "combineBy": "combineByPosition",
                "options": []
            },
            "type": "n8n-nodes-base.merge",
            "typeVersion": 3.2,
            "position": [
                480,
                -100
            ],
            "id": "c8882fb8-ad4b-45dc-a57e-b54b7f12d561",
            "name": "Merge"
        },
        {
            "parameters": [],
            "type": "n8n-nodes-base.limit",
            "typeVersion": 1,
            "position": [
                200,
                -80
            ],
            "id": "233f952a-1952-4441-b4c1-9cd5a05ae5c4",
            "name": "Limit"
        },
        {
            "parameters": {
                "chatId": "YOUR_CHAT_ID",
                "text": "=📰 *{{ $('RSS Read').item.json.title }}*\n\n{{ $json[\"summary\"] }}\n\n🔗 [Read full article]({{ $('Merge').item.json.link }})\n",
                "additionalFields": []
            },
            "type": "n8n-nodes-base.telegram",
            "typeVersion": 1.2,
            "position": [
                820,
                -80
            ],
            "id": "4831dadf-5a99-40d8-b493-cfa3fa7cc66b",
            "name": "Telegram ",
            "webhookId": "a73a40c9-abc8-4bfc-968c-7fb170c4af46",
            "credentials": {
                "telegramApi": {
                    "id": "4",
                    "name": "YOUR_CREDENTIAL_NAME"
                }
            }
        },
        {
            "parameters": {
                "method": "POST",
                "url": "https:\/\/api.groq.com\/openai\/v1\/chat\/completions",
                "sendHeaders": true,
                "headerParameters": {
                    "parameters": [
                        {
                            "name": "Authorization",
                            "value": "Bearer YOUR_API_KEY"
                        },
                        {
                            "name": "Content-Type",
                            "value": "application\/json"
                        }
                    ]
                },
                "sendBody": true,
                "specifyBody": "json",
                "jsonBody": "={\n  \"model\": \"llama3-70b-8192\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant that summarizes news articles in 3–4 lines.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize this article:\\n\\nTitle: {{$json[\"title\"]}}\\n\\nLink: {{$json[\"link\"]}}\"\n    }\n  ]\n}\n",
                "options": []
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                360,
                40
            ],
            "id": "05d067e8-21aa-42fd-a76d-60bd627a99ed",
            "name": "Groq Summarizer"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "9e4922e1-2685-46ae-aebc-54359824a162",
                            "name": "=summary",
                            "value": "={{ $json[\"choices\"][0][\"message\"][\"content\"] }}",
                            "type": "string"
                        }
                    ]
                },
                "options": []
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                640,
                -80
            ],
            "id": "55788903-4652-4e35-9f60-aa674faf396f",
            "name": "Set "
        },
        {
            "parameters": {
                "content": "## Telegram News Summarizer",
                "height": 400,
                "width": 1340,
                "color": 5
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                -280,
                -180
            ],
            "typeVersion": 1,
            "id": "74d8b087-bd00-443b-8a1c-1d0218279490",
            "name": "Sticky Note"
        }
    ],
    "pinData": [],
    "connections": {
        "Schedule Trigger": {
            "main": [
                [
                    {
                        "node": "RSS Read",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "RSS Read": {
            "main": [
                [
                    {
                        "node": "Limit",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Merge": {
            "main": [
                [
                    {
                        "node": "Set ",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Limit": {
            "main": [
                [
                    {
                        "node": "Merge",
                        "type": "main",
                        "index": 0
                    },
                    {
                        "node": "Groq Summarizer",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Groq Summarizer": {
            "main": [
                [
                    {
                        "node": "Merge",
                        "type": "main",
                        "index": 1
                    }
                ]
            ]
        },
        "Set ": {
            "main": [
                [
                    {
                        "node": "Telegram ",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "active": false,
    "settings": {
        "executionOrder": "v1"
    },
    "versionId": "6dd918e5-16fd-40a4-b753-f5f0723a669e",
    "meta": {
        "templateCredsSetupCompleted": true,
        "instanceId": "ad8b686e4cce2cb62db91b84349cdff2b13ad2261d3b5fa42cf025d21032b6a0"
    },
    "id": "FzI14pZTK3XNMB22",
    "tags": []
}