Quick overview
Put your X (Twitter) news account on autopilot! This n8n workflow monitors nine financial and technology RSS feeds, ranks fresh stories, filters duplicates, creates AI-powered posts with OpenAI, finds matching Pexels images, and automatically publishes to X. Built-in publication tracking helps prevent repetitive posts.
How it works
- Runs multiple times per day on a scheduled trigger.
- Fetches the latest items from nine RSS sources (Financial Times, MarketWatch, The Verge AI, Google News RSS for Reuters stock stories, CNBC, Nasdaq, and three Investing.com feeds) and combines them into one list.
- Scores items by keyword category, filters to the last hour, and deduplicates similar headlines to produce a ranked shortlist.
- Checks an n8n Data Table to skip stories whose dedupe key has already been published, then selects only one candidate for this execution.
- Uses OpenAI to generate either SKIP or JSON containing a <500-character X post and a Pexels search query, and rejects invalid/overlong outputs.
- Searches Pexels for a matching landscape image, downloads it, uploads the media to X, and publishes the post with the attached image.
- Stores the story metadata and returned X post ID in the n8n Data Table to prevent reposting.
Setup
- Add an OpenAI API credential and select your model in the OpenAI chat model configuration used by the AI agent.
- Add a Pexels API key as an HTTP Header Auth credential (header name Authorization, value is the raw API key) and attach it to the Pexels search request.
- Connect X credentials for both posting (X OAuth2) and media upload (X OAuth 1.0a) and verify your X plan/API access supports the legacy media upload endpoint.
- Create an n8n Data Table named published_news_log with String columns dedupeKey, title, link, category, and tweetId, and select it in both the read and write Data Table steps.
- Review and adjust the schedule/timezone, RSS feed URLs, scoring rules (age cutoff and similarity threshold), and the OpenAI prompt and character limit before enabling the workflow.
Requirements
- An n8n instance supporting AI Agent, OpenAI Chat Model and Data Tables; an OpenAI API key with available billing; an X (Twitter) Developer account with OAuth 2.0 and OAuth 1.0a credentials and API permissions for posting and media uploads; a Pexels API key; and access to the configured RSS feeds. External API costs are not included.
Customization
- Fully customize your X automation: add or replace RSS news sources, adjust posting frequency and timezone, modify news freshness and ranking rules, personalize AI-generated posts, writing style, hashtags and calls to action, change image search preferences, and fine-tune duplicate detection and publication limits to match your content strategy.
Additional info
Ready-to-import n8n automation for X (Twitter) news publishers.
This workflow is designed to automate news discovery, AI-assisted post creation, image selection, and publishing to X.
The template includes a detailed English setup guide to help users configure their own credentials and customize the workflow.
Important: OpenAI and X API usage may involve additional costs. Third-party API subscriptions and credentials are not included.
AI-generated content is not independently fact-checked. Users should verify news accuracy, image suitability, and applicable content rights before enabling unattended publishing.
The workflow is customizable, but successful execution depends on API access, n8n compatibility, and external service availability.
No specific audience growth, impressions, or engagement results are guaranteed.