# Route ERP tasks across departments with OpenAI and Slack: n8n workflow

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

Source: https://millionrounds.com/workflow/route-erp-tasks-across-departments-with-openai-and-slack (Millionrounds; every figure on the page links to its filing or article)

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

# Route ERP tasks across departments with OpenAI and Slack

Started by another system calling it, and works across Gmail, 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. 44 steps, 2 branches: 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%2Froute-erp-tasks-across-departments-with-openai-and-slack)

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

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 28 Logic 4 Service 10

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

- 1 **Webhook - External Systems** Webhook *Starts it*
- 2 **Schedule - Daily Operations** Schedule trigger *Starts it*
- 3 **Orchestrator Model** Lm Chat Open Ai *Model*
- 4 **Orchestrator Memory** Memory Buffer Window *Model*
- 5 **Orchestrator ERP Tool** Http Request Tool *Service*
- 6 **Orchestrator Calculator** Tool Calculator *Model*
- 7 **Orchestrator Parser** Output Parser Structured *Model*
- 8 **Engineering Model** Lm Chat Open Ai *Model*
- 9 **Engineering Memory** Memory Buffer Window *Model*
- 10 **Engineering ERP Tool** Http Request Tool *Service*
- 11 **Engineering Calculator** Tool Calculator *Model*
- 12 **Engineering Parser** Output Parser Structured *Model*
- 13 **Finance Model** Lm Chat Open Ai *Model*
- 14 **Finance Memory** Memory Buffer Window *Model*
- 15 **Finance ERP Tool** Http Request Tool *Service*
- 16 **Finance Calculator** Tool Calculator *Model*
- 17 **Finance Parser** Output Parser Structured *Model*
- 18 **HR Model** Lm Chat Open Ai *Model*
- 19 **HR Memory** Memory Buffer Window *Model*
- 20 **HR ERP Tool** Http Request Tool *Service*
- 21 **HR Parser** Output Parser Structured *Model*
- 22 **Admin Model** Lm Chat Open Ai *Model*
- 23 **Admin Memory** Memory Buffer Window *Model*
- 24 **Admin ERP Tool** Http Request Tool *Service*
- 25 **Admin Parser** Output Parser Structured *Model*
- 26 **Reporting Model** Lm Chat Open Ai *Model*
- 27 **Reporting Memory** Memory Buffer Window *Model*
- 28 **Reporting Calculator** Tool Calculator *Model*
- 29 **Reporting Parser** Output Parser Structured *Model*
- 30 **Orchestrator Agent** Agent *Model*
- 31 **Fetch Pending Tasks** Data Table *Service*
- 32 **Engineering Agent** Agent *Model*
- 33 **Finance Agent** Agent *Model*
- 34 **HR Agent** Agent *Model*
- 35 **Admin Agent** Agent *Model*
- 36 **Generate Daily Report** Agent *Model*
- 37 **Route by Department** Switch *Logic*
- 38 **Aggregate Tasks** Aggregate *Logic*
- 39 **Combine Agent Results** Merge *Logic*
- 40 **Email Daily Report** Gmail *Service*
- 41 **Requires Human Approval?** If *Logic*
- 42 **Send Approval Email** Gmail *Service*
- 43 **Notify Team on Slack** Slack *Service*
- 44 **Store Task Result** Data Table *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 44, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, 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 Gmail and Slack accounts, 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 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%2Froute-erp-tasks-across-departments-with-openai-and-slack)
- **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.

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

## Workflows like it

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

- [**AI advanced automation agent with Azure OpenAI and Gmail** 45 steps · calls a model · Gmail, Telegram](https://millionrounds.com/workflow/ai-advanced-automation-agent-with-azure-openai-and-gmail)
- [**Generate consensus-based answers with Claude and OpenAI** 41 steps · calls a model · Gmail, Slack](https://millionrounds.com/workflow/generate-consensus-based-answers-with-claude-and-openai)
- [**Rerank PM priorities every 2 hours with OpenAI and Notion** 40 steps · calls a model · Notion, Slack](https://millionrounds.com/workflow/rerank-pm-priorities-every-2-hours-with-openai-and-notion)
- [**Auto-Generate Competitive Battlecards with Slack and Notion** 49 steps · calls a model · Notion, Slack](https://millionrounds.com/workflow/auto-generate-competitive-battlecards-with-slack-and-notion)
- [**AI Email Agent with Gmail and Telegram Approval** 38 steps · calls a model · Gmail, Redis](https://millionrounds.com/workflow/ai-email-agent-with-gmail-and-telegram-approval)
- [**Turn ideas into movies with DeepSeek and RunwayML** 38 steps · calls a model · Dropbox, Notion](https://millionrounds.com/workflow/turn-ideas-into-movies-with-deepseek-and-runwayml)
