This n8n workflow automates the process of finding, summarizing, and posting breaking news headlines on X (formerly Twitter). It combines Google Custom Search for finding the latest news articles with Groq's LLaMA 3 model to generate short, engaging headlines — complete with hashtags — and posts them on your X account.
🔧 Features
Custom topic support (e.g., "AI", "health", "technology")
Automated scheduling every few hours
Google Custom Search to find the most recent news articles
Groq LLaMA3-based headline generation with hashtags
Auto-post to X (Twitter)
Built-in credential separation for API keys and access tokens
📦 Included Nodes
Schedule Trigger
Set (Set Topic, Google API Key, Custom Search CX, etc.)
HTTP Request (Google Search API)
Code Node (Format prompt and extract article data)
HTTP Request (Groq API for headline generation)
Twitter Node (Post to X)
⚙️ How It Works (Step-by-Step)
Trigger
Set Topic
Build Search Query
Google API Config
Search for News
Generate Prompt for AI
Groq AI Request
Post to Twitter (X)
✅ Requirements
Google API Key
Google Custom Search Engine (CX)
Groq API Key
Twitter Developer App with OAuth2 credentials
💡 Customization Tips
Change the topic in the Set Topic node to anything you like.
Adjust the posting frequency in the Schedule Trigger node.
Modify prompt behavior in the Function node to fit a specific tone or brand voice.
Add logging, filtering, or multiple post variations as needed.