Google Sheets + Slack: smarter tweet mention alerts
Your X (Twitter) mentions don’t arrive politely. They show up as a messy stream of takes, screenshots, half-context quotes, and “is this a crisis?” moments that somehow land when you’re already busy.
Sheets Slack alerts fixes that. Marketing managers usually feel the fire drill first, but founders and comms leads end up in the same loop: scroll, panic, copy-paste, then hope you didn’t miss the one post that actually matters.
This workflow turns new tweet rows in Google Sheets into a clean summary for your regular Slack channel, plus separate urgent alerts for the stuff that needs attention now. You’ll learn what it does, what you need, and how to make it fit your brand.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Sheets + Slack: smarter tweet mention alerts
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0["<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/code.svg' width='40' height='40' /></div><br/>Code"]
n1@{ icon: "mdi:database", form: "rounded", label: "Append row in sheet", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Count", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "counter", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Limit", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "set increase", pos: "b", h: 48 }
n7["<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/code.svg' width='40' height='40' /></div><br/>Code1"]
n8@{ icon: "mdi:swap-vertical", form: "rounded", label: "set count and cursor", pos: "b", h: 48 }
n9@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n10@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch", pos: "b", h: 48 }
n11@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n12@{ icon: "mdi:database", form: "rounded", label: "getTweetsFromDatabase", pos: "b", h: 48 }
n13@{ icon: "mdi:database", form: "rounded", label: "Append row in sheet1", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Aggregate", pos: "b", h: 48 }
n15["<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/code.svg' width='40' height='40' /></div><br/>Translator"]
n16["<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/>Tweet Scraper"]
n17@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n18@{ icon: "mdi:robot", form: "rounded", label: "AI Analyst", pos: "b", h: 48 }
n4 --> n14
n4 --> n5
n0 --> n1
n9 --> n16
n7 --> n8
n2 --> n3
n5 --> n6
n10 --> n18
n3 --> n9
n14 --> n10
n18 --> n15
n15 --> n13
n6 --> n7
n16 --> n0
n17 --> n2
n1 --> n4
n8 --> n3
n12 -.-> n18
n11 -.-> n18
end
subgraph sg1["Schedule Flow"]
direction LR
n19@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model1", pos: "b", h: 48 }
n20@{ icon: "mdi:database", form: "rounded", label: "Get row(s) in sheet", pos: "b", h: 48 }
n21["<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/code.svg' width='40' height='40' /></div><br/>parseAlerts"]
n22["<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 a message"]
n23["<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 a message1"]
n24@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n25@{ icon: "mdi:robot", form: "rounded", label: "Strategist Agent", pos: "b", h: 48 }
n26["<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/code.svg' width='40' height='40' /></div><br/>parser"]
n27["<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/code.svg' width='40' height='40' /></div><br/>summary"]
n28@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger1", pos: "b", h: 48 }
n26 --> n25
n27 --> n22
n21 --> n24
n24 --> n23
n23 --> n24
n25 --> n27
n25 --> n21
n28 --> n20
n20 --> n26
n19 -.-> n25
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 n17,n28 trigger
class n18,n25 ai
class n11,n19 aiModel
class n4,n10 decision
class n1,n12,n13,n20 database
class n16 api
class n0,n7,n15,n21,n26,n27 code
classDef customIcon fill:none,stroke:none
class n0,n7,n15,n16,n21,n22,n23,n26,n27 customIcon
Why This Matters: Tweet mention noise hides real risk
Social monitoring sounds simple until you do it for real. Mentions come in bursts, your team skims fast, and the “actionable” ones get lost between harmless chatter and vague negativity. Then someone asks for a daily summary, and suddenly you’re stitching together screenshots, links, and your own interpretation in Slack. It’s not just time. It’s mental load. You second-guess what you missed, and you can’t prove you were on top of it when leadership wants a quick readout.
It adds up fast. Here’s where it breaks down in most teams.
- New tweets get scanned in a hurry, so the same item gets re-checked multiple times in a day.
- Everything lands in one channel, which means urgent issues look like regular chatter.
- Manual summaries take about an hour on busy days, and they still miss context from the full batch.
- Without a “processed” marker in your sheet, you’ll either double-alert the team or quietly skip items.
What You’ll Build: Google Sheets to Slack summaries plus urgent alerts
This workflow acts like an analysis and alerting engine sitting on top of your tweet collection process. On a schedule, it checks a Google Sheet that’s being filled with tweet data (commonly from an Apify Tweet Scraper or a similar scraping tool). It pulls only the rows that haven’t been handled yet by looking for a “Notmarked” value in the action taken column. Then it bundles the new tweets into one clean prompt and sends them to an AI model (Google Gemini in this workflow) to generate two things: a human-friendly summary and a machine-readable JSON list of urgent items. After that, the workflow posts the high-level summary to a standard Slack channel, and sends each urgent item as its own message to a high-priority Slack channel so nothing critical gets buried.
The workflow starts with scheduled triggers, then filters and aggregates new tweet rows from Google Sheets. AI produces a summary plus an “urgent” list, and Slack receives two streams: one calm briefing, and one set of focused alerts. Clean, consistent, and repeatable.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say your scraper drops 60 new mentions into Google Sheets each day. Manually, even 1 minute per tweet to skim, judge urgency, and paste context into Slack is about an hour, and that’s before you write a summary. With this workflow, you spend a couple minutes confirming the sheet is filling correctly, then wait while Gemini generates the report and Slack posts it. Most teams get that hour back on busy days, and the urgent stuff stops blending into noise.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing scraped tweet rows.
- Slack to receive summaries and urgent alerts.
- Google Gemini (PaLM) API key (get it from Google AI Studio / Google Cloud credentials).
Skill level: Beginner. You’ll connect accounts, select the right sheet, and paste an API key.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A scheduled check pulls fresh rows. The workflow runs on a schedule and looks at your Google Sheet for tweet rows where the action taken column still shows an unprocessed status (like “Notmarked”).
Tweet content gets cleaned and combined. It transforms the tweet payload, limits the batch so you don’t overload analysis, and aggregates multiple tweets into one briefing-style input that an AI model can understand.
AI creates two outputs from the same batch. Gemini generates a readable summary for humans, plus a separate JSON list for urgent items so n8n can route them one-by-one. There’s also an agent/chain step in the workflow to shape the response into something consistent.
Slack receives the right message in the right place. The summary goes to your standard monitoring channel, then urgent items get split into individual alerts and sent to a higher-priority Slack channel for fast response.
You can easily modify the urgency rules and the Slack destinations based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
This workflow uses two schedules: one for tweet collection and another for daily briefing generation.
- Open Scheduled Trigger A and set the Interval rule to your desired tweet collection cadence.
- Open Scheduled Trigger B and set the Interval rule with Trigger at hour to
9(or your preferred daily briefing time). - Confirm Scheduled Trigger A connects to Initialize Counter and Scheduled Trigger B connects to Retrieve Pending Rows.
Step 2: Connect Google Sheets
Google Sheets stores raw tweets and analysis results. Multiple nodes require the same credentials.
- Open Append Raw Sheet Row and select the correct Document and Sheet to match
[YOUR_ID]andSheet1. - Map fields in Append Raw Sheet Row exactly as shown, including URL →
{{ $json.url }}and next_cursor →{{ $json.nextCursor }}. - Open Append Analysis Row and ensure Sheet is
Sheet2with columns like summary →{{ $json.summary }}and date_analyzed →{{ $now }}. - Open Retrieve Pending Rows and confirm the filter action taken equals
Notmarked. - Credential Required: Connect your googleSheetsOAuth2Api credentials to Append Raw Sheet Row, Append Analysis Row, Retrieve Pending Rows, and Fetch Tweets Tool.
Step 3: Configure the Tweet Collection Pipeline
This step collects tweets, transforms the payload, and appends raw data to Google Sheets while managing cursor state.
- In Initialize Counter, set count to
1and query toemergentlabs. - In Set Cursor State, set counter to
{{ $json.count }}and cursor to{{ $json['next cursor'] }}. - Configure Delay Execution to manage pacing before calling the API.
- Open Tweet API Request and set URL to
https://api.twitterapi.io/twitter/tweet/advanced_search. Use Query Parameters: query →{{ $('Initialize Counter').item.json.query }}, queryType →Latest, cursor →{{ $json.cursor }}. - Credential Required: Connect your httpHeaderAuth credentials to Tweet API Request.
- Ensure Transform Tweet Payload runs after the API call to split tweets into individual items for Append Raw Sheet Row.
- Confirm the counter loop: Prepare Increment → Increment Counter Script → Store Count Cursor → Set Cursor State.
Step 4: Set Up AI Insight Processing
AI analysis is performed by an agent using Gemini, then parsed and stored. The agent also uses a Google Sheets tool.
- In Aggregate Content, ensure fieldToAggregate aggregates Content to final.
- Confirm Conditional Check evaluates
{{ $('Set Cursor State').item.json.counter }}equals1before aggregation. - Configure Route If Data to route when
{{ $json.Content }}does not exist and send to AI Insight Agent. - In AI Insight Agent, keep the prompt and system message intact. It uses tools to fetch data and analyze sentiment, urgency, and key topics.
- Credential Required: Connect your googlePalmApi credentials to Gemini Chat Model (language model for AI Insight Agent).
- For Fetch Tweets Tool, note it is an AI tool—credentials should be added to the parent node. Ensure the tool is attached to AI Insight Agent and uses the correct Google Sheets document.
- Verify the post-processing path: AI Insight Agent → Parse Analysis Text → Append Analysis Row.
Step 5: Configure the Strategy LLM Chain and Parallel Outputs
The briefing chain summarizes analyzed rows and produces actionable alerts, then splits into parallel paths.
- In Retrieve Pending Rows, confirm it pulls only rows where action taken equals
Notmarked. - In Compile Briefing Text, keep the script to build
preparedTextandrowsToUpdate. - In Strategy LLM Chain, ensure the prompt includes
{{ $json.preparedText }}and batching is set to1. - Credential Required: Connect your googlePalmApi credentials to Gemini Chat Model B (language model for Strategy LLM Chain).
- Strategy LLM Chain outputs to both Extract Summary Text and Extract Alert JSON in parallel.
--- ACTIONABLE TWEETS JSON --- and JSON block.Step 6: Configure Slack Notifications
This step posts the summary to one Slack channel and urgent alerts to another via batch processing.
- In Post Summary to Slack, set Text to
📈 *Brand Sentry: Daily Strategic Briefing* 📈 *Generated on: {{ new Date().toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' }) }}* {{ $json.summaryReport }}. - Credential Required: Connect your slackOAuth2Api credentials to Post Summary to Slack and select the correct channel.
- In Iterate Alerts, keep batch processing to loop through items returned from Extract Alert JSON.
- In Dispatch Urgent Alert, keep the alert message format with
{{ $json.urgency }},{{ $json.reason }}, and{{ $json.tweetId }}. - Credential Required: Connect your slackOAuth2Api credentials to Dispatch Urgent Alert and select the urgent channel.
Step 7: Test and Activate Your Workflow
Run the workflow manually to verify data collection, AI analysis, and Slack notifications before enabling it in production.
- Click Execute Workflow on Scheduled Trigger A to test tweet ingestion and confirm rows append in Append Raw Sheet Row.
- Verify AI Insight Agent produces a formatted response and Append Analysis Row receives sentiment, urgency, and summary fields.
- Click Execute Workflow on Scheduled Trigger B to test the briefing path and check that Post Summary to Slack posts a formatted report.
- Confirm urgent items flow through Extract Alert JSON → Iterate Alerts → Dispatch Urgent Alert.
- When successful, toggle the workflow to Active so both schedules run automatically.
Troubleshooting Tips
- Google Sheets credentials can expire or lack access to the right file. If things break, check the Google Sheets node credential and confirm the spreadsheet is shared with that account.
- If you’re using Wait nodes or external fetching, 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.
Quick Answers
About 5–10 minutes if your sheet and accounts are ready.
No. You’ll mostly select the right Google Sheet, connect Slack, and paste your Gemini API key.
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 Google Gemini API usage costs.
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 you should. Most teams start by changing the Google Sheets “Retrieve Pending Rows” filter (different status values), then tweak the Gemini prompt so “urgent” matches your brand’s risk rules. You can also swap the Slack channels in “Post Summary to Slack” and “Dispatch Urgent Alert” to route by product line, region, or client. If you want to analyze other sources, feed different rows into the same “Aggregate Content” step and keep the rest.
Usually it’s permissions. Confirm the Google account in your n8n credential can open that specific spreadsheet, and that the sheet name matches what you selected in the node. Also check that your columns exist as expected (especially action taken), because missing headers can look like “no data” and stop alerts. If it worked yesterday and failed today, re-authenticating the Google Sheets credential often fixes it.
A lot for most small teams. On n8n Cloud, your monthly execution limit depends on the plan, and each run counts as an execution. If you self-host, there’s no hard execution cap; it mainly depends on your server and how many tweet rows you batch into each AI call. Practically, start by limiting each run to a manageable batch (like a few dozen rows), then increase once you trust the prompts and Slack routing.
Often, yes. This workflow relies on multi-step logic (filtering unprocessed rows, aggregating, splitting JSON into many messages), which is where n8n tends to feel less cramped. It also gives you the option to self-host for high volume without paying per task in the same way. Zapier or Make can still work if you only need a simple “new row → send message” flow and you don’t care about urgent-item parsing. If you’re unsure, Talk to an automation expert and describe your volume and channels.
Once this is running, your team stops “monitoring” and starts responding. The workflow does the sorting and summarizing so you can focus on the decisions.
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.