# Smart human takeover & auto pause AI-powered Facebook Messenger: n8n workflow

> Started by another system calling it, and works across n8n data table. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/smart-human-takeover-and-auto-pause-ai-powered-facebook-mess (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# Smart human takeover & auto pause AI-powered Facebook Messenger

Started by another system calling it, and works across n8n data table. It hands the judgement calls to Gemini. 32 steps, 5 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsmart-human-takeover-and-auto-pause-ai-powered-facebook-mess)

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

**5** Branches: places the flow splits

**2** Loops or waits

**1** Service it connects to

## The flow

Starts it 2 Model 2 Logic 15 Service 13

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

- 1 **Facebook Webhook** Webhook *Starts it*
- 2 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 3 **Confirm Webhook** Respond To Webhook *Starts it*
- 4 **Is message** If *Logic*
- 5 **Process Merged Message** Agent *Model*
- 6 **Set Context** Set *Logic*
- 7 **Format for Facebook Output** Code *Logic*
- 8 **Is from page?** If *Logic*
- 9 **Loop Over Items** Split In Batches *Logic*
- 10 **User is Reciepient** Set *Logic*
- 11 **User is Sender** Set *Logic*
- 12 **Update FALSE to TRUE** Data Table *Service*
- 13 **Delay Between Messages** Wait *Logic*
- 14 **Is from AI?** If *Logic*
- 15 **Check Paused List** Data Table *Service*
- 16 **Update Page Rep** Data Table *Service*
- 17 **Send Text** Http Request *Service*
- 18 **Insert to Paused List** Data Table *Service*
- 19 **In Paused List?** If *Logic*
- 20 **Clean History** Data Table *Service*
- 21 **Insert human rep** Data Table *Service*
- 22 **Comparison time** Set *Logic*
- 23 **Insert To Unprocessed** Data Table *Service*
- 24 **Seen** Http Request *Service*
- 25 **Is still Pause?** If *Logic*
- 26 **Get MaxID and Merged Mess** Code *Logic*
- 27 **Insert To Processed** Data Table *Service*
- 28 **Remove from Paused List** Data Table *Service*
- 29 **Get history message** Data Table *Service*
- 30 **Get 15 newest rows** Code *Logic*
- 31 **Merge History and Find Min_ID** Code *Logic*
- 32 **Send Typing** Http Request *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 32, with 5 branches, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** n8n data table
- **Model:** Gemini

## Questions

What does it need to run?

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

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 32 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 32 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%2Fsmart-human-takeover-and-auto-pause-ai-powered-facebook-mess)
- **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.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Route revenue transactions and assess AI outputs with Claude** 30 steps · calls a model · n8n data table](https://millionrounds.com/workflow/route-revenue-transactions-and-assess-ai-outputs-with-claude)
- [**Build a Headless AI Chat API with Memory and History** 26 steps · calls a model · n8n data table](https://millionrounds.com/workflow/build-a-headless-ai-chat-api-with-memory-and-history)
- [**Email-to-task automation with Outlook and Microsoft To Do** 26 steps · calls a model · Gmail, Google Tasks](https://millionrounds.com/workflow/email-to-task-automation-with-outlook-and-microsoft-to-do)
- [**Smart message batching AI-powered Facebook Messenger chatbot use** 25 steps · calls a model · n8n data table](https://millionrounds.com/workflow/smart-message-batching-ai-powered-facebook-messenger-chatbot)
- [**Analyze and modernize university curricula with OpenAI** 24 steps · calls a model · in-memory vectors, n8n data table](https://millionrounds.com/workflow/analyze-and-modernize-university-curricula-with-openai)
- [**Segment players and predict churn with OpenAI** 23 steps · calls a model · in-memory vectors, n8n data table](https://millionrounds.com/workflow/segment-players-and-predict-churn-with-openai)
