# Route multichannel support tickets with OpenAI and HubSpot: n8n workflow

> Started by someone submitting a form, and works across Gmail and Slack. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/route-multichannel-support-tickets-with-openai-and-hubspot (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 multichannel support tickets with OpenAI and HubSpot

Started by someone submitting a form, and works across Gmail and Slack. It hands the judgement calls to OpenAI. 59 steps, 7 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-multichannel-support-tickets-with-openai-and-hubspot)

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

**7** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 5 Model 1 Logic 38 Service 15

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

- 1 **When Gmail Received** Gmail trigger *Starts it*
- 2 **WAHA Support Webhook** Webhook *Starts it*
- 3 **When Form Submitted** Form trigger *Starts it*
- 4 **Every 10 Minutes1** Schedule trigger *Starts it*
- 5 **Error Trigger** Error trigger *Starts it*
- 6 **Normalize Gmail Data** Code *Logic*
- 7 **Filter WAHA Messages** Code *Logic*
- 8 **Normalize Form Data** Code *Logic*
- 9 **Load SLA Config1** Code *Logic*
- 10 **Format Error Payload** Code *Logic*
- 11 **Hold Binary For Upload** No Op *Logic*
- 12 **Parse WAHA Data** Code *Logic*
- 13 **Search Breached Tickets1** Http Request *Service*
- 14 **Slack Error Channel** Slack *Service*
- 15 **Load Configuration** Code *Logic*
- 16 **Check for Media** If *Logic*
- 17 **Split Breached Issues1** Code *Logic*
- 18 **Prepare HubSpot Search Query** Code *Logic*
- 19 **Fetch WAHA Media** Http Request *Service*
- 20 **Normalize WhatsApp Data** Code *Logic*
- 21 **Slack SLA Alert1** Slack *Service*
- 22 **Has Manager?1** If *Logic*
- 23 **Raise Priority?1** If *Logic*
- 24 **Post HubSpot Search** Http Request *Service*
- 25 **Restore WAHA Media Data** Code *Logic*
- 26 **Notify Manager1** Slack *Service*
- 27 **Raise Jira Priority1** Http Request *Service*
- 28 **Pass Ticket (No Raise)** Code *Logic*
- 29 **Consolidate HubSpot Results** Code *Logic*
- 30 **Restore Before Mark1** Code *Logic*
- 31 **Mark SLA Notified1** Http Request *Service*
- 32 **Filter Text for OpenAI** Code *Logic*
- 33 **Summarize Mark Result** Code *Logic*
- 34 **OpenAI Analysis** Open Ai *Model*
- 35 **Decode AI Analysis** Code *Logic*
- 36 **Compute SLA and Team Allocation** Code *Logic*
- 37 **Generate Jira Payload** Code *Logic*
- 38 **Search Jira for Duplicates** Http Request *Service*
- 39 **Parse Deduplication Result** Code *Logic*
- 40 **Identify Duplicate Issues** If *Logic*
- 41 **Build Duplicated Result** Code *Logic*
- 42 **Create Jira Issue4** Http Request *Service*
- 43 **Notify Slack of Duplicate** Slack *Service*
- 44 **Merge Jira Create Result4** Code *Logic*
- 45 **Merge All Results** Code *Logic*
- 46 **Prepare SLA Stamp3** Code *Logic*
- 47 **Is Form Channel?** If *Logic*
- 48 **Should Stamp SLA?3** If *Logic*
- 49 **Reply Form Success** Form *Service*
- 50 **Stamp SLA Custom Fields4** Http Request *Service*
- 51 **Prepare Attachments4** Code *Logic*
- 52 **Restore After SLA Stamp3** Code *Logic*
- 53 **Skip Attachments?4** If *Logic*
- 54 **Normalize Before Slack3** Code *Logic*
- 55 **Upload Jira Attachment4** Http Request *Service*
- 56 **Build Primary Result** Code *Logic*
- 57 **Slack Ticket Notification4** Slack *Service*
- 58 **Restore After Upload3** Code *Logic*
- 59 **Merge Ticket with Slack** Merge *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 59, with 7 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Slack
- **Model:** OpenAI

## 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 someone submitting a form.

Does it use AI?

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

How long does it take to set up?

Take your time. At 59 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 59 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-multichannel-support-tickets-with-openai-and-hubspot)
- **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)

## Workflows like it

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

- [**Route WhatsApp customer support with OpenAI** 48 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/route-whatsapp-customer-support-with-openai)
- [**Answer multi-channel support queries with OpenAI RAG** 77 steps · calls a model · Discord, Email](https://millionrounds.com/workflow/answer-multi-channel-support-queries-with-openai-rag)
- [**Route RAG customer support across WhatsApp and Outlook** 41 steps · calls a model · Google Sheets, Outlook](https://millionrounds.com/workflow/route-rag-customer-support-across-whatsapp-and-outlook)
- [**Build an AI-powered SMS support system with Twilio and OpenAI** 40 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/build-an-ai-powered-sms-support-system-with-twilio-and-opena)
- [**AI-powered WhatsApp customer service with OpenAI and Gmail** 37 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-powered-whatsapp-customer-service-with-openai-and-gmail)
- [**Route WhatsApp support requests with Claude and Supabase** 37 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/route-whatsapp-support-requests-with-claude-and-supabase)
