Instagram to Slack, sentiment alerts your team trusts
Instagram comments move fast. The problem is your understanding of them usually doesn’t. By the time someone screenshots a “bad” thread into Slack, it has already spread.
Social media managers feel it first, but marketing leads and agency teams end up doing the cleanup too. This Instagram sentiment alerts automation turns messy comment streams into clear signals, so you can react in minutes, not tomorrow morning.
You’ll set up an n8n workflow that pulls your latest posts, analyzes comment sentiment with GPT-4, pings Slack when something looks risky, and logs everything to Google Sheets for trend tracking.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Instagram to Slack, sentiment alerts your team trusts
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/facebook.svg' width='40' height='40' /></div><br/>Fetch Recent Instagram Posts"]
n1@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "AI Agent - Sentiment Analyzer", pos: "b", h: 48 }
n3@{ icon: "mdi:memory", form: "rounded", label: "Window Buffer Memory", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n5@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n6["<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/>Format Instagram Data"]
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/>Prepare Google Sheets Data"]
n8["<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/>Slack: Post Positive Summary"]
n9@{ icon: "mdi:cog", form: "rounded", label: "Outlook: Email Report", pos: "b", h: 48 }
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/slack.svg' width='40' height='40' /></div><br/>Slack: Post Negative Alert"]
n11@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Sentiment Decision Router", pos: "b", h: 48 }
n12@{ icon: "mdi:database", form: "rounded", label: "Log Analytics to Google Sheets", pos: "b", h: 48 }
n1 --> n0
n5 -.-> n2
n3 -.-> n2
n6 --> n2
n4 -.-> n2
n11 --> n9
n11 --> n7
n11 --> n8
n11 --> n10
n7 --> n12
n0 --> n6
n2 --> n11
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 n1 trigger
class n2,n4 ai
class n5 aiModel
class n3 ai
class n11 decision
class n12 database
class n0 api
class n6,n7 code
classDef customIcon fill:none,stroke:none
class n0,n6,n7,n8,n10 customIcon
Why This Matters: Comment sentiment slips through the cracks
Checking Instagram performance is easy when you’re looking at likes. Comments are harder. A single post can get hundreds, the tone can shift within an hour, and the “real” issue is often buried three replies deep. So teams do what humans do. They skim, they guess, they miss things, and they only escalate when it already feels uncomfortable. Meanwhile, the business cost is real: delayed responses, inconsistent moderation, and leadership asking for a clear read that no one can confidently give.
It adds up fast. Here’s where it breaks down inside a typical weekly workflow.
- Someone has to manually pull recent post data and paste it into a doc or spreadsheet, which quietly turns into a recurring 30-minute chore.
- Sentiment gets judged by whoever is online, so “this looks fine” varies wildly depending on mood and experience.
- Risky comment threads are discovered late because nobody is watching at the right moment.
- When leadership asks “is this a trend or a one-off?”, you have no clean history to point to.
What You’ll Build: Daily Instagram analysis with Slack alerts and Sheets logging
This workflow runs on a schedule (by default, 10 AM daily) and grabs your latest Instagram posts through the Facebook Graph API. It cleans up the raw payload, then sends the post content and comment context to an AI agent powered by an OpenAI chat model (GPT-4 or a lighter model if you prefer). The agent returns structured insights: engagement signals, sentiment labels, and recommended next actions. From there, the workflow routes results based on what the AI found. Positive or neutral performance gets summarized in Slack, negative or risky sentiment triggers a more urgent Slack alert, and everything gets appended to Google Sheets so you build a reliable trend log over time. Finally, a daily email summary goes out via Microsoft Outlook for stakeholders who live in inboxes.
The workflow starts with scheduled collection of post and comment data. Then GPT evaluates tone and performance in plain language your team can use. At the end, Slack gets the right message for the situation, Outlook sends a recap, and Google Sheets becomes your audit trail.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you publish 5 posts a week and each post gets enough comments that someone spends about 20 minutes skimming and summarizing. That’s roughly 2 hours weekly before you even write a Slack update or build a report. With this workflow, you’re mainly reviewing outputs: the scheduled run happens automatically, Slack summaries arrive without prompting, and Sheets logging is instant. Most teams get back about 1–2 hours a week right away, plus fewer “how did we miss this?” moments.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Facebook Graph API to fetch Instagram posts/comments
- Slack to notify your team in-channel
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You’ll connect credentials, paste IDs (sheet/channel), and run a test to confirm mappings.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A scheduled trigger runs every morning. In the template it’s set to 10 AM daily, which is a nice default for teams that want a “start of day” pulse check.
Instagram data gets pulled, then cleaned. The Facebook Graph API node retrieves recent posts plus engagement details, and a normalization step reshapes that payload so the AI sees consistent fields instead of a jumble.
GPT evaluates sentiment and performance. An AI agent (using the OpenAI chat model) reads captions, engagement, and comment context, then outputs structured results that are easy to route and log.
Slack, email, and Sheets get the right output. A switch routes the message: positive summaries to Slack, negative sentiment to an alert, a daily Outlook email to stakeholders, and a Google Sheets append for long-term trend analysis.
You can easily modify the “negative” threshold to match your brand’s risk tolerance based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to run on a fixed schedule so Instagram data is fetched automatically.
- Add the Scheduled Run Trigger node and open its settings.
- Set the schedule rule to run at
triggerAtHour: 10(as configured in the interval). - Connect Scheduled Run Trigger to Retrieve Latest IG Posts.
Step 2: Connect Instagram Data Source
Pull the latest Instagram media and engagement details via the Graph API.
- Open Retrieve Latest IG Posts and set Edge to
media. - Set Graph API Version to
v23.0. - Set Fields to
id,caption,media_type,media_url,permalink,timestamp,like_count,comments_count,comments{username,text,timestamp,like_count}. - Credential Required: Connect your facebookGraphApi credentials.
- Connect Retrieve Latest IG Posts to Normalize IG Payload.
Step 3: Normalize and Analyze Post Sentiment
Format Instagram data and run AI analysis with memory and structured parsing.
- In Normalize IG Payload, keep the provided JavaScript to flatten post and comment data.
- Connect Normalize IG Payload to Sentiment Analysis Agent.
- In Sentiment Analysis Agent, set Text to the multi-line prompt that includes
{{ JSON.stringify($json) }}and ensure Prompt Type isdefine. - Attach OpenAI Chat Engine as the language model for Sentiment Analysis Agent and set Temperature to
0.4. - Credential Required: Connect your openAiApi credentials in OpenAI Chat Engine.
- Attach Session Buffer Memory as the memory for Sentiment Analysis Agent with Session Key set to
="Post Engagement". - Attach Structured Result Parser as the output parser and keep the provided JSON schema example.
Step 4: Route by Sentiment
Use conditional rules to branch positive and negative sentiment outcomes.
- Open Sentiment Route Switch and configure the first rule to check
{{ $json.output.posts[0].commentSentiment.label }}equalsPositive. - Configure the second rule to check
{{ $json.output.posts[0].commentSentiment.label }}equalsNegative. - Connect Sentiment Analysis Agent to Sentiment Route Switch.
- Sentiment Route Switch outputs to both Outlook Email Summary and Shape Sheets Dataset and Slack Positive Summary in parallel.
- Connect the second output of Sentiment Route Switch to Slack Negative Alert for negative sentiment.
Positive or Negative, the switch will not route items. Ensure your AI output labels align with these values.Step 5: Configure Notifications and Sheet Output
Send summaries to Outlook and Slack, then write analytics into Google Sheets.
- In Outlook Email Summary, set Subject to
=Top Post Perfomerand keep the detailed Body Content with expressions such as{{ $json.output.posts[0].post_id }}. - Credential Required: Connect your microsoftOutlookOAuth2Api credentials in Outlook Email Summary.
- In Slack Positive Summary, keep the message template and ensure Select is set to
channel. - Credential Required: Connect your slackApi credentials in Slack Positive Summary.
- In Slack Negative Alert, keep the negative alert template and ensure Select is set to
channel. - Credential Required: Connect your slackApi credentials in Slack Negative Alert.
- In Shape Sheets Dataset, keep the provided JavaScript that flattens output into row-friendly data.
- Connect Shape Sheets Dataset to Append Analytics to Sheets and set Operation to
appendOrUpdate. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Append Analytics to Sheets.
Step 6: Test and Activate Your Workflow
Run a manual test to confirm data flow, AI output, and notifications.
- Click Execute Workflow and confirm Retrieve Latest IG Posts returns items.
- Verify Sentiment Analysis Agent produces structured JSON output via Structured Result Parser.
- Check that Sentiment Route Switch routes correctly and that the parallel outputs fire for the positive path.
- Confirm that emails are sent from Outlook Email Summary, Slack messages appear from Slack Positive Summary or Slack Negative Alert, and rows are appended by Append Analytics to Sheets.
- Toggle the workflow to Active to enable scheduled runs.
Troubleshooting Tips
- Facebook Graph API credentials can expire or need specific permissions. If things break, check your Meta app settings and token validity 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.
- Slack bot permissions matter more than people expect. If messages don’t post, confirm the bot has chat:write and you’re using the correct channel ID.
Quick Answers
About 30 minutes if your credentials are ready.
No. You’ll mostly connect accounts and paste a few IDs. The template already includes the formatting and routing logic.
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 API costs (often a few dollars a month for daily runs, depending on how many comments you analyze).
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. You can change the schedule in the Scheduled Run Trigger, adjust what counts as “negative” in the Sentiment Route Switch, and rewrite the AI prompt inside the Sentiment Analysis Agent to match your moderation policy. Common tweaks include analyzing only certain posts (like paid campaigns), sending alerts to different Slack channels by brand, and logging extra columns in Google Sheets for tags like “product feedback” or “shipping complaint.”
Most of the time it’s an expired token or missing permissions tied to the Instagram Business account. Regenerate the token in your Meta developer settings, then update the credential in n8n. Also double-check you’re calling the right IG user/page ID, because a single wrong ID can look like “the API is down.” If you’re pulling lots of comments at once, rate limiting can show up as intermittent failures too.
On n8n Cloud, the practical limit is your monthly execution quota and how many posts/comments you fetch per run. If you self-host, there’s no execution cap, but you’re still limited by server resources and API limits. For most small teams checking the latest posts once per day, it runs comfortably. If you want to analyze every comment on high-volume accounts, you’ll usually batch comments and keep the prompt tight to control OpenAI costs.
Often, yes. n8n is simply better when you need branching logic (positive vs negative), structured AI outputs, and multi-step routing to Slack, Sheets, and Outlook in one run. It also gives you the self-hosting option, which can matter if you run daily workflows across multiple client accounts. Zapier and Make are still fine for simple “send a message when X happens” setups, and they can feel quicker on day one. If your alerts need nuance and a clean audit trail, n8n tends to win. Talk to an automation expert if you want help picking the right stack.
Once this is running, your team stops guessing and starts reacting with context. The workflow handles the daily scan, and you keep your attention for the decisions that actually matter.
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.