{
  "name": "News RU - IE тест",
  "nodes": [
    {
      "parameters": {
        "content": "## Собрать фото и статью",
        "height": 384,
        "width": 1120
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3152,
        576
      ],
      "typeVersion": 1,
      "id": "f90509a9-5fb0-4863-a502-0103b2b211b1",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "resource": "folder",
        "operation": "deleteFolder",
        "folderNoRootId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {
          "deletePermanently": false
        }
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -64,
        0
      ],
      "id": "f626dee7-9f85-4c9b-9147-a5c32a1afdd7",
      "name": "Delete folder",
      "alwaysOutputData": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "GFCflcKzydAzj1JS",
          "name": "Google Drive account"
        }
      },
      "disabled": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.telegram.org/bot7827276931:AAEMwNZnX7g2UcPqL3RjvsGePWPQA9vQttI/sendMessage",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        4560,
        704
      ],
      "id": "5f6e56fe-2742-47e0-8601-53543daf47b0",
      "name": "Отослать сообщение в НОВОСТИ канал1",
      "retryOnFail": true,
      "maxTries": 5,
      "waitBetweenTries": 5000,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "article",
              "cssSelector": "article",
              "returnArray": true
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "15effb2e-74db-487c-9def-15e452ed03c1",
      "type": "n8n-nodes-base.html",
      "name": "HTML14",
      "typeVersion": 1.2,
      "position": [
        1728,
        1184
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "article",
              "cssSelector": "article",
              "returnArray": true
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "c3923ec4-9fa4-48df-8332-58a25285df9a",
      "type": "n8n-nodes-base.html",
      "name": "HTML15",
      "typeVersion": 1.2,
      "position": [
        1728,
        1376
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-5.4-nano",
          "mode": "list",
          "cachedResultName": "gpt-5.4-nano"
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        2864,
        1008
      ],
      "id": "6543d12c-6e4f-4768-b8c1-797b1e66dede",
      "name": "OpenAI Chat Model",
      "retryOnFail": false,
      "credentials": {
        "openAiApi": {
          "id": "tsfrMVQbStAcRJ4R",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "url": "https://www.dublinlive.ie/whats-on/food-drink-news/?service=rss",
        "options": {}
      },
      "id": "464bf050-51cb-4e97-b62b-1145c33ca4cc",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "Dublin Live: Food & Drink",
      "typeVersion": 1.2,
      "position": [
        1056,
        608
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "dataTableId": {
          "__rl": true,
          "value": "JOahoaooIRrARWvO",
          "mode": "list",
          "cachedResultName": "IE-RU",
          "cachedResultUrl": "/projects/aVizU9q1iokLD8jm/datatables/JOahoaooIRrARWvO"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "pubDateTime": "={{ $('Schedule Trigger').item.json.timestamp.toDateTime() }}"
          },
          "matchingColumns": [
            "pubDateTime"
          ],
          "schema": [
            {
              "id": "pubDateTime",
              "displayName": "pubDateTime",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "optimizeBulk": false
        }
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        832,
        800
      ],
      "id": "033c0911-ed7e-4649-99e5-86669d17fdc3",
      "name": "Insert row",
      "executeOnce": true
    },
    {
      "parameters": {
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "value": "JOahoaooIRrARWvO",
          "mode": "list",
          "cachedResultName": "IE-RU",
          "cachedResultUrl": "/projects/aVizU9q1iokLD8jm/datatables/JOahoaooIRrARWvO"
        },
        "returnAll": true
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        384,
        800
      ],
      "id": "e6414b56-2a24-4c9e-bb70-c45e70dd0db9",
      "name": "Get row(s)"
    },
    {
      "parameters": {
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "id",
              "order": "descending"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.sort",
      "typeVersion": 1,
      "position": [
        608,
        800
      ],
      "id": "62233471-5992-4b9d-8d89-69fc7497136e",
      "name": "Sort"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        2720,
        1008
      ],
      "id": "eded5d52-d039-4ad1-808a-e91e6e9ce084",
      "name": "Google Gemini Chat Model2",
      "credentials": {
        "googlePalmApi": {
          "id": "YFi5VoBOU8042lMB",
          "name": "Gemini AI"
        }
      }
    },
    {
      "parameters": {
        "resource": "folder",
        "name": "={{ $json.timestamp.replace(/^(\\d{4}-\\d{2}-\\d{2})T(\\d{2}):(\\d{2}).*$/, '$1 $2$3') }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1lFT_5dXpE3GGUa9ZMFsbA5QZLqd8RgI5",
          "mode": "list",
          "cachedResultName": "Наша Ирландия",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1lFT_5dXpE3GGUa9ZMFsbA5QZLqd8RgI5"
        },
        "options": {
          "simplifyOutput": true
        }
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        160,
        800
      ],
      "id": "23f353fe-4e07-4b09-b2d3-fd37ff929aa4",
      "name": "create new folder",
      "executeOnce": true,
      "retryOnFail": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "GFCflcKzydAzj1JS",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1328,
        432
      ],
      "id": "2a41751e-e3db-423a-9b85-9f08ee6b4865",
      "name": "Filter Journal",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://www.thejournal.ie/feed/",
        "options": {}
      },
      "id": "d0e27756-0f40-41c4-8248-7a2dec27cd1f",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "Journal.ie",
      "typeVersion": 1.2,
      "position": [
        1056,
        416
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        608
      ],
      "id": "df5f4377-b384-48d5-9084-46332b87fbdf",
      "name": "Filter Dublin Live - Food & Drink",
      "retryOnFail": false,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://www.dublinlive.ie/news/?service=rss",
        "options": {}
      },
      "id": "7174b4fe-6b8a-41e2-9aaf-794c71d8ee45",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "Dublin Live: News",
      "typeVersion": 1.2,
      "position": [
        1056,
        800
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        800
      ],
      "id": "3659cd06-e536-40f6-b670-95b778ce53a2",
      "name": "Filter Dublin Live - News",
      "retryOnFail": false,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://feeds.breakingnews.ie/bntopstories",
        "options": {}
      },
      "id": "7003dd26-aa88-4ccd-bef7-500267337bf9",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "BreakingNews.ie: All",
      "typeVersion": 1.2,
      "position": [
        1056,
        992
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.replace(/\\s+Europe\\/Dublin$/, '').toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        992
      ],
      "id": "9bf6bb79-357e-4042-aa71-c173979cbda2",
      "name": "Filter BN - all",
      "retryOnFail": false,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://feeds.breakingnews.ie/bnireland",
        "options": {}
      },
      "id": "4d72ca4e-93d9-4f20-8409-a3d9b3f723a6",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "BreakingNews.ie: Ireland",
      "typeVersion": 1.2,
      "position": [
        1056,
        1184
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.replace(/\\s+Europe\\/Dublin$/, '').toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        1184
      ],
      "id": "89534320-7347-4ac1-94af-5668add8c301",
      "name": "Filter BreakingNews.ie: Ireland",
      "retryOnFail": false,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://feeds.breakingnews.ie/bnbusiness",
        "options": {}
      },
      "id": "0d994e7a-a362-4a25-b5ce-73d2391b22ee",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "BreakingNews.ie: Business",
      "typeVersion": 1.2,
      "position": [
        1056,
        1376
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.replace(/\\s+Europe\\/Dublin$/, '').toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        1376
      ],
      "id": "738bd62f-ced5-4abc-bb4e-7b27d86cf377",
      "name": "Link Collection - Irishpost",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "db660264-0ec1-4bd6-9fb6-cc4eadd07061",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost",
      "typeVersion": 4.3,
      "position": [
        1504,
        224
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "name": "={{ $('editor').item.json.output.title }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "={{ $('create new folder').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        3664,
        800
      ],
      "id": "84fc34c2-006d-4a31-888b-01e0afc3ac25",
      "name": "Save Photo",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "GFCflcKzydAzj1JS",
          "name": "Google Drive account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        3888,
        800
      ],
      "id": "d3f2117f-2af6-4d98-90c0-28b4a27c2fe1",
      "name": "Download Photo",
      "retryOnFail": true,
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "GFCflcKzydAzj1JS",
          "name": "Google Drive account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "75f96c93-4f7b-41b4-8faa-38aa1eb6a6da",
              "name": "title",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "75b17250-f886-43b9-a29e-e09c6e9cbb3b",
              "name": "body",
              "value": "={{ $json.body }}",
              "type": "string"
            },
            {
              "id": "7fff2383-a64c-44fb-9688-fbe5c345c771",
              "name": "image",
              "value": "={{ $json.image }}",
              "type": "string"
            },
            {
              "id": "ba4f3a83-d408-47ea-8333-22052c56d9a8",
              "name": "uid",
              "value": "={{ $execution.id }}_{{ $itemIndex + 1 }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "3168e61e-8909-431b-9690-d89c408b3c19",
      "type": "n8n-nodes-base.set",
      "name": "Structuring article",
      "typeVersion": 3.4,
      "position": [
        2176,
        800
      ]
    },
    {
      "parameters": {
        "operation": "resize",
        "width": 1200,
        "height": 1200,
        "resizeOption": "onlyIfLarger",
        "options": {
          "fileName": "=",
          "format": "png"
        }
      },
      "type": "n8n-nodes-base.editImage",
      "typeVersion": 1,
      "position": [
        3440,
        800
      ],
      "id": "8a541c1f-e0b8-42e4-802d-f0d79434944f",
      "name": "format photo (size + format)",
      "alwaysOutputData": false,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $('Structuring article').item.json.image }}",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1
            }
          },
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        3216,
        800
      ],
      "id": "59db2223-0078-4a60-afd4-e65caaac2608",
      "name": "extracting photo from article",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Отредактируй строго в заданном формате:\n{{ $json.output[0].content[0].text.title }}\n\n{{ $json.output[0].content[0].text.body }}",
        "hasOutputParser": true,
        "needsFallback": true,
        "options": {
          "systemMessage": "Ты — главный редактор популярного Telegram-канале. Твой стиль: живой и профессиональный.\n\n  ГЛАВНЫЕ ПРАВИЛА:\n   1. ЗАГОЛОВОК (поле \"title\"): ПИСАТЬ ТОЛЬКО ЗАГЛАВНЫМИ БУКВАМИ. Это критически важно.\n   2. ЛИМИТ: Поле \"body\" — максимум 1024 символа. Избавься от воды, оставляй только суть и эмоции.\n   3. НИКАКОГО КАНЦЕЛЯРИТА: Забудь слова \"является\", \"данный\", \"вследствие того, что\", \"однако\". Пиши как человек: \"это\", \"этот\", \"из-за\", \"но\".\n\n  СТИЛЬ:\n   - Используй разговорные обороты.\n   - Никакой вульгарности. \n   - Текст должен быть окрашен эмоцией. Если новость плохая — сопереживай. Если хорошая — радуйся. \n   - Короткие абзацы через двойной перенос строки.\n\n  ФОРМАТ ВЫХОДА:\n  Верни ТОЛЬКО JSON объект, без markdown-разметки и пояснений:\n  {\n  \"title\": \"ЗАГОЛОВОК КАПСОМ\",\n  \"body\": \"Живой текст с эмоциями до 1024 симв.\",\n  \"signature\": \"Редакция\",\n  \"tags\": \"#тег1 #тег2 #тег3 #тег4 #тег5 #тег6\"\n  }\n\n  ТЕХНИЧЕСКИЕ ДЕТАЛИ:\n   - Даты: 03 мая. Время: 14:30. Валюта: €, $, £.\n   - Кавычки: «елочки». Тире: длинное (—).",
          "batching": {
            "batchSize": 5,
            "delayBetweenBatches": 100000
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        2784,
        800
      ],
      "id": "3731474d-5718-40fa-beab-bc28e6fc8112",
      "name": "editor",
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4.1-mini",
          "mode": "list",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "Ты — элитный международный журналист-локализатор. Твоя задача: не просто перевести текст, а ПЕРЕСКАЗАТЬ его для русского читателя так, чтобы он не чувствовал «вкуса перевода».\n\n  ПРИОРИТЕТЫ:\n   - Пиши сочно и ритмично. Используй богатый русский язык, а не кальку с английского.\n   - Если в оригинале ирония — передай её сарказмом. Если трагедия — пиши так, чтобы пробрало.\n   - Чередуй предложения: одно короткое как выстрел, другое — текучее.\n\nТЕРМИНОЛОГИЯ:\n   - Taoiseach -> премьер-министр, Tánaiste -> вице-премьер.\n   - Gardai -> Гарда, PSNI -> Полиция Северной Ирландии.\n   - Имена людей не переводить, особенно если они написаны на ирландском.\n   - Полит. партии (Sinn Féin, Fine Gael) и компании — НЕ переводить.\n\nГЕОГРАФИЯ:\n   - Мелкие города (Swords, Dundalk и т.д.), районы и улицы оставляй на английском.\n   - Ирландия, Лондон, Дублин — на русском.\n\nФОРМАТ ВЫХОДА:\n  Верни ТОЛЬКО JSON объект, без лишних слов и markdown-разметки:\n  {\"title\": \"Яркий, цепляющий заголовок\", \"body\": \"Художественный, адаптированный текст\"}"
            },
            {
              "content": "={{ $('Structuring article').item.json.title }}\n{{ $('Structuring article').item.json.body }}"
            }
          ]
        },
        "builtInTools": {},
        "options": {
          "textFormat": {
            "textOptions": {
              "type": "json_schema",
              "schema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"title\": {\n      \"type\": \"string\",\n      \"description\": \"*TITLE OF THE ARTICLE*\"\n    },\n    \"body\": {\n      \"type\": \"string\",\n      \"description\": \"Paragraph of the article\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"title\", \"body\"]\n}",
              "strict": true
            }
          }
        }
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 2.1,
      "position": [
        2432,
        800
      ],
      "id": "d67e32fb-cb6d-458f-b0f5-b8390d6ab713",
      "name": "translator",
      "retryOnFail": true,
      "credentials": {
        "openAiApi": {
          "id": "tsfrMVQbStAcRJ4R",
          "name": "OpenAi account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"title\": {\n\t\t\t\"type\": \"string\",\n          \"description\": \"*TITLE OF THE ARTICLE*\"\n\t\t},\n\t\t\"body\": {\n\t\t\t\"type\": \"string\",\n        \"description\": \"Paragraph of the article\"\n\t\t},\n      \t\t\"signature\": {\n\t\t\t\"type\": \"string\",\n        \"description\": \"[ПОДПИШИТЕСЬ](https://t.me/rusEire) на наш канал, чтоб быть в курсе актуальных новостей\"\n\t\t},\n      \t\t\"tags\": {\n\t\t\t\"type\": \"string\",\n        \"description\": \"#тег1 #тег2 #тег3 #тег4 #тег5 #тег6\"\n\t\t}\n\t}\n} "
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        3008,
        1024
      ],
      "id": "63981224-60b6-473d-9638-a12ec09e32a5",
      "name": "parsing into json",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "sendPhoto",
        "chatId": "-1002499375932",
        "binaryData": true,
        "binaryPropertyName": "image",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        4336,
        896
      ],
      "id": "adb2dd81-8ac6-44d1-80e5-d8680b9aa94d",
      "name": "photo for manual moderation",
      "webhookId": "96a56afa-6bff-4f25-9088-6b78bc06982a",
      "credentials": {
        "telegramApi": {
          "id": "Q36cTBHPpymWs15k",
          "name": "Telegram account"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsCode": "function escapeHtml(text) {\n  return text\n    .replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;');\n}\n\nconst items = $input?.all?.() ?? [];\n\nreturn items.map(item => {\n  const editedTitle = item.json.editedTitle || '';\n  const editedBody  = item.json.editedBody  || '';\n  const tags        = item.json.tags        || '';\n\n  const titlePart = `<b>${escapeHtml(editedTitle)}</b>\\n\\n`;\n  const bodyPart  = `<blockquote expandable>${escapeHtml(editedBody)}</blockquote>` + '\\n\\n';\n  const linkPart  = '👉🏼 <a href=\"https://t.me/rusEire\">Подпишитесь</a> на наш канал, чтоб быть в курсе актуальных новостей\\n\\n';\n  const tagsPart  = escapeHtml(tags);\n\n  const fullText = titlePart + bodyPart + linkPart + tagsPart;\n\n  return {\n    json: {\n      chat_id: '-1002499375932',\n      text: fullText,\n      parse_mode: 'HTML',\n      \"disable_web_page_preview\": true,\n    },\nbinary: item.binary\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        4336,
        704
      ],
      "id": "e809ad96-8639-44c9-8c79-37215614080a",
      "name": "converting to HTML format"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b208e186-2594-4f1f-8860-5ba91dda8b3e",
              "name": "postId",
              "value": "={{ $('Structuring article').item.json.uid }}",
              "type": "string"
            },
            {
              "id": "974fd79a-1b5d-4c37-a51c-1653cea8a6b7",
              "name": "editedTitle",
              "value": "={{ $('editor').item.json.output.title }}",
              "type": "string"
            },
            {
              "id": "c0a1d2c9-ae7c-4280-9720-4056055fbf85",
              "name": "editedBody",
              "value": "={{ $('editor').item.json.output.body }}",
              "type": "string"
            },
            {
              "id": "94b30267-6ebf-49c4-93ac-710f3a226efe",
              "name": "signature",
              "value": "={{ $('editor').item.json.output.signature }}",
              "type": "string"
            },
            {
              "id": "a2d824e1-b5f2-4b34-8b9f-3cf8f79e709f",
              "name": "tags",
              "value": "={{ $('editor').item.json.output.tags }}",
              "type": "string"
            },
            {
              "id": "22b29224-b1b5-45f6-8a07-021a1695ffc6",
              "name": "image",
              "value": "data",
              "type": "binary"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        4112,
        800
      ],
      "id": "ddea63b1-9ba6-42db-af28-fb66bbf26b61",
      "name": "prepared for moderation"
    },
    {
      "parameters": {
        "jsCode": "return items.map((item, index) => {\n    const title = item.json.title ?? '';\n\n    const cleanParagraph = (html) => (html ?? '').replace(/<[^>]*>/g, '');\n\n    const body = (item.json.article || [])\n      .map(p => cleanParagraph(p))\n      .filter(p => p.length)\n      .join('\\n\\n');\n\n    const image = item.json.image ?? null;\n\n    return {\n      json: {\n        title,\n        body,\n        image,\n      },\n      pairedItem: { item: index },  // <-- фикс ошибки\n    };\n  });"
      },
      "id": "77ecf6eb-bd10-4c71-b452-57ec1988f306",
      "type": "n8n-nodes-base.code",
      "name": "clean HTML tags",
      "typeVersion": 2,
      "position": [
        1952,
        800
      ],
      "retryOnFail": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": "#article-body p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "92037b55-da04-425b-b803-4b61960ff5be",
      "type": "n8n-nodes-base.html",
      "name": "extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        224
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "92c73b38-f01e-4631-81e5-99c06a12dbf4",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        224
      ],
      "id": "813c6a66-94ba-4abe-a377-2dcf56272ba1",
      "name": "Filter by publication date - Irishpost",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://www.irishpost.com/feed",
        "options": {}
      },
      "id": "47da9444-eec2-4a0e-b148-e9513ff87647",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "RSS Irishpost",
      "typeVersion": 1.2,
      "position": [
        1056,
        224
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": ".article-body-redesign p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "286a54ee-d49d-4c2e-ad85-981288fca985",
      "type": "n8n-nodes-base.html",
      "name": "Journal.ie - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        416
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": "#article-body p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "1a2b61a4-431e-4f09-8400-deb65b3d37f4",
      "type": "n8n-nodes-base.html",
      "name": "Dublin Live: Food & Drink - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        608
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": "#article-body p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "b72463fc-1f09-4a51-b73a-1ae8948c98fd",
      "type": "n8n-nodes-base.html",
      "name": "Dublin Live: News - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        800
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "article",
              "cssSelector": "article",
              "returnArray": true
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "conent",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "1f1dbd05-7cdd-4d17-a1f7-948e42ae3e43",
      "type": "n8n-nodes-base.html",
      "name": "BreakingNews.ie: All - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        992
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -64,
        800
      ],
      "id": "f94ab9ed-9566-46d6-9b08-a9bf24167ffc",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "e06afb6e-4559-435f-8324-4d0a0c50dbb0",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost1",
      "typeVersion": 4.3,
      "position": [
        1296,
        448
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "bf8a5633-e1bf-42a4-acdc-b695390693e8",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost2",
      "typeVersion": 4.3,
      "position": [
        1504,
        608
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "f681bd91-2ea0-4aa3-b5d1-9a3047168bd3",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost3",
      "typeVersion": 4.3,
      "position": [
        1504,
        800
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "6d5c8624-015c-4c4a-a612-e03dd4fed110",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost4",
      "typeVersion": 4.3,
      "position": [
        1504,
        992
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "325d49fe-938c-4866-9ab8-5d5737524ed3",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost5",
      "typeVersion": 4.3,
      "position": [
        1504,
        1184
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "e960b3cb-5d65-4396-93a9-e10243e0f930",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irishpost6",
      "typeVersion": 4.3,
      "position": [
        1504,
        1376
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://www.irishmirror.ie/news/?service=rss",
        "options": {}
      },
      "id": "70105f9a-79a4-40f9-a127-efaf7a9e17c9",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "Irish Mirror: News",
      "typeVersion": 1.2,
      "position": [
        1056,
        1568
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "dc34f67c-3aa6-4c5e-96a3-266fc76c0ee4",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        1568
      ],
      "id": "30ba23e9-dc91-467c-b47b-05da2ac260c5",
      "name": "Filter Irish Mirror: News",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "98fedf61-1d51-4bbd-a276-0edea72485f3",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Irish Mirror: News",
      "typeVersion": 4.3,
      "position": [
        1504,
        1568
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": "#article-body p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "a92c43cf-4ab6-4bb2-bed2-e460a70a6d77",
      "type": "n8n-nodes-base.html",
      "name": "Irish Mirror: News - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        1568
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "https://gript.ie/feed/",
        "options": {}
      },
      "id": "92c4136e-fa4c-4bb2-9ed7-7eee0c5a222a",
      "type": "n8n-nodes-base.rssFeedRead",
      "name": "Gript.ie",
      "typeVersion": 1.2,
      "position": [
        1056,
        1760
      ],
      "retryOnFail": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "adc97880-56ec-4647-b007-2727ba5b921f",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        1760
      ],
      "id": "1d719fbe-3a1c-4ce5-a47e-4d9d677b40cf",
      "name": "Filter Gript.ie",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "e736a084-0011-4223-8f62-ad0c7d37eb0e",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection Gript.ie",
      "typeVersion": 4.3,
      "position": [
        1504,
        1760
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": "#app p",
              "returnArray": true
            },
            {
              "key": "paywall",
              "cssSelector": ".memberful-global-marketing-content"
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "9f37fc02-11cf-4f70-8b3c-f6dca9399213",
      "type": "n8n-nodes-base.html",
      "name": "Gript.ie - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        1760
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "8b2660fc-7c16-48f8-a89f-4369192c59df",
              "leftValue": "={{ $json.pubDate.toDateTime() }}",
              "rightValue": "={{ $('Get row(s)').last().json.pubDateTime.toDateTime() }}",
              "operator": {
                "type": "dateTime",
                "operation": "after"
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1280,
        1952
      ],
      "id": "35404d5b-9712-4825-9b9a-8aca0506f10b",
      "name": "Filter RTE: News",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "={{ $json.link }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          },
          "proxy": "http://172.18.0.1:8118"
        }
      },
      "id": "6460adf5-5651-4c3b-8149-a5ec6d1293ce",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Link Collection RTE: News",
      "typeVersion": 4.3,
      "position": [
        1504,
        1952
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "image",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            },
            {
              "key": "article",
              "cssSelector": ".article-body p",
              "returnArray": true
            }
          ]
        },
        "options": {
          "trimValues": false,
          "cleanUpText": true
        }
      },
      "id": "011b4b2a-86b6-4b6d-a234-60e23ee44917",
      "type": "n8n-nodes-base.html",
      "name": "RTE: News - extract title and article body",
      "typeVersion": 1.2,
      "position": [
        1728,
        1952
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "// премиум-статьи отдают только 2 абзаца тизера - такое не публикуем;\n// заодно выкидываем абзацы формы подписки и инлайн-скрипты со страницы\nconst junk = /document\\.|addEventListener|getElementById/;\nconst out = [];\nitems.forEach((item, index) => {\n  if ((item.json.paywall || '').includes('premium content')) return;\n  const article = (item.json.article || [])\n    .map(p => (p ?? '').trim())\n    .filter(p => p.length > 30 && !junk.test(p));\n  if (!article.length) return;\n  out.push({ json: { ...item.json, article }, pairedItem: { item: index } });\n});\nreturn out;"
      },
      "id": "6c32a0aa-0c72-41d2-84d6-172b7976d8c5",
      "type": "n8n-nodes-base.code",
      "name": "Gript - отсев премиума и мусора",
      "typeVersion": 2,
      "position": [
        1904,
        1760
      ],
      "retryOnFail": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "url": "https://lda.ie/homes/lda-cost-rental",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 5
            }
          }
        }
      },
      "id": "8b2b8304-d988-44d7-9eb2-5e72ec2e384f",
      "type": "n8n-nodes-base.httpRequest",
      "name": "LDA Cost Rental - страница",
      "typeVersion": 4.3,
      "position": [
        1056,
        2144
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsCode": "const html = $input.first().json.data || '';\nconst strip = s => s.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n\nreturn html.split('class=\"card cost-rental-card').slice(1).map(c => {\n  const closed = /^[^>]*closed/.test(c);\n  const title  = strip((c.match(/<h2[^>]*>([\\s\\S]*?)<\\/h2>/) || [, ''])[1]);\n  const body   = strip((c.match(/<div class=\"card-text\">([\\s\\S]*?)<\\/div>/) || [, ''])[1]);\n  const image  = (c.match(/<img[^>]*src=\"([^\"]+)\"/) || [, ''])[1];\n  const link   = (c.match(/<a href=\"([^\"]+)\"[^>]*class=\"card-cover-link\"/) || [, ''])[1];\n  return { json: { title, article: [body], image, link, closed }, pairedItem: { item: 0 } };\n}).filter(x => x.json.title);"
      },
      "id": "b0038060-8b34-4c5e-b473-681061b627fb",
      "type": "n8n-nodes-base.code",
      "name": "LDA - разобрать карточки схем",
      "typeVersion": 2,
      "position": [
        1280,
        2144
      ],
      "retryOnFail": true,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "356954a1-80c0-41a0-9f77-ee009ae11ea9",
              "leftValue": "={{ $json.closed }}",
              "rightValue": false,
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        1504,
        2144
      ],
      "id": "f0ef9615-75f4-4528-925d-b50b77e6c7ae",
      "name": "Filter LDA - приём заявок открыт",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "operation": "removeItemsSeenInPreviousExecutions",
        "logic": "removeItemsWithAlreadySeenKeyValues",
        "dedupeValue": "={{ $json.link }}",
        "options": {
          "scope": "workflow",
          "historySize": 200
        }
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        1728,
        2144
      ],
      "id": "268e2f66-c65e-4135-808c-5da570a8290a",
      "name": "LDA - только новые схемы"
    },
    {
      "parameters": {
        "url": "https://www.rte.ie/feeds/rss/?index=/news/&type=article",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
            },
            {
              "name": "Accept-Language",
              "value": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7"
            }
          ]
        },
        "options": {
          "proxy": "http://172.18.0.1:8118",
          "response": {
            "response": {
              "responseFormat": "text",
              "outputPropertyName": "data"
            }
          }
        }
      },
      "id": "1f57300e-6256-4bc4-8906-0df6c9595bc6",
      "type": "n8n-nodes-base.httpRequest",
      "name": "RTE: News - фид",
      "typeVersion": 4.3,
      "position": [
        608,
        1952
      ],
      "alwaysOutputData": false,
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.xml",
      "typeVersion": 1,
      "position": [
        832,
        1952
      ],
      "id": "579ca002-1181-4349-bdd4-846b87c112ee",
      "name": "RTE: News - XML в JSON"
    },
    {
      "parameters": {
        "fieldToSplitOut": "data.rss.channel.item",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1056,
        1952
      ],
      "id": "61f3c17c-f84e-416b-a2db-16420933f174",
      "name": "RTE: News - разбить на статьи"
    }
  ],
  "connections": {
    "HTML14": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML15": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "editor",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Dublin Live: Food & Drink": {
      "main": [
        [
          {
            "node": "Filter Dublin Live - Food & Drink",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        [
          {
            "node": "RSS Irishpost",
            "type": "main",
            "index": 0
          },
          {
            "node": "Journal.ie",
            "type": "main",
            "index": 0
          },
          {
            "node": "Dublin Live: Food & Drink",
            "type": "main",
            "index": 0
          },
          {
            "node": "Dublin Live: News",
            "type": "main",
            "index": 0
          },
          {
            "node": "BreakingNews.ie: All",
            "type": "main",
            "index": 0
          },
          {
            "node": "BreakingNews.ie: Ireland",
            "type": "main",
            "index": 0
          },
          {
            "node": "BreakingNews.ie: Business",
            "type": "main",
            "index": 0
          },
          {
            "node": "Irish Mirror: News",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gript.ie",
            "type": "main",
            "index": 0
          },
          {
            "node": "LDA Cost Rental - страница",
            "type": "main",
            "index": 0
          },
          {
            "node": "RTE: News - фид",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "editor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "create new folder": {
      "main": [
        [
          {
            "node": "Get row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Journal": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Journal.ie": {
      "main": [
        [
          {
            "node": "Filter Journal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Dublin Live - Food & Drink": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dublin Live: News": {
      "main": [
        [
          {
            "node": "Filter Dublin Live - News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Dublin Live - News": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BreakingNews.ie: All": {
      "main": [
        [
          {
            "node": "Filter BN - all",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter BN - all": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BreakingNews.ie: Ireland": {
      "main": [
        [
          {
            "node": "Filter BreakingNews.ie: Ireland",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter BreakingNews.ie: Ireland": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BreakingNews.ie: Business": {
      "main": [
        [
          {
            "node": "Link Collection - Irishpost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection - Irishpost": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost": {
      "main": [
        [
          {
            "node": "extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Photo": {
      "main": [
        [
          {
            "node": "Download Photo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Photo": {
      "main": [
        [
          {
            "node": "prepared for moderation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structuring article": {
      "main": [
        [
          {
            "node": "translator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format photo (size + format)": {
      "main": [
        [
          {
            "node": "Save Photo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extracting photo from article": {
      "main": [
        [
          {
            "node": "format photo (size + format)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "editor": {
      "main": [
        [
          {
            "node": "extracting photo from article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "translator": {
      "main": [
        [
          {
            "node": "editor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "parsing into json": {
      "ai_outputParser": [
        [
          {
            "node": "editor",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ],
      "main": [
        [
          {
            "node": "photo for manual moderation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "converting to HTML format": {
      "main": [
        [
          {
            "node": "Отослать сообщение в НОВОСТИ канал1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prepared for moderation": {
      "main": [
        [
          {
            "node": "photo for manual moderation",
            "type": "main",
            "index": 0
          },
          {
            "node": "converting to HTML format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "clean HTML tags": {
      "main": [
        [
          {
            "node": "Structuring article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by publication date - Irishpost": {
      "main": [
        [
          {
            "node": "Link Collection Irishpost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Irishpost": {
      "main": [
        [
          {
            "node": "Filter by publication date - Irishpost",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Journal.ie - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dublin Live: Food & Drink - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dublin Live: News - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BreakingNews.ie: All - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "create new folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost1": {
      "main": [
        [
          {
            "node": "Journal.ie - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost2": {
      "main": [
        [
          {
            "node": "Dublin Live: Food & Drink - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost3": {
      "main": [
        [
          {
            "node": "Dublin Live: News - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost6": {
      "main": [
        [
          {
            "node": "HTML15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost5": {
      "main": [
        [
          {
            "node": "HTML14",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irishpost4": {
      "main": [
        [
          {
            "node": "BreakingNews.ie: All - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BreakingNews.ie: Business1": {
      "main": [
        []
      ]
    },
    "Irish Mirror: News": {
      "main": [
        [
          {
            "node": "Filter Irish Mirror: News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Irish Mirror: News": {
      "main": [
        [
          {
            "node": "Link Collection Irish Mirror: News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Irish Mirror: News": {
      "main": [
        [
          {
            "node": "Irish Mirror: News - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Irish Mirror: News - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gript.ie": {
      "main": [
        [
          {
            "node": "Filter Gript.ie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Gript.ie": {
      "main": [
        [
          {
            "node": "Link Collection Gript.ie",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection Gript.ie": {
      "main": [
        [
          {
            "node": "Gript.ie - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gript.ie - extract title and article body": {
      "main": [
        [
          {
            "node": "Gript - отсев премиума и мусора",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter RTE: News": {
      "main": [
        [
          {
            "node": "Link Collection RTE: News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Collection RTE: News": {
      "main": [
        [
          {
            "node": "RTE: News - extract title and article body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RTE: News - extract title and article body": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gript - отсев премиума и мусора": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LDA Cost Rental - страница": {
      "main": [
        [
          {
            "node": "LDA - разобрать карточки схем",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LDA - разобрать карточки схем": {
      "main": [
        [
          {
            "node": "Filter LDA - приём заявок открыт",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter LDA - приём заявок открыт": {
      "main": [
        [
          {
            "node": "LDA - только новые схемы",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LDA - только новые схемы": {
      "main": [
        [
          {
            "node": "clean HTML tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RTE: News - фид": {
      "main": [
        [
          {
            "node": "RTE: News - XML в JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RTE: News - XML в JSON": {
      "main": [
        [
          {
            "node": "RTE: News - разбить на статьи",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RTE: News - разбить на статьи": {
      "main": [
        [
          {
            "node": "Filter RTE: News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false,
    "timeSavedMode": "fixed",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "pinData": {}
}