# Coordinate robot swarms with OpenAI: n8n workflow template

> Started by another system calling it, and works across Slack and n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents...

Source: https://millionrounds.com/workflow/coordinate-robot-swarms-with-openai (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)

# Coordinate robot swarms with OpenAI

Started by another system calling it, and works across Slack and n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 22 steps, 1 branch: 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%2Fcoordinate-robot-swarms-with-openai)

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

**1** Branch: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 3 Model 6 Logic 7 Service 6

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

- 1 **Mission Command API** Webhook *Starts it*
- 2 **Periodic Swarm Optimization** Schedule trigger *Starts it*
- 3 **OpenAI GPT-5** Lm Chat Open Ai *Model*
- 4 **Swarm Coordination Memory** Memory Buffer Window *Model*
- 5 **Task Allocation Tool** Tool Code *Model*
- 6 **Path Planning Tool** Tool Code *Model*
- 7 **Formation Control Tool** Tool Code *Model*
- 8 **Robot Sensor Data Stream** Webhook *Starts it*
- 9 **Parse Command Input** Set *Logic*
- 10 **Get All Robot States** Data Table *Service*
- 11 **Swarm AI Coordinator** Agent *Model*
- 12 **Parse Sensor Data** Set *Logic*
- 13 **Execute Mission Command** Set *Logic*
- 14 **Format Coordination Output** Set *Logic*
- 15 **Store Robot State** Data Table *Service*
- 16 **Check Critical Conditions** If *Logic*
- 17 **Store Mission Log** Data Table *Service*
- 18 **Publish Mission to Swarm** Slack *Service*
- 19 **Publish Coordination Updates** Slack *Service*
- 20 **Publish to Swarm Channel** Slack *Service*
- 21 **Prepare AI Context** Set *Logic*
- 22 **Log Normal Operation** Set *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Slack, n8n data table
- **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 Slack account, and a key for OpenAI. 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 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 22 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 22 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%2Fcoordinate-robot-swarms-with-openai)
- **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.

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

## Workflows like it

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

- [**Analyze contract PDFs and score risk with Claude and Postgres** 22 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/analyze-contract-pdfs-and-score-risk-with-claude-and-postgre)
- [**Audit & monitor SEO performance with OpenAI** 22 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/audit-and-monitor-seo-performance-with-openai)
- [**Automated job intelligence system with Decodo** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automated-job-intelligence-system-with-decodo)
- [**Filter breaking geopolitical news with Telegram** 22 steps · calls a model · RSS, Telegram](https://millionrounds.com/workflow/filter-breaking-geopolitical-news-with-telegram)
- [**Monitor academic integrity signals with OpenAI** 22 steps · calls a model · Email, n8n data table](https://millionrounds.com/workflow/monitor-academic-integrity-signals-with-openai)
- [**Monitor and enforce seller compliance with OpenAI and Slack** 22 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/monitor-and-enforce-seller-compliance-with-openai-and-slack)
