Facebook to Slack, catch negative comments fast
You post on Facebook, the comments roll in, and the mood shifts before anyone notices. By the time someone on your team spots the problem, the thread is already messy, screenshots are circulating, and you’re stuck reacting instead of managing.
This is the kind of stress that hits social media managers first, but PR leads and ops-minded agency owners feel it too. With Facebook Slack alerts in place, you get a fast signal when sentiment turns negative, so you can jump in while it’s still fixable.
This workflow pulls recent posts and comments, runs GPT-powered sentiment analysis, logs everything to Google Sheets, and pings Slack only when it matters. You’ll see how it works, what you need, and how to tailor it to your brand and risk tolerance.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Facebook to Slack, catch negative comments fast
flowchart LR
subgraph sg0["Trigger - Daily Sentiment Analysis Flow"]
direction LR
n2["<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 Facebook Posts"]
n3@{ icon: "mdi:robot", form: "rounded", label: "💬 Agent - Sentiment & Tone E..", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route Based on Sentiment Score", pos: "b", h: 48 }
n5["<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 Alert - Negative Senti.."]
n6@{ icon: "mdi:brain", form: "rounded", label: "LLM - OpenAI GPT-4 Model", pos: "b", h: 48 }
n7@{ icon: "mdi:memory", form: "rounded", label: "Memory Buffer - Session Cont..", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Structured JSON Parser", 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/code.svg' width='40' height='40' /></div><br/>Format Facebook Data (Code N.."]
n10@{ icon: "mdi:play-circle", form: "rounded", label: "Trigger - Daily Sentiment An..", pos: "b", h: 48 }
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/code.svg' width='40' height='40' /></div><br/>Format HTML Email Report (Co.."]
n12["<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 Data for Google Sheets"]
n13@{ icon: "mdi:database", form: "rounded", label: "Update Google Sheet - Sentim..", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Send Sentiment Report (Outlo..", pos: "b", h: 48 }
n8 -.-> n3
n6 -.-> n3
n2 --> n9
n12 --> n13
n4 --> n5
n4 --> n12
n4 --> n11
n7 -.-> n3
n9 --> n3
n10 --> n2
n11 --> n14
n3 --> n4
end
subgraph sg1["Error Handler Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Error Handler Trigger", pos: "b", h: 48 }
n1["<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: Send Error Alert"]
n0 --> n1
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 n10,n0 trigger
class n3,n8 ai
class n6 aiModel
class n7 ai
class n4 decision
class n13 database
class n2 api
class n9,n11,n12 code
classDef customIcon fill:none,stroke:none
class n2,n5,n9,n11,n12,n1 customIcon
The Problem: Negative Comments Get Noticed Before You Do
Facebook comment sections can flip fast. A normal post turns into a complaint thread, then someone tags friends, then you’ve got a mini PR moment on your hands. The worst part is the “blind window” where negativity is building, but nobody is watching because your team is busy doing real work. Manual monitoring sounds simple until you’re checking multiple posts, scrolling hundreds of comments, and trying to decide if it’s a real issue or just noise. One miss can cost hours of cleanup, plus the brand damage that’s hard to measure but easy to feel.
It adds up fast. Here’s where things usually break down.
- You only find negative threads after someone forwards a screenshot in Slack.
- Team members interpret tone differently, so the escalation process becomes inconsistent.
- There’s no clean log of sentiment over time, which makes reporting and trend-spotting basically guesswork.
- When you do take action, you’re missing context because nobody captured what changed and when.
The Solution: Daily Facebook Sentiment Monitoring That Escalates to Slack
This n8n workflow checks your Facebook Page on a schedule (daily by default), pulls your recent posts, and collects engagement details plus up to 100 comments per post via the Facebook Graph API. Then it cleans and structures that data so an AI agent can review it consistently. GPT evaluates both the post tone and the audience response, returning sentiment scores, confidence, and short explanations you can actually use in a handoff. If the results cross your “negative” threshold, the workflow sends a focused alert to Slack right away, logs the full dataset to Google Sheets, and generates a color-coded HTML summary email through Microsoft Outlook for daily visibility. If something breaks, you still get notified via a dedicated error trigger.
The workflow starts at a set time, fetches posts and comments, and runs AI sentiment analysis with structured output. From there, it routes only the negative cases into Slack while still recording everything to Sheets and emailing a clean daily report to keep stakeholders aligned.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your Page publishes 2 posts per day, and each post gets around 80 comments. Manually checking both threads, skimming for tone, and writing a quick internal update can take about 20 minutes per post, so you’re at roughly 40 minutes a day (and more when things get heated). With this workflow, you spend maybe 5 minutes glancing at the Slack alerts and the daily email summary, because only the risky stuff gets pushed to the front. That’s about 3 hours back each week, plus fewer “how did we miss this?” moments.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Facebook Graph API to fetch posts and comments
- Slack to alert a channel when negativity spikes
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You’ll connect accounts, paste a few credentials, and sanity-check the sentiment thresholds.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A daily schedule kicks it off. At 10 AM by default, n8n starts a run and targets your configured Facebook Page via the Graph API.
Facebook data is pulled and cleaned. The workflow retrieves recent posts along with reactions and engagement fields, then fetches up to 100 comments per post. A normalization step structures the payload so the AI gets consistent inputs instead of messy text blobs.
GPT reviews sentiment and returns structured scores. An AI agent evaluates the post tone and the audience response, then outputs sentiment labels, confidence, and short explanations. A routing step decides what qualifies as “negative enough” to escalate.
Alerts, logging, and reporting happen automatically. Negative items go to Slack for immediate attention, while all results are logged to Google Sheets for trend tracking. Finally, a color-coded HTML report is sent through Microsoft Outlook, and an error trigger will notify Slack if the workflow fails.
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 daily schedule that initiates the sentiment workflow and begins data collection from Facebook.
- Open Daily Sentiment Trigger and confirm the rule interval is set to run at
10(triggerAtHour). - Connect Daily Sentiment Trigger to Retrieve Recent FB Posts to start the workflow on schedule.
Step 2: Connect Facebook Data Source
Pull recent Facebook posts and ensure the required fields are returned for sentiment analysis.
- Open Retrieve Recent FB Posts and set Edge to
postsand Graph API Version tov23.0. - Confirm the Fields include the full payload list shown in the node (IDs, messages, comments, reactions, and page info).
- Credential Required: Connect your facebookGraphApi credentials in Retrieve Recent FB Posts (this node needs authentication but none is configured).
Step 3: Set Up Processing and AI Sentiment Analysis
Normalize Facebook data, run AI sentiment analysis, and parse structured outputs for routing.
- Open Normalize FB Payload and keep the JavaScript formatter code as-is to flatten posts and comments.
- Open Sentiment Review Agent and confirm the prompt uses expressions like
{{$json.postId}},{{$json.message}}, and{{JSON.stringify($json.comments)}}. - Ensure OpenAI Chat Model is connected as the language model for Sentiment Review Agent and set Model to
gpt-4owith Temperature0.4. - Credential Required: Connect your openAiApi credentials in OpenAI Chat Model.
- Confirm Structured JSON Extractor is attached as the output parser for Sentiment Review Agent and retains the JSON schema example.
- Confirm Session Memory Buffer is attached as memory to Sentiment Review Agent with Session ID Type set to
customKeyand Session Key set to="Candidate Screening".
Step 4: Configure Routing and Parallel Actions
Route sentiment results, send negative alerts, and prepare records for the sheet update.
- Open Sentiment Score Router and confirm the rules evaluate
={{ $json.output.overallCommentSentiment.score }}with thresholds-0.4and0. - Note the parallel execution: Sentiment Score Router outputs to both Slack Negative Alert and Prepare Sheet Rows in parallel.
- In Slack Negative Alert, keep the alert message template and expressions such as
{{ $json.output.postMessage }}and{{ $json.output.overallCommentSentiment.score }}. - Credential Required: Connect your slackOAuth2Api credentials in Slack Negative Alert.
Step 5: Configure Reporting Outputs
Store sentiment results in Google Sheets and email a formatted HTML report.
- In Prepare Sheet Rows, keep the JavaScript that flattens data and sets
analyzedAtwithnew Date().toISOString(). - Open Update Sentiment Sheet and set Operation to
appendOrUpdate, Document ID to[YOUR_ID], and Sheet Name toSheet1(gid=0). - Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Sentiment Sheet.
- Open Compose HTML Report and keep the email HTML builder code unchanged for styled output.
- Open Dispatch Outlook Report and set Subject to
={{ $json.subject }}and Body Content to={{ $json.htmlBody }}; ensure Body Content Type ishtml. - Credential Required: Connect your microsoftOutlookOAuth2Api credentials in Dispatch Outlook Report.
Step 6: Add Error Handling
Capture failures and notify your team in Slack when the workflow encounters errors.
- Open Failure Capture Trigger and keep it connected to Slack Error Notification.
- In Slack Error Notification, verify the message uses expressions like
{{ $json.node.name }},{{ $json.error.message }}, and{{ $json.timestamp }}. - Credential Required: Connect your slackOAuth2Api credentials in Slack Error Notification (this node needs authentication but none is configured).
Step 7: Test and Activate Your Workflow
Run the workflow manually to validate the full sentiment pipeline and then enable it for daily reporting.
- Click Execute Workflow starting from Daily Sentiment Trigger and confirm Retrieve Recent FB Posts returns data.
- Verify Sentiment Review Agent outputs valid JSON through Structured JSON Extractor and routes through Sentiment Score Router.
- Confirm parallel results: Slack Negative Alert triggers for negative scores, and Update Sentiment Sheet appends rows.
- Validate the email by checking Dispatch Outlook Report for a message with subject from
{{ $json.subject }}and HTML content from{{ $json.htmlBody }}. - Turn the workflow Active to enable daily execution.
Common Gotchas
- Facebook Graph API credentials can expire or lack the right access. If things break, check your token status and confirm you have pages_read_engagement access in your Meta app 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 45 minutes if you already have the API access and logins.
No. You’ll mainly connect accounts and paste a few keys. The workflow already handles the logic and formatting.
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, which are usually a few cents per run depending on how many posts and 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 adjust the routing logic in the “Sentiment Score Router” so only certain confidence levels or sentiment labels trigger Slack. Common customizations include alerting only on high-confidence negative comments, adding a “warning” tier for mixed sentiment, and sending different Slack messages per product line.
Usually it’s an expired access token or missing permissions like pages_read_engagement. Regenerate the token in Meta for Developers, confirm the Page you’re querying matches the page ID in the workflow, and then update the credential in n8n. If it fails only on certain posts, you may also be hitting data visibility limits (for example, comments that are hidden or restricted). Rate limiting can show up too when you pull lots of posts and up to 100 comments each, so reducing the number of posts fetched can stabilize runs.
A typical daily run can comfortably process a handful of posts with up to 100 comments each, and the real ceiling depends on your n8n plan and your API limits.
For this use case, n8n is often the better fit because you can run more complex logic (routing, structured AI output, and richer formatting) without fighting platform limits. Self-hosting also matters if you want unlimited executions and tighter control over data, especially when you’re pulling comments and sending them to an AI model. Zapier and Make can work, but multi-step AI parsing plus branching usually gets expensive or awkward. Honestly, the deciding factor is how much you care about customization and cost at scale. Talk to an automation expert if you’re not sure which fits.
Once this is running, you’re not “checking Facebook.” You’re getting clear signals when something needs attention, plus a tidy record for reporting and learning.
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.