Skip to main content

AI-powered Facebook comment management: Auto-reply, delete, ban & notify

Workflow preview

Workflow preview
100%
AI-powered Facebook comment management: Auto-reply, delete, ban & notify preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? This n8n workflow is designed for Facebook Page administrators, social media managers, and community moderators who want to automate comment management on their Facebook Pages. It'...

Best for

  • Social Media automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.switch, n8n-nodes-base.facebookgraphapi, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.splitinbatches, n8n-nodes-base.code, n8n-nodes-base.splitout

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by SpaGreen Creative.

Original n8n.io source

1.1 Workflow description

Title
AI-powered Facebook comment management: Auto-reply, delete, ban & notify
Workflow name
AI-powered Facebook comment management: Auto-reply, delete, ban & notify

Who is this for?

This n8n workflow is designed for Facebook Page administrators, social media managers, and community moderators who want to automate comment management on their Facebook Pages. It's perfect for businesses with high comment volume, content creators, and marketing teams who need to maintain a positive community environment without manually reviewing every comment. The workflow automatically filters and responds to positive/supportive comments while handling negative ones appropriately.

What this Workflow Does

This n8n workflow monitors Facebook Page comments, classifies them using OpenAI, automatically responds to positive and supportive comments, and handles negative comments by deleting them and tracking repeat offenders. It can ban users who repeatedly post negative content and maintains a record of all interactions in Google Sheets.

Key Features

  • Automated Comment Monitoring: Fetches posts and comments from a Facebook Page
  • AI-Powered Classification: Uses OpenAI to classify comments into positive, supportive, or negative categories
  • Intelligent Response Generation: Creates human-like replies in the same language as the original comment (English or Bangla)
  • Negative Comment Management: Deletes negative comments and tracks them in Google Sheets
  • User Banning System: Automatically bans users who repeatedly post negative content
  • Admin Reply Detection: Only processes comments that haven't already received admin replies
  • Comprehensive Logging: Records all comment interactions in Google Sheets for analysis

Requirements

  • Facebook Page access with Graph API credentials
  • OpenAI API credentials for comment classification
  • Google Sheets account for logging comment data
  • n8n instance (self-hosted or cloud)
  • Facebook Page ID (configured as 47104xxxxx69097 in the workflow)

Google Sheet Column Structure

  • A Google Sheet formatted like thissample

Workflow Components

1. Post Retrieval Section

  • Start: Manual trigger to begin the workflow
  • Get 0-100 Posts from Page: Fetches up to 100 recent posts
  • Split All Posts: Breaks each post into individual items
  • Loop Over Posts: Iterates through each post for further processing

2. Comment Processing Section

  • Get Individual Post Comments: Retrieves comments for each post
  • Check Comment: Verifies the presence of comments
  • Split All Comments: Splits retrieved comments into individual items
  • Loop Over Comments: Iterates through comments one by one
  • Get Any Reply in Comment: Checks if the comment has admin replies
  • Check Reply: Confirms presence or absence of replies

3. Admin Reply Detection

  • Edit Fields: Extracts relevant data from comments
  • Separatamento Without Admin Reply: Filters out comments that haven't received admin replies
  • Check Comment1: Validates if such comments exist
  • Split Out Without Admin Reply Comments: Prepares these comments for AI classification

4. Comment Classification (via OpenAI)

  • Loop Over Items2: Loops through comments without admin replies
  • Replay Comment Data: Uses OpenAI to classify comments

5. Response Generation

  • Switch: Routes comments based on classification
  • Positive Replay: Generates a friendly, human-like reply for positive comments
  • Support Replay: Generates a warm, appreciative reply for supportive comments
  • Reply to Comment: Posts the AI-generated reply on Facebook

6. Negative Comment Handling

  • Delete Comment: Removes negative comments from Facebook
  • Append Row in Sheet: Logs comment details in Google Sheets
  • Get Row in Sheet: Retrieves user history from the sheet
  • Code in JavaScript: Counts how many negative comments the user has posted
  • If: Checks if user has more than 1 negative comment
  • Banned User: Executes a Facebook ban on repeat offenders
  • Update Row in Sheet: Updates the user's status to banned in Google Sheets

7. Optional Features

  • Facebook Graph API: Sends warning messages to users with negative comments

Support & Help

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 2 - Reply to Comment

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 3 - Positive Replay

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 4 - Support Replay

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 5 - Delete Comment

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 7 - Check Comment

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Loop Over Items2

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 9 - Separatamente Without Admin Reply

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Split Out Without Admin Reply Comments

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 11 - Replace Me1

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 12 - Replace Me2

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 13 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 14 - Check Comment1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 15 - Replace Me4

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 16 - Replace Me5

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 17 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Start

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 19 - Get 0-100 Post from Page

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 20 - Split All Posts

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 21 - Loop Over Posts

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 22 - Get Individual Post Comments

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 23 - Split All Comments

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 24 - Replace Post

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Showing the first 24 of 59 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow AI-powered Facebook comment management: Auto-reply, delete, ban & notify
Complexity advanced
Nodes 59
Categories Social Media, AI Summarization
Author SpaGreen Creative
Published 30 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10320/10320.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI-powered Facebook comment management: Auto-reply, delete, ban & notify do?

Who is this for? This n8n workflow is designed for Facebook Page administrators, social media managers, and community moderators who want to automate comment management on their Facebook Pages. It'...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, AI Summarization use case.