{
  "id": "du1fv20FN8DuwRDt",
  "name": "Automate RSS News to Telegram with AI & Watermarking",
  "tags": [
    {
      "id": "lQFVXsZEDnn3k8MC",
      "name": "second",
      "createdAt": "2025-10-09T17:26:35.146Z",
      "updatedAt": "2025-10-09T17:26:35.146Z"
    }
  ],
  "nodes": [
    {
      "id": "8fa8b035-6389-4f14-a4df-83c0f584972c",
      "name": "RSS Feed Trigger",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -704,
        -64
      ],
      "parameters": {
        "feedUrl": "https://www.kinonews.ru/rss/",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 15
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6af807ee-80f8-443b-8b7d-0e99d353298c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        256
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "ce613464-b4b7-4e14-9cb8-1d4651bc7ef4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        -192
      ],
      "parameters": {
        "width": 496,
        "height": 528,
        "content": "**Automated Telegram RSS Publisher**\n\nThis workflow posts new articles from an RSS feed to your Telegram channel with AI-enhanced text and a watermarked image.\n\n**How it works:**\n\n1. Detects new RSS articles.\n2. Checks if the link was already processed.\n3. Skips duplicates and updates Google Sheet.\n4. Uses AI to rewrite the article text.\n5. Fetches and watermarks the article image.\n6. Publishes the result to Telegram.\n\n**Use Case:**\nKeep your Telegram channel updated with fresh, AI-polished content.\n\n**Requirements:**\n\n* RSS feed access\n* Google Sheet for tracking links\n* AI Agent for text rewriting\n* Telegram bot token\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7ce96e59-ef61-4301-b340-6795858607ce",
      "name": "Check Processed Links",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        -64
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 538399553,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ/edit#gid=538399553",
          "cachedResultName": "kinonews.ru"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ/edit?usp=drivesdk",
          "cachedResultName": "table with links"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e508358b-fb69-4f54-909e-9cb0085c3130",
      "name": "Check: Is Link New?",
      "type": "n8n-nodes-base.if",
      "position": [
        -288,
        -64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "8abe7fb7-1c01-4203-aff7-2fa559481e0c",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.url }}",
              "rightValue": "={{ $('RSS Feed Trigger').item.json.link }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1f930403-e7c1-470d-a629-b12123a3261f",
      "name": "Skip: Link Already Processed",
      "type": "n8n-nodes-base.noOp",
      "position": [
        48,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "51db324b-16b3-4f43-b6a0-261a4e396b31",
      "name": "Update Processed Links",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        240,
        144
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $('RSS Feed Trigger').item.json.link }}",
            "row_number": 2
          },
          "schema": [
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 538399553,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ/edit#gid=538399553",
          "cachedResultName": "kinonews.ru"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1MhbaPSqLRXsJfeR-2JlvrIyFxvprgkmzIE5bib7-7MQ/edit?usp=drivesdk",
          "cachedResultName": "table with links"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "2fd4688a-0755-44b2-9529-2d1574126031",
      "name": "Customize Article Text",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        608,
        48
      ],
      "parameters": {
        "text": "=[empty]",
        "options": {
          "systemMessage": "=You are a news editor for a Telegram channel. Your responsibilities include only adding beautiful formatting to the news text\u2014without changing the actual text. If the original text exceeds 700 characters, condense it in a way that preserves the meaning and ensures the text never exceeds 700 characters.\n\nUse Telegram's built-in formatting options, such as **Bold** and *Italic*, as well as appropriate emojis.\n\nCreate a beautifully formatted version of the news titled:\n\"{{ $('RSS Feed Trigger').item.json.title }}\"\n\n---\n{{ $('RSS Feed Trigger').item.json.content }}\n\n---\nThe response should be a ready-to-publish text."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "164937d7-bd71-485b-914b-5a2d7cacb0a9",
      "name": "Fetch Article Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        48
      ],
      "parameters": {
        "url": "={{ $('RSS Feed Trigger').item.json.enclosure.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "db962616-df18-4495-b996-48051486dd3c",
      "name": "Add Watermark to Image",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1168,
        -96
      ],
      "parameters": {
        "text": "AI.NEWS",
        "options": {
          "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf"
        },
        "fontSize": 48,
        "fontColor": "#F3ECEC",
        "operation": "text",
        "positionY": 150,
        "dataPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "2172e82f-9e7e-4332-b789-53a07d15de63",
      "name": "Publish to Telegram Channel",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1376,
        48
      ],
      "parameters": {
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {
          "caption": "={{ $json.output }}",
          "parse_mode": "Markdown"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "da30499e-2da4-4462-9489-8d894668373e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 1128,
        "height": 476,
        "content": "**1. Detect & Filter New Articles**\nMonitors the RSS feed and checks Google Sheet to skip already processed links.\nIf new \u2014 updates the sheet and continues."
      },
      "typeVersion": 1
    },
    {
      "id": "d088eb2b-6d2c-4d9c-8770-c5e3b5150064",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 424,
        "height": 412,
        "content": "**2\ufe0f. Enhance & Prepare Content**\nAI rewrites the article text for clarity and engagement."
      },
      "typeVersion": 1
    },
    {
      "id": "16b4bf7f-35b4-401f-a92f-128cfcd4bc25",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -176
      ],
      "parameters": {
        "color": 7,
        "width": 584,
        "height": 428,
        "content": "**3\ufe0f. Publish to Telegram**\nThen fetches the main image and adds a watermark.\nSends the final image and text to your Telegram channel automatically."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "53f54220-d242-43c9-af7b-f4f3d7b12a9e",
  "connections": {
    "RSS Feed Trigger": {
      "main": [
        [
          {
            "node": "Check Processed Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Customize Article Text",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check: Is Link New?": {
      "main": [
        [
          {
            "node": "Skip: Link Already Processed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Processed Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Article Image": {
      "main": [
        [
          {
            "node": "Add Watermark to Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Processed Links": {
      "main": [
        [
          {
            "node": "Check: Is Link New?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Watermark to Image": {
      "main": [
        [
          {
            "node": "Publish to Telegram Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customize Article Text": {
      "main": [
        [
          {
            "node": "Fetch Article Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Processed Links": {
      "main": [
        [
          {
            "node": "Customize Article Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}