πŸ“Š Automate Twitter sentiment analysis with OpenAI, Google Sheets, and Slack alerts

⚑ 446 views Β· πŸ“Š Market Research & Insights

πŸ’‘ Pro Tip β€” Twitter’s API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.

View All Scrapers

Description

βœ… 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 using OpenAI, logs everything in a Google Sheet, and sends real-time Slack alerts for negative tweets. No manual monitoring needed.


βš™οΈ What does this workflow do?

  1. Runs on a schedule to monitor Twitter mentions or hashtags.
  2. Uses Apify to scrape tweets based on brand keywords.
  3. Filters out tweets already processed (avoids duplicates).
  4. Performs sentiment analysis with OpenAI (Positive, Neutral, Negative).
  5. Logs tweet content, sentiment, and reply (if any) in a Google Sheet.
  6. Sends an instant Slack notification for negative tweets.
  7. Generates thank-you replies for positive tweets and logs them.

πŸ”§ Setup Instructions

πŸ—“ Schedule Trigger

🐦 Apify Twitter Scraper Setup

πŸ€– OpenAI Sentiment Analysis

πŸ“„ Google Sheet Configuration

Prepare a Google Sheet with this sample format.

Connect it using the Google Sheets node in n8n.

πŸ’¬ Slack Notifications


🧠 How it Works

1. Scheduled Run

Triggered at a fixed interval using the Schedule (Cron) node.

2. Scrape Mentions from Twitter

3. Filter Previously Seen Tweets

4. Analyze Sentiment with OpenAI

5. Store Results in Google Sheet

6. Notify Slack for Negative Tweets


πŸ‘€ Who can use this?

This workflow is ideal for:

Stay ahead of your brand’s reputationβ€”automatically.


πŸ›  Customization Ideas


πŸš€ Ready to get started?

Just plug in:

Then deploy the workflow, and let it monitor Twitter for you!

πŸ”— Nodes Used

Google Sheets, HTTP Request, Slack, Schedule Trigger, AI Agent, OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup