X (Twitter) Brand Sentiment Analysis with Gemini AI & Slack Alerts
This workflow is the AI analysis and alerting engine for a complete social media monitoring system. It's designed to work with data scraped from X (formerly Twitter) using a tool like the Apify Tweet Scraper, which logs the data into a Google Sheet. The workflow then automatically analyzes new tweets with Google Gemini and sends tailored alerts to Slack.
How it works
This workflow automates the analysis and reporting part of your social media monitoring:
tweet Hunting:** It finds tweets for the query entered in the set node and passes the data to the google sheets
Fetches New Tweets:** It gets all new rows from your Google Sheet that haven't been processed yet (it looks for "Notmarked" in the 'action taken' column).
Prepares for AI:** It combines the data from all new tweets into a single, clean prompt for the AI to analyze.
AI Analysis with Gemini:* It sends the compiled data to Google Gemini, asking for a full summary report and a separate, machine-readable JSON list of any urgent items.
Splits the Response:* The workflow intelligently separates the AI's text summary from the JSON data for urgent alerts.
Sends Notifications:**
The high-level summary is sent to a general Slack channel (e.g., #brand-alerts).
Each urgent item is sent as a separate, detailed alert to a high-priority Slack channel (e.g., #urgent).
Set up steps It should take about 5-10 minutes to get this workflow running.
Prerequisite - Data Source: Ensure you have a Google Sheet being populated with tweet data. For a complete automation, you can set up a new google sheet with the same structure for saving the tweets data and run the Tweet Scraper on a schedule. Configure Credentials: Make sure you have credentials set up in your n8n instance for Google Sheets, Google Gemini (PaLM) API, and Slack. Google Sheets Node ("Get row(s) in sheet"): Select your Google Sheet containing the tweet data. Choose the specific sheet name from the dropdown. Ensure your sheet has a column named action taken so the filter works correctly. Google Gemini Chat Model Node: Select your Google Gemini credential from the dropdown. Slack Nodes ("Send a message" & "Send a message1"): In the first Slack node, choose the channel for the summary report. In the second Slack node, choose the channel for urgent alerts. Save and Activate: Once configured, save your workflow and turn it on!
Related Templates
AI SEO Readability Audit: Check Website Friendliness for LLMs
Who is this for? This workflow is designed for SEO specialists, content creators, marketers, and website developers who ...
Reply to Outlook Emails with OpenAI
Who is this template for? This template is for any Microsoft Outlook user who wants a trained AI agent to reason and rep...
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments