Quick overview
This workflow runs daily to find new brand mentions from Instagram hashtags and Google Search via Apify, deduplicates them in an n8n Data Table, classifies each mention with Google Gemini for sentiment and urgency, and sends high-urgency alerts to a Slack channel.
How it works
- Runs every day at 9am UTC on a schedule.
- Pulls recent Instagram hashtag posts using Apify’s Instagram Hashtag Scraper and normalizes each post into a standard mention format.
- Runs Apify’s Google Search Scraper for the configured query, splits organic results into individual mentions, and normalizes the fields.
- Merges Instagram and Google mentions into a single stream and filters out mentions already logged in an n8n Data Table based on a unique mention ID.
- Stores each new mention’s ID in the Data Table and sends the mention text to Google Gemini to classify sentiment, urgency, relevance score, summary, and topic.
- Keeps only mentions with relevance scores of 6 or higher and posts a Slack alert when urgency is medium or high.
Setup
- Add credentials for Apify (OAuth2), Google Gemini (PaLM/Gemini API), and Slack (OAuth2).
- Create or select an n8n Data Table (for example, “Brand monitoring DB”) with a string column named
mention_id, and point both Data Table steps to that same table.
- Update the Brand Config values for
instagramHashtags (array of hashtags) and googleQueries (your search query string).
- Choose the target Slack channel in the Slack alert step and adjust the relevance (>= 6) and urgency (medium/high) thresholds if needed.