Slack + Google Sheets for Twitter sentiment alerts
Keeping up with Twitter mentions sounds simple until it’s not. One busy afternoon and the “quick check” turns into an endless scroll, missed complaints, and a late-night scramble to respond.
This hits social media managers first, but PR leads and founders feel it too. Twitter sentiment alerts stop you from finding out about negative mentions after they’ve already spread.
This workflow watches for brand mentions, scores sentiment with AI, logs everything in Google Sheets, and pings Slack when something needs attention. You’ll see what it does, what you get, and how to run it without living in Twitter.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Slack + Google Sheets for Twitter sentiment alerts
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "OpenAI", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Get Post Data", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "Sentiment Analyst", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch According Analyst", pos: "b", h: 48 }
n6@{ icon: "mdi:database", form: "rounded", label: "Add Post Data", pos: "b", h: 48 }
n7@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n8@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Field for Loop", pos: "b", h: 48 }
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Send negative post message o.."]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Request for Twitter Post via.."]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Requested Post from Apify"]
n12@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n13@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If Duplicate", pos: "b", h: 48 }
n1 --> n6
n13 --> n0
n13 --> n4
n6 --> n0
n3 --> n13
n0 --> n3
n7 --> n10
n12 -.-> n4
n4 --> n5
n8 --> n0
n2 -.-> n4
n5 --> n1
n5 --> n9
n5 --> n6
n11 --> n8
n10 --> n11
n9 --> n6
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n7 trigger
class n1,n2,n4 ai
class n12 aiModel
class n5,n13 decision
class n3,n6 database
class n10,n11 api
classDef customIcon fill:none,stroke:none
class n9,n10,n11 customIcon
The Problem: Twitter Mentions Slip Through the Cracks
Manual Twitter monitoring fails in a very predictable way. You check mentions when you remember, you reply to the obvious ones, and you assume you “handled it.” Then a negative tweet gets traction, somebody tags your product name with a typo you didn’t search, or a customer complaint lands right after your last check. Now you’re reacting late, without context, and you’re copying links into Slack or spreadsheets like it’s 2012. The worst part is the mental load: you’re always slightly worried you missed something important.
The friction compounds. Here’s where it breaks down.
- You waste about 30 minutes a day jumping between searches, notifications, and screenshots.
- Mentions get handled in DMs or threads, but nothing is logged, so patterns never surface.
- Duplicates and repeat checks creep in, which means you review the same tweets again and again.
- Negative posts don’t feel urgent until they are, and by then you’ve lost the best window to respond calmly.
The Solution: Scheduled Sentiment Logging + Slack Alerts
This workflow runs on a schedule (hourly is common) and searches Twitter for mentions of your brand keywords or hashtags using Apify. When results come back, it loops through tweets, checks your Google Sheet to see if each tweet has already been processed, and skips anything you’ve already handled. For new tweets, it uses OpenAI to classify sentiment as Positive, Neutral, or Negative, then writes the tweet link, content, and sentiment into Google Sheets as a clean, searchable log. If a tweet is negative, the workflow immediately posts an alert in Slack so your team can respond while it still matters. If a tweet is positive, it can generate a simple thank-you reply and store that draft in the same sheet so replies stay consistent and fast.
The workflow starts with a scheduled run, then Apify pulls recent mentions. OpenAI tags sentiment and drafts quick replies for positives. Finally, Google Sheets becomes the system of record, and Slack becomes your “drop everything” channel when sentiment turns negative.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your brand averages 40 mentions a day across product name, common misspellings, and a campaign hashtag. Manually, even “quickly scanning” and logging the meaningful ones can take about 2 hours a day once you include context switching and sharing links to Slack. With this workflow, the human time is closer to 10 minutes: you review the Slack alerts (only negatives) and skim the Google Sheet when you want a fuller picture. Everything else runs in the background on a schedule.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Apify to scrape Twitter mentions by keyword.
- Google Sheets to store tweets, sentiment, and drafts.
- OpenAI API key (get it from your OpenAI dashboard).
Skill level: Beginner. You will connect accounts, paste API keys, and confirm your sheet columns match.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Scheduled checks run automatically. A schedule trigger starts the workflow at the interval you choose, like every hour during business hours. No one needs to remember to “go look.”
Twitter mentions are collected through Apify. The workflow calls an Apify Twitter scraper actor through HTTP requests, then fetches the results when they’re ready. Tweets are formatted into a consistent structure so you can process them cleanly.
Duplicates are filtered before you spend money on AI. Each tweet is checked against your existing Google Sheet entries. If it’s already logged, it’s skipped, which keeps the sheet clean and avoids re-analyzing the same content.
Sentiment is analyzed and routed. OpenAI classifies sentiment (Positive, Neutral, Negative). A routing step sends negatives to Slack for immediate visibility, while positives can trigger a draft thank-you reply that gets saved with the tweet.
You can easily modify the keywords Apify searches for to include campaign tags or product-line names based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set the workflow to run on a fixed schedule so it regularly pulls new social posts from Apify.
- Add and open Scheduled Run Trigger.
- Set the interval rule to run every
6hours. - Connect Scheduled Run Trigger to Apify Post Search Request.
Step 2: Configure Apify Data Retrieval
Use Apify’s API to run a post search and fetch the latest dataset items.
- Open Apify Post Search Request and set URL to
https://api.apify.com/v2/acts/scraper_one~x-posts-search/run-sync?token=[CONFIGURE_YOUR_TOKEN]. - Set Method to
POSTand JSON Body to{ "query": "LaraconIn", "resultsCount": 5, "searchType": "latest", "lang":"en" }. - Ensure Send Body and Send Headers are enabled, and set the Content-Type header to
application/json. - Open Fetch Apify Results and set URL to
https://api.apify.com/v2/acts/scraper_one~x-posts-search/runs/last/dataset/items?token=[CONFIGURE_YOUR_TOKEN]. - Connect Apify Post Search Request → Fetch Apify Results → Map Loop Fields.
[CONFIGURE_YOUR_TOKEN] in both Apify URLs or the requests will fail.Step 3: Prepare Records and Check for Duplicates
Normalize the Apify results, loop through each record, and skip already-processed posts.
- In Map Loop Fields, map fields to:
- Set id to
{{ $json.postId }}, tweet_url to{{ $json.postUrl }}, and tweet_text to{{ $json.postText }}. - Connect Map Loop Fields → Iterate Records to process one record at a time.
- Open Retrieve Post Sheet and set the filter to match ID with
{{ $json.id }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Post Sheet.
- In Duplicate Check, keep the condition
{{ $json.ID }}with the exists operator.
Step 4: Set Up AI Sentiment Analysis and Routing
Analyze sentiment for each tweet and route to the appropriate action path.
- Open Analyze Sentiment and set Text to
{{ $('Iterate Records').item.json.tweet_text }}. - Confirm Prompt Type is
defineand Has Output Parser is enabled. - Open Parse Structured Output and keep the JSON schema example
{ "category": "neutral" }. - Open Chat Model Engine and select model
gpt-4o-mini. - Credential Required: Connect your openAiApi credentials in Chat Model Engine.
- Ensure Chat Model Engine is connected as the language model for Analyze Sentiment, and Parse Structured Output is connected as the output parser.
- Open Route by Sentiment and verify the rules compare
{{ $json.output.category }}toPositive,Negative, andNeutral.
Step 5: Configure Reply Generation and Notifications
Generate replies for positive sentiment and send alerts for negative posts, then update the Google Sheet.
- Open Compose Reply AI and ensure the user message uses
{{ $('Map Loop Fields').item.json.tweet_text }}. - Credential Required: Connect your openAiApi credentials in Compose Reply AI.
- Open Slack Alert for Negative and set Text to
Received a Negative retweet on {{ $('Duplicate Check').item.json.TweetUrl }}. Consider if a response or clarification is needed.. - Credential Required: Connect your slackOAuth2Api credentials in Slack Alert for Negative.
- Open Update Post Sheet and confirm Operation is
appendOrUpdate. - Map columns in Update Post Sheet to: ID
{{ $('Map Loop Fields').item.json.id }}, TweetUrl{{ $('Map Loop Fields').item.json.tweet_url }}, TweetText{{ $('Map Loop Fields').item.json.tweet_text }}, Post Reply{{ $json.message.content }}, and Sentiment{{ $('Route by Sentiment').item.json.output.category }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Post Sheet.
Step 6: Test and Activate Your Workflow
Run a full test to confirm Apify retrieval, sentiment analysis, routing, and sheet updates are working as expected.
- Click Execute Workflow to run the workflow manually.
- Verify Fetch Apify Results returns new posts and Map Loop Fields creates
id,tweet_url, andtweet_text. - Check that Route by Sentiment directs items correctly and that Slack Alert for Negative sends a message for negative posts.
- Confirm Update Post Sheet writes or updates rows with reply and sentiment values.
- When satisfied, toggle the workflow Active to enable scheduled runs.
Common Gotchas
- Apify credentials can expire or need specific permissions. If things break, check your Apify API token and actor access in your Apify account settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About 30 minutes if your Apify, Slack, and Google Sheets accounts are ready.
No. You’ll mainly paste API keys, connect Google Sheets and Slack, and match the sheet columns to the workflow fields.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI usage (often a few dollars a month for light monitoring) and your Apify plan.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s the part you should customize first, honestly. You can change the Apify search inputs in the HTTP request step to include campaign hashtags, product names, and common misspellings. You can also adjust the AI prompt used for reply drafting so it matches your voice (formal, playful, short, or detailed). Many teams add one more branch: route “Neutral” mentions into a review queue instead of drafting replies automatically.
Usually it’s a permission issue or the sheet was moved. Reconnect Google Sheets in n8n, confirm the selected spreadsheet and worksheet still exist, and verify the account has edit access. If duplicates suddenly stop being detected, check that the column used for tweet links hasn’t changed names or formatting.
For most small brands, hundreds of tweets per day is fine.
It depends on how “hands-off” you want it. Zapier and Make can send alerts, but this workflow benefits from n8n’s branching, looping through batches, and duplicate checks without turning into a tangled set of zaps. n8n is also easier to extend when you decide negatives should open a ticket, notify a second Slack channel, or trigger an email summary. If you only want a two-step alert, Zapier can be quicker to click together. Talk to an automation expert if you want help choosing.
Once this is running, Twitter stops being a constant background worry. The workflow catches the negatives, logs the rest, and gives you your time back.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.