# Route AI-powered customer support with Slack and PostgreSQL: n8n workflow

> Started by another system calling it, and works across Email, Google Sheets and Postgres. 18 steps, 2 branches: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/route-ai-powered-customer-support-with-slack-and-postgresql (Millionrounds; every figure on the page links to its filing or article)

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

# Route AI-powered customer support with Slack and PostgreSQL

Started by another system calling it, and works across Email, Google Sheets and Postgres. 18 steps, 2 branches: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-ai-powered-customer-support-with-slack-and-postgresql)

**18 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Logic 10 Service 6

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

- 1 **Webhook Trigger** Webhook *Starts it*
- 2 **Extract & Enrich Data** Set *Logic*
- 3 **Sentiment & Context Analysis** Code *Logic*
- 4 **Urgency Check** If *Logic*
- 5 **Send Urgent Alert** Http Request *Service*
- 6 **Merge After Urgency** Merge *Logic*
- 7 **Fetch Conversation History** Postgres *Service*
- 8 **Search Knowledge Base** Code *Logic*
- 9 **Build AI Context** Code *Logic*
- 10 **AI Response Generator** Code *Logic*
- 11 **Process & Analyze Response** Code *Logic*
- 12 **Routing Decision** If *Logic*
- 13 **Slack Escalation** Http Request *Service*
- 14 **Send Auto Response** Email Send *Service*
- 15 **Merge After Routing** Merge *Logic*
- 16 **Log to Analytics Dashboard** Google Sheets *Service*
- 17 **Save to Database** Postgres *Service*
- 18 **Send API Response** Respond To Webhook *Starts it*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 18, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Email, Google Sheets, Postgres
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Email, Google Sheets and Postgres accounts. 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?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

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 18 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-ai-powered-customer-support-with-slack-and-postgresql)
- **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.

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

## Workflows like it

Also customer support, with the same services where possible, closest in size first.

- [**Send Patient Appointment Reminders with Email and SMS** 18 steps · Airtable, Email](https://millionrounds.com/workflow/send-patient-appointment-reminders-with-email-and-sms)
- [**AI sentiment-driven priority classification** 18 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/ai-sentiment-driven-priority-classification)
- [**Handle WhatsApp customer service chats with Gemini** 18 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/handle-whatsapp-customer-service-chats-with-gemini)
- [**Run a multilingual WhatsApp support assistant with OpenAI** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/run-a-multilingual-whatsapp-support-assistant-with-openai)
- [**Smart Customer Support System with OpenAI and Gmail** 18 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/smart-customer-support-system-with-openai-and-gmail)
- [**Automate Instagram complaint handling with Claude and SLA** 17 steps · Google Sheets, Slack](https://millionrounds.com/workflow/automate-instagram-complaint-handling-with-claude-and-sla)
