AI News Editor for Seamless WordPress Publishing - n8n Workflow

Use this advanced n8n workflow to automate news publishing from Telegram RSS feeds. Features GPT-4o rewriting, subtle context editing, dynamic media handling, and instant WordPress posting.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • News agencies and media portals that source content from various channels (like Telegram).

  • Organizations requiring automated content localization and political context application.

  • Technical users and developers looking for robust n8n templates integrating AI editing and CMS publishing.

  • Anyone seeking a scalable n8n solution for high-volume content automation.

Overview

Managing high-volume content feeds and ensuring editorial consistency is a massive challenge. This powerful n8n workflow solves this by establishing an automated, AI-driven editorial pipeline. Instead of simple cross-posting, it leverages the capabilities of GPT-4o to act as a senior editor, rewriting raw feed content into highly structured, context-aware articles complete with SEO metadata and proper HTML formatting. This specific n8n workflow is designed to handle media dynamically—detecting whether a file is an image or video, uploading it to WordPress, and embedding it correctly. By utilizing multiple Telegram RSS feeds as the starting point, this automation ensures your WordPress site stays fresh, relevant, and consistently aligned with your editorial voice, making it a critical asset in advanced content operations.

How it Works

The entire process is initiated by one of the dedicated n8n trigger nodes, specifically the Telegram RSS Feed Read Trigger nodes, which monitor several Telegram channels.


  1. Trigger and Categorization: When a new item is detected by an n8n trigger, it is routed through a specific Set node (e.g., Assign Category - News) that applies the appropriate WordPress category ID and a fallback default image ID based on the source channel.

  2. AI Article Rewriting: The raw article snippet is passed to the Message a model4 n8n node, which uses a GPT-4o system prompt defining the persona of a senior editor. This node performs a complete rewrite, adds subtle pro-democratic context, ensures strict HTML formatting (

    ,

    , ), and outputs the article meta and body in a predefined JSON structure.


  3. Media Processing: Simultaneously, the workflow handles media. An HTTP Request node downloads the image/video file from the Telegram URL. This file is then uploaded to WordPress via a second HTTP Request node. A dedicated Message a model n8n node utilizes GPT-4o to analyze the file's metadata and determine if it is an 'image' or 'video'.

  4. Media ID Assignment: A Switch node routes the flow based on the AI's media detection. It assigns the appropriate featured image ID (either the newly uploaded image ID or the default image ID for videos).

  5. AI Context Enhancement: The rewritten article is passed to the Message a model6 n8n node (Context Editor), which uses the SEO focus keyword generated earlier to add 1-2 sentences of seamless geopolitical context, further aligning the article with democratic values.

  6. Final Publication: All processed data (article content, headline, SEO description, category ID, and media IDs) are merged. An If n8n node checks if a video was detected. If so, a shortcode for an HTML5 video player is inserted into the article content. Finally, the article is published to WordPress using the REST API in the final HTTP Request n8n node.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and import it directly into your n8n instance.

  2. Set up Credentials:

OpenAI: Create an OpenAI credential using your API key. Assign this credential to all three Message a model n8n node instances (GPT-4o nodes).
WordPress API: Create a WordPress API credential (Username/Password or Application Password). Assign this credential to all WordPress HTTP Request n8n node instances.

  1. Configure Triggers: Update the feedUrl parameter in all Telegram RSS Feed Read Trigger n8n nodes with the appropriate RSS links for the channels you wish to monitor (instructions for generating these are provided in the Sticky Note).

  2. Customize Categories and Defaults: Adjust the categoryid and defaultimage_id values in all the Assign Category Set n8n node instances to match your specific WordPress category IDs and fallback media IDs.

  3. Update WordPress URLs: In the HTTP Request nodes responsible for media upload and post publishing, change https://your-wordpress-domain/ to your actual site URL.

  4. Activate: Ensure the n8n workflow is active to begin automatic polling.

Node Details

Telegram RSS Feed Read Trigger (n8n trigger): Initiates the n8n workflow on a schedule (e.g., every hour). Monitors several public Telegram channels via third-party RSS generators.
Assign Category Set (n8n node): Five separate Set nodes assign source-specific metadata, including the WordPress category ID and a default featured image ID, vital for the publishing process.
Message a model4 (OpenAI/GPT-4o): The primary editor n8n node. It applies a complex, multi-step prompt to rewrite the article in a specific tone, structure the output using HTML tags, and return the data in a strict JSON format containing the headline and SEO meta.
HTTP Request (Media Download/Upload): Downloads the media file from the Telegram RSS feed and then uploads it to the WordPress media library using the WordPress API endpoint /wp/v2/media. Requires proper Content-Disposition headers.
Message a model (OpenAI/GPT-4o): Acts as a media detector. Analyzes the downloaded file's mime type to classify it as 'image' or 'video', directing the flow.
Merge2 & Switch (n8n node): Combines the file IDs and routes the flow based on the media type detected, assigning the correct featured image ID or the video ID.
Message a model6 (OpenAI/GPT-4o): The context enhancer n8n node. It reviews the rewritten article and adds specific geopolitical or democratic context based on the extracted focus keyword.
Merge4 (n8n node): Gathers all finalized data points: enhanced article text, media IDs, category IDs, title, and SEO description.
If & Insert HTML5 Video player (n8n node): Conditionally inserts a WordPress shortcode for video playback if the media was identified as a video.
HTTP Request1/HTTP Request3 (n8n node): The final publishing step. Posts the completed, AI-enhanced article to the WordPress API endpoint /wp/v2/posts, setting the title, content, excerpt, category, and featured_media ID.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Automation consultant with 5+ years of experience helping Sales & Marketing teams streamline processes, reduce manual work, and improve efficiency using n8n and other workflow automation tools. I design custom automations, integrate multiple platforms, and optimize complex workflows for scalability and reliability.

Featured*