Messenger to Slack, approved replies and Sheets logs
Your Facebook Messenger inbox starts out manageable. Then a promo runs, a post goes semi-viral, or you launch a new offer. Suddenly you’re skimming dozens of DMs, guessing what’s urgent, copying details into notes, and still missing a few that mattered.
This is exactly what marketing managers feel during campaigns, and it hits support leads on busy days too. Even small business owners get dragged into it because nobody wants leads or legit questions sitting unanswered. With this Messenger Slack approval automation, messages get triaged, replies get drafted, and nothing goes out until your team approves it.
You’ll see how the workflow sorts Messenger DMs into Lead, Query, or Spam, routes the right ones to Slack for sign-off, replies only after approval, and logs every interaction to Google Sheets.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Messenger to Slack, approved replies and Sheets logs
flowchart LR
subgraph sg0["Trigger – Fetch New Facebook Messages (Every Hour) Flow"]
direction LR
n2@{ icon: "mdi:play-circle", form: "rounded", label: "Trigger – Fetch New Facebook..", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Format Incoming Message Data", pos: "b", h: 48 }
n4["<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 Facebook Conversations.."]
n5@{ icon: "mdi:brain", form: "rounded", label: "Model – GPT-4 Language Model", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "AI – Classify Message (Lead ..", pos: "b", h: 48 }
n7@{ icon: "mdi:robot", form: "rounded", label: "Parse AI Output (JSON Parser)", pos: "b", h: 48 }
n8@{ icon: "mdi:memory", form: "rounded", label: "Memory – Conversation Contex..", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route Messages by Category", 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 Approval – Lead Message"]
n11@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Lead Approval Status", pos: "b", h: 48 }
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/facebook.svg' width='40' height='40' /></div><br/>Send AI Reply – Lead Approved"]
n13["<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/>Send Fallback Reply – Lead R.."]
n14@{ icon: "mdi:database", form: "rounded", label: "Log to Google Sheets – Lead ..", pos: "b", h: 48 }
n15@{ icon: "mdi:database", form: "rounded", label: "Log to Google Sheets – Lead ..", pos: "b", h: 48 }
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/slack.svg' width='40' height='40' /></div><br/>Slack Approval – Query Message"]
n17@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Query Approval Status", pos: "b", h: 48 }
n18["<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/>Send AI Reply – Query Approved"]
n19["<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/>Send Fallback Reply – Query .."]
n20@{ icon: "mdi:database", form: "rounded", label: "Log to Google Sheets – Query..", pos: "b", h: 48 }
n21@{ icon: "mdi:database", form: "rounded", label: "Log to Google Sheets – Query..", pos: "b", h: 48 }
n22@{ icon: "mdi:database", form: "rounded", label: "Log to Google Sheets – Spam ..", pos: "b", h: 48 }
n11 --> n12
n11 --> n13
n9 --> n10
n9 --> n16
n9 --> n22
n17 --> n18
n17 --> n19
n3 --> n6
n7 -.-> n6
n5 -.-> n6
n12 --> n14
n10 --> n11
n18 --> n20
n16 --> n17
n13 --> n15
n8 -.-> n6
n19 --> n21
n4 --> n3
n6 --> n9
n2 --> 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 n2,n0 trigger
class n6,n7 ai
class n5 aiModel
class n8 ai
class n9,n11,n17 decision
class n14,n15,n20,n21,n22 database
class n4,n12,n13,n18,n19 api
classDef customIcon fill:none,stroke:none
class n4,n10,n12,n13,n16,n18,n19,n1 customIcon
The Problem: Messenger DMs Turn Into a Mess
Messenger is great for engagement, but terrible as a “system.” Leads, real support questions, random “hi,” and spam all land in the same place, and it’s on you to figure it out. The manual triage is where time disappears: you read, interpret intent, decide who should answer, try to match your brand voice, then remember to follow up. And when someone on the team replies quickly but inconsistently, you get avoidable back-and-forth (or worse, a screenshot-worthy mistake). It’s exhausting, honestly.
The friction compounds. Here’s where it breaks down most teams.
- You spend about 1–2 minutes per message just deciding what it is, and the backlog grows fast when DMs spike.
- Replies come from different people with different tone, so customers get mixed signals and your brand voice drifts.
- Approvals happen in scattered places (DMs, screenshots, “can you check this?”), which slows response time.
- There’s no clean record of what was asked, what you answered, and whether it was handled, so reporting is guesswork.
The Solution: AI Triage + Slack Approval + Sheets Logging
This workflow turns your Messenger inbox into a simple, repeatable process. Every hour, n8n checks your Facebook Page conversations, pulls new messages, and formats the sender details and message text so it’s ready for analysis. Then GPT-4 categorizes each message as a Lead, Query, or Spam and drafts a suggested reply using a structured format, so the “AI output” is consistent and usable. Leads and queries get posted into Slack for a quick approval decision. Once approved, the workflow replies in Messenger automatically and logs the full interaction in Google Sheets, including the category and approval status. If something breaks, you still hear about it because errors trigger an alert in Slack.
The workflow starts on a schedule (hourly) and pulls in new Messenger messages through the Facebook Graph API. GPT-4 handles intent detection and draft replies, then Slack acts as the checkpoint before anything is sent. Finally, Google Sheets becomes your source of truth for tracking.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your Page gets about 40 DMs a day after a campaign. Manually, if you spend just 2 minutes reading and sorting each one, that’s about 80 minutes before you even start replying, plus another 2–3 minutes to draft a decent response and double-check it. With this workflow, the “sorting + draft” part happens automatically during the hourly run, and your team only spends time approving the messages that matter. If approvals take 20–30 seconds each for the 10–15 real leads and queries, you’re usually looking at roughly 10 minutes of focused work instead of a daily inbox slog.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Facebook Graph API to fetch and reply to Page DMs.
- Slack to approve replies in one channel.
- Google Sheets to log messages and outcomes.
- OpenAI API key (get it from the OpenAI dashboard).
Skill level: Intermediate. You’ll connect accounts, set a few environment variables (IDs), and test the approval loop end-to-end.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Hourly inbox check. The schedule trigger runs once an hour and calls the Facebook Graph API to retrieve your latest Page conversations, so you’re not relying on someone to “remember to check.”
Message packaging for analysis. n8n extracts the sender, timestamp, and message body, then formats it into a clean payload. This sounds small, but it’s what makes the next step reliable.
AI categorization and draft replies. A GPT-4 powered agent classifies the message as Lead, Query, or Spam and returns structured output (category plus suggested response). That output gets routed through a switch, so each type follows the right path.
Slack approval, Messenger reply, Sheets tracking. Leads and queries are posted to Slack for a decision, then the workflow replies on Messenger only when approval comes through. Every outcome is logged in Google Sheets: approved, pending/fallback, or spam.
You can easily modify the categories (Lead/Query/Spam) to match your business and change the Slack message format to include things like order IDs or campaign tags. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
This workflow checks Facebook Messenger conversations on a recurring schedule.
- Add the Hourly Messenger Check node as your trigger.
- Set the interval rule to run every hour (already configured in the node).
- Connect Hourly Messenger Check to Retrieve FB Conversations.
Step 2: Connect Facebook Messenger Retrieval
Pull the latest Messenger conversations and prepare them for AI classification.
- Open Retrieve FB Conversations and confirm Edge is set to
conversationsand Graph API Version tov23.0. - Credential Required: Connect your facebookGraphApi credentials in Retrieve FB Conversations.
- In Prepare Message Payload, map fields using expressions:
- Message →
{{ $json.data[0].messages.data[0].message }} - Senders Name →
{{ $json.data[0].messages.data[0].from.name }} - Sender Email →
{{ $json.data[0].messages.data[0].from.email }} - Created Time →
{{ $json.data[0].messages.data[0].created_time }} - Senders ID →
{{ $json.data[0].messages.data[0].from.id }}
- Message →
- Connect Retrieve FB Conversations → Prepare Message Payload → Classify Messenger Text.
access_token query parameter with an empty value. Ensure your Facebook credentials provide a valid token for API calls.Step 3: Set Up AI Classification
Use the AI agent to classify messages into Lead, Query, or Spam and generate a suggested reply.
- Open Classify Messenger Text and verify the Text prompt uses the expressions:
{{ $json["Message"] }}{{ $json["Senders Name"] }}{{ $json["Sender Email"] }}{{ $json["Created Time"] }}
- Ensure Classify Messenger Text has output parsing enabled and its system message matches your classification rules.
- Connect GPT-4 Chat Model as the language model for Classify Messenger Text. Credential Required: Connect your openAiApi credentials in GPT-4 Chat Model.
- Attach Context Memory Buffer and set Session Key to
"Message Categorization". Add any credentials to the parent Classify Messenger Text node if needed. - Attach Parse AI JSON Result with the provided schema example. Add any credentials to the parent Classify Messenger Text node if needed.
Step 4: Configure Routing and Slack Approvals
Route AI output by category and request approvals for Lead and Query replies.
- In Route by Category, confirm the rules match:
- Lead:
{{ $json.output.category }}equalsLead - Query:
{{ $json.output.category }}equalsQuery - Spam:
{{ $json.output.category }}equalsSpam
- Lead:
- Connect the Lead route to Slack Lead Approval and the Query route to Slack Query Approval; Spam goes directly to Sheets Log Spam.
- Credential Required: Connect your slackApi credentials in both Slack Lead Approval and Slack Query Approval.
- Verify both Slack nodes use Operation =
sendAndWaitfor approval capture. - Confirm Slack Lead Approval → Verify Lead Decision and Slack Query Approval → Verify Query Decision.
Step 5: Configure Facebook Replies and Google Sheets Logs
Send approved or fallback replies and record outcomes in Google Sheets.
- In Verify Lead Decision and Verify Query Decision, keep the approval checks:
{{ $json.data.approved }}equalstrue→ send approved reply{{ $json.data.approved }}equalsfalse→ send fallback reply
- For Facebook responses, ensure each node uses:
- Post Lead Reply and Post Query Reply message value:
{{ JSON.stringify({ text: $('Classify Messenger Text').item.json.output.suggested_reply }) }} - Send Lead Fallback and Send Query Fallback message value: the configured fallback text
- Post Lead Reply and Post Query Reply message value:
- Credential Required: Connect your facebookGraphApi credentials to all Facebook reply nodes (five nodes handle approved and fallback replies).
- Set all Google Sheets logging nodes to Operation
appendOrUpdateand confirm the mapping values use expressions like:- Summary →
{{ $('Classify Messenger Text').item.json.output.summary }} - AI Reply →
{{ $('Classify Messenger Text').item.json.output.suggested_reply }} - Category →
{{ $('Classify Messenger Text').item.json.output.category }} - Sender ID →
{{ $('Prepare Message Payload').item.json["Senders ID"] }} - Timestamp →
{{ $('Prepare Message Payload').item.json["Created Time"] }} - Sender Name →
{{ $('Prepare Message Payload').item.json["Senders Name"] }}
- Summary →
- Credential Required: Connect your googleSheetsOAuth2Api credentials to all Sheets log nodes (five nodes log Approved, Pending, and Spam outcomes).
Step 6: Add Error Handling
Capture workflow errors and notify your team in Slack.
- Confirm Failure Catch Trigger is present and connected to Slack Error Notice.
- In Slack Error Notice, keep the Text field set to
❌ *Error in API Error Catalog Workflow* *Node:* {{ $json.node.name }} *Message:* {{ $json.error.message }} *Time:* {{ $json.timestamp }}. - Credential Required: Connect your slackApi credentials in Slack Error Notice.
Step 7: Test and Activate Your Workflow
Run a full test to validate classification, approvals, replies, and logging.
- Click Execute Workflow and manually trigger Hourly Messenger Check with a sample conversation.
- Confirm Classify Messenger Text outputs
category,summary, andsuggested_reply, then verify Route by Category routes correctly. - Approve in Slack and verify that Post Lead Reply or Post Query Reply sends a message and logs to the corresponding Sheets node.
- Decline approval to confirm Send Lead Fallback or Send Query Fallback is used and logs to the Pending sheets.
- Once validation succeeds, toggle the workflow to Active for production use.
Common Gotchas
- Facebook Graph API credentials can expire or be missing Page message permissions. If things break, check your Meta App settings and Page access tokens 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 approvals rely on the right channel and permissions. If approvals don’t route correctly, confirm the channel ID and that your app has chat:write access.
Frequently Asked Questions
About 45 minutes if you already have your API access sorted.
No. You’ll mainly connect accounts and paste IDs/keys into the right fields. The “logic” is already built into the workflow.
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 cents per day for typical inbox volume).
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 it’s one of the best tweaks you can make. Update the GPT-4 agent prompt to return your categories (for example: “Pricing,” “Support,” “Partnership,” “Abuse”), then adjust the “Route by Category” switch to match. You can also change the Slack messages to post into different channels per category. Common customizations include adding a “VIP” path, auto-rejecting certain keywords, and writing different log columns in Google Sheets.
Usually it’s permissions or an expired token tied to your Facebook app. Confirm your app has Page messaging permissions and that you’re using the right Page ID. If the workflow used to work and suddenly doesn’t, regenerate the access token and update it in n8n. Also watch for message retrieval limits if you’re pulling a lot of conversations at once.
Plenty for most small teams: hundreds of DMs per day is realistic, as long as your Slack approvals and API limits keep up.
It depends on how strict you are about control and how messy your inbox gets. n8n is great when you need branching logic (Lead vs Query vs Spam), structured AI output, and a self-host option so you’re not paying more every time volume jumps. Zapier or Make can be faster to start for a simple “new message → send to Slack” flow, but approvals plus logging plus AI categorization gets complicated quickly. Frankly, the approval gate is where many no-code tools start feeling cramped. If you’re unsure, Talk to an automation expert and map it to your exact volume and risk tolerance.
Once this is running, Messenger stops being a daily fire drill. You get cleaner triage, approved replies, and a log you can actually report from.
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.