Back to Templates

Auto-Publish News to Social Media with AI Search & SerpAPI to Telegram, Facebook, Twitter & WordPress

Created by

Created by: DevCode Journey || devcodejourney

DevCode Journey

Last update

Last update 20 hours ago

Share


Who Is This For?

This n8n workflow is designed for news publishers, Telegram, Facebook, X/twitter, Wodpress owners, and content curators who want to automatically fetch and share the latest news on a specific topic directly to a Telegram, Facebook, X/twitter, wodpress.
It uses LangChain AI, SerpAPI, and HTTP tools to retrieve original full-text news content, verify accuracy, and distribute it automatically — without any manual effort.

What This Workflow Does

  • Automatically triggers on a fixed schedule (e.g., every few hours)
  • Retrieves the latest full news article about a given topic
  • Uses OpenAI + SerpAPI to locate the freshest relevant news source
  • Extracts and returns the exact article text (no summaries or rewrites)
  • Sends the news directly to your Telegram, Facebook, X/twitter, wodpress
  • Skips sending if no news is found
  • Allows optional use of Google Docs or Gemini for content fallback
  • Keeps AI context using memory buffer for efficient, accurate retrieval

Key Features

  • Automated News Delivery: Sends the latest topic-specific news to Telegram automatically
  • AI-Powered Search: Uses LangChain and SerpAPI for real-time web content discovery
  • Full Article Retrieval: Extracts and outputs original published text (not summaries)
  • Socila Media Integration: Sends news to your specified Telegram, Facebook, X/twitter, wodpress.
  • Conditional Logic: Skips message delivery if no new news is found
  • Error-Free Control Flow: Includes “Do Nothing” and “Wait” nodes to maintain stability
  • Flexible Topic Control: Topic can be changed directly from the “Set” node
  • Multi-Tool AI Environment: Combines OpenAI (GPT-4.1-mini), HTTP Requests, SerpAPI, and Google Docs

Requirements

  • OpenAI: API key
  • Telegram account and a bot token with access to your channel/group
  • Facebook Page app access token with app ID
  • X/twitter app access token with app secret
  • Wordpress Author Name or ID, Username, Password, and your domain with ssl
  • SerpAPI account (for Google search integration)
  • Google account (for optional Docs integration)
  • n8n Cloud or self-hosted instance with LangChain AI nodes enabled
  • (Optional) Gemini API access for backup news retrieval

How to Use — Step-by-Step Setup

Credentials Setup

  • OpenAI: API key
  • Telegram API: Connect your Telegram account using a bot token (BotFather)
  • Facebook Page create a app and get access token with app ID
  • X/twitter create a simple app access token with app secret
  • Wordpress Author Name or ID, Username, Password, and your domain with ssl
  • SerpAPI: Add your SerpAPI API key under credentials (used by the SerpAPI node)
  • Google Docs OAuth2: Connect Google Docs if you wish to use document retrieval as a backup

AI Agent Setup

  • The AI Agent1 node is the workflow’s brain.

  • It uses the system message:

    “You are a search engine. Your job is to retrieve the latest full news as requested by the user.”

  • It searches reliable sources such as Google and, if necessary, uses SerpAPI and OpenAI to find accessible full-text news content.

  • The output is returned exactly as published.

Important Notes

  • Topic Control: Update the “Set” node whenever you want to change the monitored topic.
  • For post Add longer delays between messages if you expand this for multiple topics.
  • Language Output: The “If” node currently checks output text in Bengali (News not found). Update it to your preferred language if needed.
  • Privacy: The workflow only scrapes publicly available news text and does not store personal data.
  • Error Handling: The workflow gracefully handles empty or failed results without crashing.

Useful Links

🙋 For Help & Community

In Summary
This workflow is a fully automated AI-powered news-fetcher and Telegram, Facebook, X/twitter, wodpress broadcaster.
It runs on schedule, searches for new articles about your chosen topic, retrieves and sends the full text directly to Telegram, Facebook, X/twitter, wodpress — ensuring your audience stays updated in real time with zero manual work.