Post witty daily tweets with Groq, NewsAPI, Google Trends, and X
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on a schedule (every day at 11:00). Along the way it connects X (Formerly Twitter) and Groq Chat Model. It also calls newsapi.org and trends.google.com over HTTP.
How it runs
Trigger: On a schedule (every day at 11:00).
- Check the news (HTTP Request): calls newsapi.org
- Check Google Trends (geo=IN) (HTTP Request): calls trends.google.com
- Normalize News Input (Code): runs custom JavaScript code
- Convert Data Type (XML): converts between XML and JSON
- Merge: merges the data from its input branches
- Normalize Trends Input (Code): runs custom JavaScript code
- Trim Data Items (Code): runs custom JavaScript code
- Smartly Pick the Topic (AI Agent): runs an AI agent, with model: Rank The Topics; memory: Context Window
- Produce an Engaging Tweet (Basic LLM Chain): sends a prompt to an LLM, with model: Create Tweet
- Publish (X (Formerly Twitter)): uses X (Formerly Twitter)
Services it uses
Other X (Twitter) + Groq templates (5)
HTTP calls to: newsapi.org, trends.google.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (11)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Merge
n8n-nodes-base.merge - HTTP Request
n8n-nodes-base.httpRequest - XML
n8n-nodes-base.xml - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - X (Formerly Twitter)
n8n-nodes-base.twitter - No Operation, do nothing
n8n-nodes-base.noOp - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
From the author
Quick overview This workflow runs daily on a schedule, pulls popular stories from NewsAPI and trending topics from Google Trends, uses Groq-hosted LLMs with short-term memory to pick the best overlapping topic, generates a sarcastic tweet, and posts it to X…