Automate Twitter sentiment analysis with OpenAI, Google Sheets, and Slack alerts
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs on a schedule (every 6 hours). Along the way it connects OpenAI, Google Sheets, Slack and OpenAI Chat Model. It also calls api.apify.com over HTTP.
How it runs
Trigger: On a schedule (every 6 hours).
- Request for Twitter Post via Apify (HTTP Request): calls api.apify.com (POST)
- Get Requested Post from Apify (HTTP Request): calls api.apify.com
- Set Field for Loop (Edit Fields (Set)): sets 3 fields: id, tweet_url, tweet_text
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Get Post Data (Google Sheets): uses Google Sheets
- If: checks a condition and branches into true / false
- Sentiment Analyst (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
- Switch: routes items into 3 branches
- OpenAI: uses OpenAI
- Send negative post message on slack (Slack): uses Slack
…plus 1 more step. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Sheets + Slack templates (1,314) · Other OpenAI + Slack templates (979)
HTTP calls to: api.apify.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.
Nodes used (12)
- Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - OpenAI
@n8n/n8n-nodes-langchain.openAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Sheets
n8n-nodes-base.googleSheets - AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Slack
n8n-nodes-base.slack - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - If
n8n-nodes-base.if
From the author
✅ What problem does this workflow solve? Tracking what people say about your brand on Twitter can be overwhelming, especially when important mentions slip through the cracks. This workflow automates the process: it scrapes Twitter mentions, analyzes sentiment…