# AI-powered Facebook comment management: Auto-reply, delete, ban: n8n workflow

> Started by an event in a connected app, and works across Google Sheets. It puts OpenAI behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/ai-powered-facebook-comment-management-auto-reply-delete-ban (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Alerts and monitoring](https://millionrounds.com/workflows?category=Alerts+and+monitoring#library)

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

Started by an event in a connected app, and works across Google Sheets. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 44 steps, 5 branches, 4 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-facebook-comment-management-auto-reply-delete-ban)

**44 steps** Large: read it before trusting it with anything live

**5** Branches: places the flow splits

**4** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 7 Logic 24 Service 12

The steps in the order they run, from what starts it.

- 1 **Start** Manual trigger *Starts it*
- 2 **Think** Tool Think *Model*
- 3 **HTTP** Http Request Tool *Service*
- 4 **Memory** Memory Buffer Window *Model*
- 5 **Gemini** Google Gemini Tool *Model*
- 6 **Docs** Google Docs Tool *Service*
- 7 **OpenAI** Lm Chat Open Ai *Model*
- 8 **Get 0-100 Post from Page** Facebook Graph Api *Service*
- 9 **Positive Replay** Agent *Model*
- 10 **Support Replay** Agent *Model*
- 11 **Split All Posts** Split Out *Logic*
- 12 **Reply to Comment** Facebook Graph Api *Service*
- 13 **Loop Over Posts** Split In Batches *Logic*
- 14 **Do Nothing** No Op *Logic*
- 15 **Replace Post** No Op *Logic*
- 16 **Get Individual Post Comments** Facebook Graph Api *Service*
- 17 **Wait** Wait *Logic*
- 18 **Check Comment** If *Logic*
- 19 **Loop Over Items2** Split In Batches *Logic*
- 20 **Split All Comments** Split Out *Logic*
- 21 **Replace Comment** No Op *Logic*
- 22 **Replace Me2** No Op *Logic*
- 23 **Message a model** Open Ai *Model*
- 24 **Loop Over Comments** Split In Batches *Logic*
- 25 **Switch** Switch *Logic*
- 26 **Replace Me5** No Op *Logic*
- 27 **Get Any Replay in Comment** Http Request *Service*
- 28 **Delete Comment** Http Request *Service*
- 29 **Replace Me1** No Op *Logic*
- 30 **Check Replay** If *Logic*
- 31 **Append row in sheet** Google Sheets *Service*
- 32 **Edit Fields** Set *Logic*
- 33 **Separatamente Without Admin Reply** Code *Logic*
- 34 **Facebook Graph API** Facebook Graph Api *Service*
- 35 **Get row in sheet** Google Sheets *Service*
- 36 **Split Out Without Admin Reply Comments1** Split Out *Logic*
- 37 **Check Comment1** If *Logic*
- 38 **No Operation** No Op *Logic*
- 39 **Code in JavaScript** Code *Logic*
- 40 **Split Out Without Admin Reply Comments** Split Out *Logic*
- 41 **Replace Me4** No Op *Logic*
- 42 **If** If *Logic*
- 43 **Banned user** Facebook Graph Api *Service*
- 44 **Update row in sheet** Google Sheets *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 44, with 5 branches, 4 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 44 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 44 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-facebook-comment-management-auto-reply-delete-ban)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also alerts and monitoring, with the same services where possible, closest in size first.

- [**Get Gmail alerts for dropped top 10 keyword rankings** 43 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/get-gmail-alerts-for-dropped-top-10-keyword-rankings)
- [**Generate a YouTube bedtime story with OpenAI** 41 steps · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/generate-a-youtube-bedtime-story-with-openai)
- [**Plex to Discord and google sheet with Google Sheets** 48 steps · Discord, Google Sheets](https://millionrounds.com/workflow/plex-to-discord-and-google-sheet-with-google-sheets)
- [**Synchronize Slack status updates with Pinecone** 39 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/synchronize-slack-status-updates-with-pinecone)
- [**Sync HubSpot contacts with LinkedIn URLs** 36 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/sync-hubspot-contacts-with-linkedin-urls)
- [**Manage on-campus event attendance with Google Sheets** 35 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-on-campus-event-attendance-with-google-sheets)
