Facebook + Google Sheets, clean comment moderation
You post something, engagement rolls in, and then the comments turn into a second job. Some are great. Some need a careful response. A few are just toxic, and frankly, they derail the whole thread if you let them sit.
Social media managers feel this every day. A Facebook Page admin dealing with high-volume posts does too. If you’re running a small brand and you’re the “community team” by default, Facebook comment automation is how you get your time back without letting the page get messy.
This workflow monitors your Facebook Page comments, uses OpenAI to classify them, replies to the good ones, deletes the bad ones, and logs everything to Google Sheets so you can see what happened later.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Facebook + Google Sheets, clean comment moderation
flowchart LR
subgraph sg0["Start Flow"]
direction LR
n0@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Switch", 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/facebook.svg' width='40' height='40' /></div><br/>Reply to Comment"]
n2@{ icon: "mdi:robot", form: "rounded", label: "Positive Replay", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Support Replay", 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/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Comment"]
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Comment", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items2", pos: "b", h: 48 }
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/code.svg' width='40' height='40' /></div><br/>Separatamente Without Admin .."]
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out Without Admin Repl..", pos: "b", h: 48 }
n10@{ icon: "mdi:cog", form: "rounded", label: "Replace Me1", pos: "b", h: 48 }
n11@{ icon: "mdi:cog", form: "rounded", label: "Replace Me2", pos: "b", h: 48 }
n12@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n13@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Comment1", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Replace Me4", pos: "b", h: 48 }
n15@{ icon: "mdi:cog", form: "rounded", label: "Replace Me5", pos: "b", h: 48 }
n16@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n17@{ icon: "mdi:play-circle", form: "rounded", label: "Start", 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/>Get 0-100 Post from Page"]
n19@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split All Posts", pos: "b", h: 48 }
n20@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Posts", pos: "b", h: 48 }
n21["<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/>Get Individual Post Comments"]
n22@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split All Comments", pos: "b", h: 48 }
n23@{ icon: "mdi:cog", form: "rounded", label: "Replace Post", pos: "b", h: 48 }
n24@{ icon: "mdi:cog", form: "rounded", label: "Replace Comment", pos: "b", h: 48 }
n25@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Comments", pos: "b", h: 48 }
n26["<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/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Any Replay in Comment"]
n27@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check Replay", pos: "b", h: 48 }
n28@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out Without Admin Repl..", pos: "b", h: 48 }
n29@{ icon: "mdi:database", form: "rounded", label: "Append row in sheet", pos: "b", h: 48 }
n30["<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/>Code in JavaScript"]
n31@{ icon: "mdi:cog", form: "rounded", label: "No Operation", pos: "b", h: 48 }
n32["<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/>Banned user"]
n33@{ icon: "mdi:database", form: "rounded", label: "Get row in sheet", pos: "b", h: 48 }
n34@{ icon: "mdi:database", form: "rounded", label: "Update row in sheet", pos: "b", h: 48 }
n35["<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/>Facebook Graph API"]
n36@{ icon: "mdi:wrench", form: "rounded", label: "Think", pos: "b", h: 48 }
n37@{ icon: "mdi:web", form: "rounded", label: "HTTP", pos: "b", h: 48 }
n38@{ icon: "mdi:memory", form: "rounded", label: "Memory", pos: "b", h: 48 }
n39@{ icon: "mdi:wrench", form: "rounded", label: "Gemini", pos: "b", h: 48 }
n40@{ icon: "mdi:cog", form: "rounded", label: "Do Nothing", pos: "b", h: 48 }
n41@{ icon: "mdi:cog", form: "rounded", label: "Docs", pos: "b", h: 48 }
n42@{ icon: "mdi:robot", form: "rounded", label: "Message a model", pos: "b", h: 48 }
n43@{ icon: "mdi:brain", form: "rounded", label: "OpenAI", pos: "b", h: 48 }
n5 --> n32
n5 --> n31
n41 -.-> n2
n41 -.-> n3
n37 -.-> n2
n37 -.-> n3
n12 --> n7
n17 --> n18
n36 -.-> n2
n36 -.-> n3
n39 -.-> n2
n39 -.-> n3
n38 -.-> n2
n38 -.-> n3
n43 -.-> n2
n43 -.-> n3
n0 --> n2
n0 --> n3
n0 --> n4
n40 --> n12
n32 --> n34
n16 --> n28
n10 --> n20
n11 --> n25
n14 --> n25
n15 --> n10
n27 --> n16
n27 --> n8
n31 --> n12
n6 --> n22
n6 --> n24
n13 --> n9
n13 --> n14
n4 --> n29
n3 --> n1
n20 --> n23
n20 --> n21
n42 --> n0
n2 --> n1
n24 --> n20
n19 --> n20
n33 --> n30
n7 --> n11
n7 --> n42
n1 --> n40
n30 --> n5
n35 --> n31
n25 --> n15
n25 --> n26
n22 --> n25
n29 --> n35
n29 --> n33
n34 --> n12
n18 --> n19
n26 --> n27
n21 --> n6
n8 --> n13
n9 --> n7
n28 --> n7
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 n17 trigger
class n2,n3,n42 ai
class n43 aiModel
class n36,n39 ai
class n38 ai
class n0,n5,n6,n13,n27 decision
class n29,n33,n34 database
class n1,n4,n18,n21,n26,n32,n35,n37 api
class n8,n30 code
classDef customIcon fill:none,stroke:none
class n1,n4,n8,n18,n21,n26,n30,n32,n35 customIcon
Why This Matters: Keeping Comments Clean Without Living in Facebook
Manual moderation looks simple until you’re doing it across multiple posts, all day. You open a notification, scan the thread, check if someone already replied, decide what tone to use, and then try to be “on brand” while also moving fast. Meanwhile, the worst comments are the ones that get screenshotted, shared, and remembered. Even when you delete them, you often lose the paper trail, which makes it hard to explain decisions to a client or your boss. And the longer you wait, the more the thread sets its tone.
It adds up fast. Here’s where it usually breaks down.
- High-volume posts create a constant backlog, so positive commenters get ignored while the loudest negativity sits at the top.
- Replies come out inconsistent because you’re answering in a hurry (or different team members write in totally different voices).
- It’s easy to miss repeat offenders when you’re scanning threads manually, especially on older posts that keep getting new comments.
- You end up with no audit trail, which means you can’t review patterns, train the team, or justify bans later.
What You’ll Build: AI Moderation + Consistent Replies + Google Sheets Logging
This workflow watches your Facebook Page, pulls in your most recent posts, and then checks comments on each post. Before it does anything, it looks for admin replies so it won’t double-reply or create awkward “thanks!” stacks. For comments that still need attention, OpenAI classifies the message as positive, supportive, or negative. Positive and supportive comments get an on-brand reply generated in the same language as the original comment (English or Bangla), then posted back to Facebook automatically. Negative comments are removed, logged to Google Sheets, and tied back to the user so repeat negativity is tracked over time. If someone keeps doing it, the workflow can ban them and update their status in the sheet.
The workflow starts by fetching up to 100 recent posts and looping through them. Next, it loops through comments, filters out anything already handled by an admin, and sends only the “needs attention” comments to OpenAI. Finally, it either replies (good comments) or deletes and logs (bad comments), with a repeat-offender check that can trigger a ban.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say your page gets about 80 comments a day across several posts. If you spend only 1 minute deciding “reply, ignore, delete” and another minute writing a response, that’s roughly 2.5 hours daily. With this workflow, the heavy lifting is automated: comments are classified, replies are generated, and negative posts are removed and logged while you’re doing other work. Most teams end up spending about 10 minutes skimming the sheet and spot-checking edge cases.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Facebook Page + Graph API access to read, reply, delete, and ban.
- Google Sheets to store the moderation audit trail.
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You’ll connect credentials and confirm Facebook permissions, but you won’t be writing an app from scratch.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
Scheduled pull of recent posts. A Schedule Trigger starts the run, then the workflow fetches up to 100 posts from your Facebook Page so it can review what’s actively getting comments.
Comment collection with “already handled” filtering. Each post is processed one at a time, comments are split into individual items, and the workflow checks whether an admin reply exists. If the thread is already handled, it moves on.
OpenAI classification and reply writing. For comments that still need attention, OpenAI labels the intent (positive, supportive, negative). Positive and supportive comments get a human-sounding reply in the same language as the commenter, then n8n posts that reply back to Facebook.
Negative moderation, logging, and escalation. Negative comments are deleted, details get appended to Google Sheets, and the workflow checks the sheet to see if this user has done it before. If they’re a repeat offender, it bans them and updates their “banned” status in the sheet.
You can easily modify the reply tone and the ban threshold based on your needs. See the full implementation guide below for customization options.
Troubleshooting Tips
- Facebook Graph API credentials can expire or lack the right permissions. If things break, check your Facebook App token status and Page permissions in Meta for Developers 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.
Quick Answers
About 45 minutes if your Facebook and Google credentials are ready.
No. You’ll mostly connect accounts, paste API keys, and tweak the reply prompts.
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 for a batch of comments depending on model and 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 you probably should. You can adjust the OpenAI classification prompt to match your moderation policy, change the Switch paths to add a “needs human review” category, and edit the Positive Replay/Support Replay prompts to match your brand voice. If you don’t want auto-bans, simply disable the “If user has more than 1 negative comment” branch and keep logging only.
Usually it’s an expired token or missing permissions for reading comments and managing the Page. Reconnect your Facebook credentials in n8n, then confirm your Meta app has the right access for the Page you’re targeting. If it fails only on delete/ban actions, that’s a strong sign the token can read data but doesn’t have moderation permissions.
Plenty for most Pages: it pulls up to 100 posts per run and processes comments one by one, so volume mostly depends on how often you schedule it and your n8n plan.
Often, yes, because this is not a simple two-step zap. You’re looping through posts, looping through comments, checking for admin replies, branching by AI classification, and then doing a “look up user history and escalate” flow. That kind of logic gets expensive or awkward in tools that price by task and prefer linear automations. n8n also gives you a self-host option, which is handy when you want predictable costs. Zapier or Make can still work if you only want “send comments to a sheet” with no moderation actions. If you’re torn, Talk to an automation expert and get a straight recommendation.
Once this is running, moderation stops being a constant interruption and turns into a quick review habit. The workflow handles the repetitive calls so you can focus on the community, not the cleanup.
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.