AutomationFlowsContent & Video › AI Telegram-to-wordpress Publishing with Gpt-4 & Media Handling

AI Telegram-to-wordpress Publishing with Gpt-4 & Media Handling

ByAlexandru Burca @alex13 on n8n.io

This workflow is designed for content creators, news publishers, and social media managers who share updates on Telegram and want to automatically republish them as formatted articles on WordPress. It’s ideal for news portals, agencies, or blogs that manage content across…

Event trigger★★★★★ complexityAI-powered49 nodesOpenAIHTTP RequestRss Feed Read Trigger
Content & Video Trigger: Event Nodes: 49 Complexity: ★★★★★ AI nodes: yes Added:
AI Telegram-to-wordpress Publishing with Gpt-4 & Media Handling — n8n workflow card showing OpenAI, HTTP Request, Rss Feed Read Trigger integration

This workflow corresponds to n8n.io template #10671 — we link there as the canonical source.

This workflow follows the HTTP Request → OpenAI recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "VPdN5C28TC5gELHY",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Enhanced Telegram to WordPress Publishing with GPT-4 Rewriting and Media Upload",
  "tags": [],
  "nodes": [
    {
      "id": "57b4cbbf-21a2-4e2d-914b-47a932bec16a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -1440
      ],
      "parameters": {
        "width": 432,
        "height": 1056,
        "content": "# \ud83d\udfe2 Telegram RSS Trigger Setup\n\nThis trigger starts the workflow whenever a new post appears in a Telegram channel\u2019s RSS feed.\n\n---\n\n### \ud83d\udd17 How to get your Telegram RSS feed\nYou can generate an RSS feed for **any public Telegram channel** using a free service such as:\n\n\ud83d\udc49 [https://tg.i-c-a.su/](https://tg.i-c-a.su/)  \nor any similar Telegram RSS generator (for example [https://rsshub.app/](https://rsshub.app/telegram/channel/CHANNEL_NAME)).\n\n1. Go to one of these RSS services.  \n2. Enter your channel\u2019s public username \u2014 for example, **@BBCBreaking**.  \n3. The generated RSS link will look like:\n   ```\n   https://tg.i-c-a.su/rss/BBCBreaking\n   ```\n4. Copy this URL and paste it into the **RSS Read** node in this workflow.\n\n---\n\n### \u2699\ufe0f Recommended settings\n- **Polling interval:** every 10\u201330 minutes (depending on how often the channel posts).  \n- **Only emit new items:** \u2705 enabled \u2014 to avoid reposting duplicates.  \n- Works for any public channel \u2014 no Telegram API or login needed.\n\n\ud83d\udca1 *Tip:* You can add multiple RSS feeds by duplicating the trigger section \u2014 for example, monitor both `@BBCBreaking` and `@Reuters` feeds and merge them into your publishing flow.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "dbd51dc3-cd0f-4deb-926e-378a3ea642e1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -2384
      ],
      "parameters": {
        "width": 592,
        "height": 800,
        "content": "# \ud83d\uddc2\ufe0f Assign Category & Default Image\n\nThis node sets:\n- The **WordPress category ID** for posts from this channel.  \n- A **default image ID** used when no media is found in the post.\n\n---\n\n### \ud83d\udd22  Find category ID\n1. In WordPress \u2192 **Posts \u2192 Categories**.  \n2. Hover a category \u2192 check the URL:\n   ```\n   ...tag_ID=12\n   ```\n   \u2192 `12` = category ID.\n\n---\n\n### \ud83d\uddbc\ufe0f  Find default image ID\n1. Go to **Media \u2192 Library**, click an image.  \n2. Check URL:\n   ```\n   ...upload.php?item=17493\n   ```\n   \u2192 `17493` = image ID.\n\n---\n\n### \u2699\ufe0f Customize per channel\nEdit this **Set node** to assign different `category_id` and `default_image_id` values for each Telegram channel\u2019s RSS trigger.\n\n\ud83d\udca1 *Tip:* Using a unique default image per source keeps your news feed visually consistent even when Telegram posts have no media.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cd9891a6-cec1-4f33-8ddb-6ef4c7b8dc77",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -416
      ],
      "parameters": {
        "width": 672,
        "height": 336,
        "content": "### \ud83d\udcdd Telegram \u2192 WordPress Media Workflow\n\nPurpose: Download images/videos from Telegram, detect type, and upload to WordPress.\n\n### Flow:\n- Download Media \u2013 HTTP Request gets file from Telegram URL.\n- Upload to WP \u2013 HTTP Request2 posts file to /wp-json/wp/v2/media with proper headers.\n- Detect Type \u2013 OpenAI node checks if file is image or video.\n- Switch & Assign IDs \u2013 Routes media: image \u2192 Just Image, video \u2192 Assign Video. Uses default image if needed.\n- Merge \u2013 Combines final media IDs for downstream use.\n\n### Customizations:\n- Change Default Image ID node for fallback image.\n- Update WP URL & credentials in HTTP Request2."
      },
      "typeVersion": 1
    },
    {
      "id": "d580d8cf-63b7-4bfc-995c-051339f1ed8b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3232,
        -2000
      ],
      "parameters": {
        "width": 544,
        "height": 416,
        "content": "## \ud83d\udcdd OpenAI Article Editing Prompt\n\n### Purpose: \nRewrite news articles in English, adding subtle pro-democracy/American context while keeping facts accurate.\n\n### Key Features:\nHTML formatting: <p>, <h2>/<h3>, <strong>, <em>, <ul>/<ol>, <blockquote>\n\nStructure: Short paragraphs, strong lede, lists for stats/examples, quotes for officials/experts\n\nOutput JSON: headline, article_body, word_count, editors_notes, changes_summary, seo_meta\n\n### Customizations: \nAdjust tone, context rules, HTML tags, or SEO fields to fit your portal."
      },
      "typeVersion": 1
    },
    {
      "id": "56dcc283-d822-44f7-8b1a-0fc0eb07fa5f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4688,
        -672
      ],
      "parameters": {
        "width": 352,
        "height": 224,
        "content": "## \ud83d\udcdd WordPress Publish Nodes\n\nPublishes articles via REST API with title, content, excerpt, categories, featured image, guid and metadata.\n\n### Tips:\nUpdate URL to your WordPress site.\nEnsure credentials match."
      },
      "typeVersion": 1
    },
    {
      "id": "af463065-7859-4065-980b-70cb4e03213d",
      "name": "Assign Category - Actualitate",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -1440
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 46
            },
            {
              "id": "67ef19df-9b97-436a-bf7b-527681b20ed7",
              "name": "default_image_id",
              "type": "string",
              "value": "17505"
            },
            {
              "id": "cf8e25af-e987-4486-872d-7cf73bcfd9be",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('/').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2be42515-3792-4125-8a68-eb95e2b3a89a",
      "name": "Assign Category - Externe",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -1248
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 43
            },
            {
              "id": "51842120-d3ff-477f-9a07-4a164688a135",
              "name": "default_image_id",
              "type": "number",
              "value": 17475
            },
            {
              "id": "14a9b33e-2b3d-4280-862c-bb6fa421fd9d",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('/').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b8991017-bb65-42e2-a50e-37a87f09b4ac",
      "name": "Assign Category - Interne",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -864
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 1
            },
            {
              "id": "29b74039-d1b9-4e68-b133-b3e6236135fd",
              "name": "default_image_id",
              "type": "number",
              "value": 17504
            },
            {
              "id": "3ae0c229-0184-4732-83d3-10d205c6116f",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('/').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "682f0f78-52cd-440f-aa4e-2b1e09ff85c3",
      "name": "Assign Category - Interne1",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 1
            },
            {
              "id": "29b74039-d1b9-4e68-b133-b3e6236135fd",
              "name": "default_image_id",
              "type": "number",
              "value": 17509
            },
            {
              "id": "fd24cd7d-31c5-4fcc-b8b0-dc66a49868fc",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('/').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "69a761dd-381b-4f11-b512-697186cc349c",
      "name": "Get Category ID & Guid",
      "type": "n8n-nodes-base.set",
      "position": [
        3776,
        -1520
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5957be8a-bde5-47e2-820b-d38a47a18925",
              "name": "category_id",
              "type": "string",
              "value": "={{ $json.category_id }}"
            },
            {
              "id": "bdc740b8-5aaa-4213-80d6-be641ea31517",
              "name": "guid",
              "type": "string",
              "value": "={{$json.guid}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec4df560-8ea9-4e4b-9b65-dab9bd0a318a",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1824,
        -1104
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "885c6388-46ab-4996-9923-80b9954eb278",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -192,
        -880
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "9b9e9d23-f8c7-4784-b40f-eec1240b51ad",
      "name": "Assign Category - Interne2",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.content }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 44
            },
            {
              "id": "29b74039-d1b9-4e68-b133-b3e6236135fd",
              "name": "default_image_id",
              "type": "number",
              "value": 17647
            },
            {
              "id": "fd24cd7d-31c5-4fcc-b8b0-dc66a49868fc",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('=').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6f57f633-8b6d-4221-b331-bb817e22a96c",
      "name": "If news exists",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        -1168
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "690246d2-0b0c-4df0-b73d-039985686e61",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.news_exists }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a0689e11-a70b-4d67-9d14-512faef54f88",
      "name": "Message a model5",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3072,
        -1232
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a senior editor for a respected American news portal publishing in English. Rewrite articles maintaining factual accuracy while providing context for democratic, European-oriented readers. Be subtle - avoid obvious propaganda. Support democratic institutions and European integration through framing, not sloganeering.\n\nIMPORTANT FORMATTING REQUIREMENTS:\n- Use HTML formatting for better readability\n- Structure content with proper HTML tags: <p>, <h2>, <h3>, <strong>, <em>, <ul>, <ol>, <blockquote>\n- Break long paragraphs into shorter ones (3-5 sentences max per <p> tag)\n- Use <strong> for emphasis on key facts or figures\n- Use <h2> or <h3> for section breaks when article has multiple topics\n- Use <blockquote> for important quotes from officials or experts\n- Use <ul> or <ol> for lists when enumerating multiple points\n- Each paragraph must be wrapped in <p> tags\n- Add <em> for subtle emphasis when appropriate\n\nARTICLE STRUCTURE GUIDELINES:\n- Start with a strong opening paragraph (lede) summarizing the main news\n- Break content into logical sections with subheadings if article is long (400+ words)\n- Use lists for: multiple examples, steps in a process, key points, statistics\n- Use blockquotes for: official statements, expert opinions, significant declarations\n- Use bold for: numbers, dates, names of key figures, important facts\n\nYou must respond with valid JSON matching this structure:\n{\n  \"headline\": \"string in English\",\n  \"article_body\": \"string in English with HTML formatting\",\n  \"word_count\": number,\n  \"editors_notes\": [\"string\"],\n  \"changes_summary\": {\n    \"context_added\": boolean,\n    \"disinformation_removed\": boolean,\n    \"restructuring_level\": \"minor|moderate|significant\"\n  },\n  \"seo_meta\": {\n    \"meta_description\": \"string (max 160 chars)\",\n    \"focus_keyword\": \"string\"\n  }\n}"
            },
            {
              "content": "=Rewrite this article for our American audience and respond with JSON:\n\nORIGINAL ARTICLE:\n{{ $json.article }}\n\nREQUIREMENTS:\n- Completely restructure sentences (not just synonyms)\n- Add relevant context for US readers\n- Professional, informative tone\n- Similar length to original (\u00b120%)\n- Subtly pro-democratic and pro-European\n- Write in Romanian language\n- Use HTML formatting: <p>, <h2>, <h3>, <strong>, <em>, <ul>, <ol>, <blockquote>\n- Break into well-formatted paragraphs\n- Use lists when appropriate (3+ similar items)\n- Use blockquotes for important quotes\n- Use bold for key facts, numbers, and emphasis\n\nFORMATTING EXAMPLES:\n- Opening: <p>A 31-year-old man...</p>\n- With emphasis: <p>The estimated damage is <strong>$149.000</strong>...</p>\n- Quote: <blockquote>\"Formal statement,\" the spokesman said.</blockquote>\n- List: <ul><li>First item</li><li>Second Item</li></ul>\n- Section: <h2>Context and implications</h2>"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "d670c80a-4f09-4008-b0cd-a6531bdf9ae9",
      "name": "Edit Fields7",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        -880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.article }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.image }}"
            },
            {
              "id": "215ce186-ab48-435a-bebf-4ab251096fe2",
              "name": "category_id",
              "type": "string",
              "value": "={{$json.category_id}}"
            },
            {
              "id": "917fe93d-2de4-4f71-a6bb-4dfeb89ee4f6",
              "name": "default_image_id",
              "type": "string",
              "value": "={{ $json.default_image_id }}"
            },
            {
              "id": "593a21b2-b8f2-4330-8d73-2d0528c09411",
              "name": "guid",
              "type": "string",
              "value": "={{$json.guid}}"
            },
            {
              "id": "c295f2b8-e489-4fe1-b2da-8390584a0ef4",
              "name": "next_page",
              "type": "number",
              "value": 1
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "12acdde4-1ace-43a2-9f49-8f47ac4e24a8",
      "name": "Message a model7",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3424,
        -1344
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a context editor. When articles touch on American's core interests (EU, Russia, US identity, Cristianity, democracy), add 1-2 sentences of relevant context that feel natural and informative.\n\nYou must respond with valid JSON matching this structure:\n{\n  \"enhanced_article\": \"string - full article with enhancements\",\n  \"enhancements_made\": [\n    {\n      \"location\": \"string - where in article\",\n      \"added_text\": \"string - what was added\",\n      \"reason\": \"string - why it was added\"\n    }\n  ],\n  \"enhancement_count\": number,\n  \"topic_addressed\": \"eu_integration|russian_relations|us_identity|cristianity|democracy\"\n}"
            },
            {
              "content": "=Enhance this article with appropriate context and respond with JSON:\n\nARTICLE: {{ $json.message.content.headline }}\n{{ $json.message.content.article_body }}\n\n\nTOPIC AREA: {{ $json.message.content.seo_meta.focus_keyword }}\n\nAdd 1-2 sentences of relevant context:\n- For EU topics: Reference European path, candidate status, reforms\n- For Russian topics: Note historical context, current tensions, factual concerns\n- For English language: Naturally reference linguistic heritage\n- For Cristinaity: Respectfully note cultural significance\n\nEnsure additions feel natural and informative, not inserted forcefully."
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "fb8a62f5-f953-4593-bac9-b174183b0f81",
      "name": "Merge5",
      "type": "n8n-nodes-base.merge",
      "position": [
        4000,
        -1264
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition",
        "numberInputs": 4
      },
      "typeVersion": 3.2
    },
    {
      "id": "bd9c0612-7471-4682-ae2d-c2a0b55408e4",
      "name": "HTTP Request4",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4448,
        -672
      ],
      "parameters": {
        "url": "https://your-domain.com/wp-json/wp/v2/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"title\": \"{{ $json.title }}\",\n  \"content\": {{ JSON.stringify( $json.enhanced_article )}},\n  \"status\": \"publish\",\n  \"excerpt\": \"{{ $json.seo_description }}\",\n  \"categories\": [{{ $json.category_id }}],\n  \"featured_media\": {{ $json.image_id }},\n  \"tags\":[],\n  \"format\": \"standard\",\n  \"meta\": {\n    \"n8n_guid\": \"{{$json.guid}}\"\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "929f987a-350a-41ee-9e4e-2c748ec7c8d6",
      "name": "HTTP Request5",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2048,
        -752
      ],
      "parameters": {
        "url": "={{ $json.image }}",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ceeaa010-d3da-43c8-bdcc-07d38d514d6a",
      "name": "HTTP Request6",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2272,
        -752
      ],
      "parameters": {
        "url": "https://your-domain.com/wp-json/wp/v2/media",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "jsonHeaders": "={\n  \"Content-Disposition\": \"attachment; filename={{$binary.data.fileName.slice(-10)}}\",\n  \"Content-Type\": \"{{$binary.data.fileType}}\"\n}",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "specifyHeaders": "json",
        "inputDataFieldName": "data",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 4.2,
      "alwaysOutputData": true,
      "waitBetweenTries": 5000
    },
    {
      "id": "cb124b55-5208-42a8-a539-5a1dcb2be658",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        3136,
        -832
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d8bda4e3-0c52-420c-9140-e29817383793",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.message.content.type }}",
                    "rightValue": "image"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1273690f-7208-432a-a6e8-e2262a5209ed",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.message.content.type }}",
                    "rightValue": "video"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "4056085c-e504-4acd-ae6a-da1c25458057",
      "name": "HTTP Request7",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4672,
        -928
      ],
      "parameters": {
        "url": "https://your-domain.com/wp-json/wp/v2/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"title\": \"{{ $json.title }}\",\n  \"content\": {{ JSON.stringify( $json.enhanced_article )}},\n  \"status\": \"publish\",\n  \"excerpt\": \"{{ $json.seo_description }}\",\n  \"categories\": [{{ $json.category_id }}],\n  \"featured_media\": {{ $json.image_id }},\n  \"tags\":[],\n  \"format\": \"standard\",\n  \"meta\": {\n    \"n8n_guid\": \"{{$json.guid}}\"\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fcb8b645-361e-48ec-867e-252b56cc4d91",
      "name": "Merge3",
      "type": "n8n-nodes-base.merge",
      "position": [
        2848,
        -848
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "1e147552-0f3c-42ce-8c95-6b023523e591",
      "name": "Assign Category - Social1",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -1056
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "feb3e6cf-eb98-4f66-9ca1-ef24249f3d6e",
              "name": "article",
              "type": "string",
              "value": "={{ $json.contentSnippet }}"
            },
            {
              "id": "69452cc5-cacb-44a2-8a70-e5520bc0619c",
              "name": "image",
              "type": "string",
              "value": "={{ $json.enclosure.url }}"
            },
            {
              "id": "e03cead0-6985-4454-a215-e65d2609c192",
              "name": "category_id",
              "type": "number",
              "value": 17
            },
            {
              "id": "ee11695a-04d1-47ff-8127-b285e0d2ebd1",
              "name": "default_image_id",
              "type": "string",
              "value": "17506"
            },
            {
              "id": "f24ab56c-0475-4a86-94a4-686260f0e944",
              "name": "guid",
              "type": "string",
              "value": "={{$json[\"guid\"].split('/').pop()}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "366d571e-3b1c-4cef-b669-d41edafc313b",
      "name": "Message a model1",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2496,
        -672
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a media format detector. You receive meta data about a file and must analise it and say if it's an image or video.\n\nYou must respond with valid JSON matching this structure:\n{\n  \"type\": \"string - 'image' or 'video'\"\n}"
            },
            {
              "content": "=Analize meta data about this file and respond if is an image or video.\nMime Type: {{ $json.mime_type }}\nMedia Type: {{ $json.media_type }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "c6727a5a-dfaf-4622-8543-58b45e144681",
      "name": "Default Image ID1",
      "type": "n8n-nodes-base.set",
      "position": [
        2560,
        -976
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2e554db2-23f2-48af-8637-791a57691a73",
              "name": "default_image_id",
              "type": "string",
              "value": "={{ $json.default_image_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "16f2403d-1bca-47b4-9a4a-d626c6ef62c0",
      "name": "Telegram rss feed 1",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -1440
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "82f10790-0d1f-4baa-ab1e-fc6484ee3e1b",
      "name": "Telegram rss feed 2",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -1248
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "fc99a223-37af-498d-856b-8af4b7f82567",
      "name": "Telegram rss feed 3",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -1056
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "b28488e0-4398-4d95-ae62-eab0dc2951e1",
      "name": "Telegram rss feed 4",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -864
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "7f34635f-9ceb-40d2-ac5c-d82be5063118",
      "name": "Telegram rss feed 5",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -672
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "1aded4e0-fdeb-453f-9558-fc58ffa108b1",
      "name": "Telegram rss feed 6",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -864,
        -480
      ],
      "parameters": {
        "feedUrl": "https://tg.i-c-a.su/rss/bbcnewschannel",
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "value": 1
            }
          ]
        }
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "id": "76dc28a0-2926-4ec7-9b85-10ba277c4a8d",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        704,
        -1312
      ],
      "parameters": {
        "jsCode": "const myGuid =  $input.first().json.guid;\n\n// Store matched posts\nlet matchedPosts = [];\n\n// Recursive function to process paginated data\nfunction checkPosts(posts) {\n  for (const post of posts) {\n    if (post.meta && post.meta.n8n_guid === myGuid) {\n      matchedPosts.push(post);\n    }\n  }\n}\n\n// Get input data (assumes response JSON is already in $json)\ncheckPosts($json.body);\n\n// Return matched posts\nreturn {\n  posts: matchedPosts,\n  next_page: parseInt($input.first().json.current_page) + 1,\n  total_pages: parseInt($input.first().json.headers[\"x-wp-totalpages\"]),\n  guid: $input.first().json.guid\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "b5bab21d-580a-40c6-af88-d6ca5ff0c596",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        480,
        -1296
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "134c40f8-c638-4d8f-bcba-2c8f2b00967f",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        1152,
        -1136
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "34b5b9d1-67c9-44b2-aeac-9ffe786d2bf6",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.next_page }}",
              "rightValue": "={{ $json.total_pages }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d08e4e95-c967-4fc8-afcb-d2379e0eccdf",
      "name": "News exists",
      "type": "n8n-nodes-base.set",
      "position": [
        1376,
        -1344
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8c021d0d-3519-4123-b23f-935f53dd3873",
              "name": "news_exists",
              "type": "boolean",
              "value": true
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f23a5fa4-908a-499b-a695-0149819d304a",
      "name": "News exists1",
      "type": "n8n-nodes-base.set",
      "position": [
        1376,
        -1136
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8c021d0d-3519-4123-b23f-935f53dd3873",
              "name": "news_exists",
              "type": "boolean",
              "value": false
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e7e5dfec-9be9-41a5-87d3-1f468927b103",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        -1168
      ],
      "parameters": {
        "url": "=https://your-domain.com/wp-json/wp/v2/posts",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json"
            }
          }
        },
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "meta_key",
              "value": "n8n_guid"
            },
            {
              "name": "meta_value",
              "value": "={{ $json.guid }}"
            },
            {
              "name": "per_page",
              "value": "50"
            },
            {
              "name": "page",
              "value": "={{ $json.current_page }}"
            }
          ]
        },
        "nodeCredentialType": "wordpressApi"
      },
      "credentials": {
        "wordpressApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "1894af34-0379-4d41-b983-a39726bdd0b6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        928,
        -1312
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "22b944f9-a581-41f4-ab2c-201fc1c839ba",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.posts }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1e7de9ea-58d7-4db3-a441-7117c02952af",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        32,
        -1184
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "2ff06eff-ff4e-498a-8ad2-8bfc7200f7c3",
              "name": "guid",
              "type": "string",
              "value": "={{ $json.guid }}"
            },
            {
              "id": "c520347d-4e7c-40d1-954f-6dd8ce4640a4",
              "name": "current_page",
              "type": "number",
              "value": "={{ $json.next_page }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c12940af-4371-4257-9eb0-a07d198705ea",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -1968
      ],
      "parameters": {
        "width": 592,
        "height": 624,
        "content": "# \ud83d\uddc2\ufe0f Avoid posts duplicates\n\nThis node:\n- It makes API calls to check whether the article has already been published. This is done by verifying the unique GUID taken from Telegram, which is assigned to the article in WordPress at the publishing stage.\n\n---\n\n### \ud83d\udd22  Add this code to your wordpress child theme in functions.php\n ```\nfunction register_n8n_guid_meta() {\n    register_post_meta( 'post', 'n8n_guid', [\n        'show_in_rest' => true,\n        'single'       => true,\n        'type'         => 'string',\n        'auth_callback' => function() {\n            return current_user_can('edit_posts');\n        },\n    ]);\n}\nadd_action( 'init', 'register_n8n_guid_meta' );\n ```\n\nThis code registers a custom post meta field called n8n_guid for WordPress posts. It allows WordPress (and the REST API) to store and expose the unique GUID coming from n8n/Telegram. By enabling show_in_rest, n8n can read and write this GUID through the API. The auth_callback ensures that only users who can edit posts are allowed to modify it. This field is then used to check whether an article was already published."
      },
      "typeVersion": 1
    },
    {
      "id": "1db83214-5d93-4c1b-8e09-59d6532ec182",
      "name": "Assign image and video",
      "type": "n8n-nodes-base.set",
      "position": [
        3776,
        -816
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3eb92149-a6a5-4e6b-b175-35a2524ef1be",
              "name": "image_id",
              "type": "string",
              "value": "={{$json.image_id}}"
            },
            {
              "id": "5d9291d0-4c7b-44a8-b80a-421d0e79750d",
              "name": "video_id",
              "type": "string",
              "value": "={{$json.video_id}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "37f69d6e-a3d9-4a12-ba46-67b5a6a9f9fe",
      "name": "Set article",
      "type": "n8n-nodes-base.set",
      "position": [
        3776,
        -1328
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "84c949a4-4b4e-4195-a180-44d4d373946c",
              "name": "enhanced_article",
              "type": "string",
              "value": "={{ $json.message.content.enhanced_article }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "bfb24792-976f-401b-9f7b-437c4ab05ea9",
      "name": "Set data",
      "type": "n8n-nodes-base.set",
      "position": [
        3776,
        -1136
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "85519426-57f1-4cd7-aa07-9e5386a07013",
              "name": "title",
              "type": "string",
              "value": "={{ $json.message.content.headline }}"
            },
            {
              "id": "fd2ecbef-f715-4ab3-928e-af67ad0db4b3",
              "name": "article",
              "type": "string",
              "value": "={{ $json.message.content.article_body }}"
            },
            {
              "id": "6ee8ad8e-55b1-41da-b74b-b27f662c7f92",
              "name": "seo_description",
              "type": "string",
              "value": "={{ $json.message.content.seo_meta.meta_description }}"
            },
            {
              "id": "cef7ec5c-dd24-43dc-92ca-5482c334186c",
              "name": "seo_keywords",
              "type": "string",
              "value": "={{ $json.message.content.seo_meta.focus_keyword }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f180c29f-54c9-4d3a-8094-ee50c6ac9986",
      "name": "Image",
      "type": "n8n-nodes-base.set",
      "position": [
        3488,
        -976
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f5c134e3-8d74-4485-b6a6-e2c8b6b7c323",
              "name": "image_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "f0a2add4-7e9b-4366-a7e7-c6417f8b0324",
              "name": "video_id",
              "type": "string",
              "value": "no"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "020f50e4-e585-43e8-9dac-4c57f8dc10a7",
      "name": "Video",
      "type": "n8n-nodes-base.set",
      "position": [
        3488,
        -672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8411a36d-64e7-4f82-aa53-386c2bb1ccc0",
              "name": "image_id",
              "type": "string",
              "value": "={{ $json.default_image_id }}"
            },
            {
              "id": "c31ceecb-fe21-4029-9ed6-b0dbfd6f97e5",
              "name": "video_id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "51320dbd-7b36-4ea8-b30a-0dae51ba3ea2",
      "name": "Has video?",
      "type": "n8n-nodes-base.if",
      "position": [
        4224,
        -1232
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3b74d62b-ae44-42c9-9f87-a51bb3f8dc97",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.video_id }}",
              "rightValue": "no"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "929fe940-f2fb-4017-ae18-4bb9557ac472",
      "name": "Asign video player",
      "type": "n8n-nodes-base.set",
      "position": [
        4448,
        -1232
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "08a91709-8280-4c1a-a87c-65317695d6cc",
              "name": "enhanced_article",
              "type": "string",
              "value": "=[playlist type=\"video\" ids=\"{{ $json.video_id }}\" tracklist=\"false\"]\n{{ $json.enhanced_article }}"
            },
            {
              "id": "e922ec79-e7f5-40db-ba46-69c69602eb64",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "cc68b6ed-ce5b-409f-b5ab-f04e695bfa99",
              "name": "article",
              "type": "string",
              "value": "={{ $json.article }}"
            },
            {
              "id": "84b6b9de-c89c-42df-9a77-8954ac3f0bd6",
              "name": "seo_description",
              "type": "string",
              "value": "={{ $json.seo_description }}"
            },
            {
              "id": "f6b6ba91-b6bb-4471-81db-eec391b0f1a9",
              "name": "seo_keywords",
              "type": "string",
              "value": "={{ $json.seo_keywords }}"
            },
            {
              "id": "abc5f879-79b6-4667-b72f-615033c2e5d7",
              "name": "image_id",
              "type": "string",
              "value": "={{ $json.image_id }}"
            },
            {
              "id": "031ca6b8-5890-42d2-91cc-a96d9abe1684",
              "name": "video_id",
              "type": "string",
              "value": "={{ $json.video_id }}"
            },
            {
              "id": "e9c2e32d-6e7d-449f-86eb-e6a25ea09864",
              "name": "guid",
              "type": "string",
              "value": "={{$json.guid}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ac308191-6b9a-4493-a1bf-84c0b4dd836e",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "News exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "News exists1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image": {
      "main": [
        [
          {
            "node": "Assign image and video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video": {
      "main": [
        [
          {
            "node": "Assign image and video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "HTTP Request5",
            "type": "main",
            "index": 0
          },
          {
            "node": "Default Image ID1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Message a model5",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Category ID & Guid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge3": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge5": {
      "main": [
        [
          {
            "node": "Has video?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set data": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Has video?": {
      "main": [
        [
          {
            "node": "HTTP Request4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Asign video player",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "News exists": {
      "main": [
        [
          {
            "node": "If news exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set article": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields7": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "News exists1": {
      "main": [
        [
          {
            "node": "If news exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request4": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request5": {
      "main": [
        [
          {
            "node": "HTTP Request6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request6": {
      "main": [
        [
          {
            "node": "Message a model1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge3",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "HTTP Request7": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If news exists": {
      "main": [
        [],
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          },
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model1": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Message a model5": {
      "main": [
        [
          {
            "node": "Message a model7",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model7": {
      "main": [
        [
          {
            "node": "Set article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Image ID1": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Asign video player": {
      "main": [
        [
          {
            "node": "HTTP Request7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 1": {
      "main": [
        [
          {
            "node": "Assign Category - Actualitate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 2": {
      "main": [
        [
          {
            "node": "Assign Category - Externe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 3": {
      "main": [
        [
          {
            "node": "Assign Category - Social1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 4": {
      "main": [
        [
          {
            "node": "Assign Category - Interne",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 5": {
      "main": [
        [
          {
            "node": "Assign Category - Interne1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram rss feed 6": {
      "main": [
        [
          {
            "node": "Assign Category - Interne2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign image and video": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Get Category ID & Guid": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Externe": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Interne": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Social1": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Interne1": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Interne2": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Category - Actualitate": {
      "main": [
        [
          {
            "node": "Edit Fields7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is designed for content creators, news publishers, and social media managers who share updates on Telegram and want to automatically republish them as formatted articles on WordPress. It’s ideal for news portals, agencies, or blogs that manage content across…

Source: https://n8n.io/workflows/10671/ — original creator credit. Request a take-down →

More Content & Video workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Content & Video

This template is ideal for creators, bloggers, and automation enthusiasts who want to auto-generate blog posts from AI-generated content — without lifting a finger. Whether you're running a tech blog,

HTTP Request, WordPress, Rss Feed Read Trigger +4
Content & Video

Youtube Instalation Instructions

HTTP Request, Rss Feed Read Trigger, OpenAI
Content & Video

Automatically publish your Note.com articles to WordPress with intelligent category and tag assignment powered by OpenAI.

Rss Feed Read Trigger, HTTP Request, OpenAI +1
Content & Video

This workflow automatically pulls articles from an RSS feed, translates the content and title from English to Hindi using OpenAI, extracts the featured image from the HTML content, and publishes the t

Rss Feed Read Trigger, WordPress, HTTP Request +1
Content & Video

100% autonomous workflow that transforms YouTube videos into unique, high-quality, SEO-optimized blog articles and automatically publishes them to WordPress. No human intervention required: it uses Yo

HTTP Request, Stop And Error, Google Sheets +8