AI Agents

Analyze customer messages and route them intelligently with AI

22 nodes 341 144 Automatic trigger
Download

Workflow Description

A workflow that captures customer inquiries through a chat interface, analyzes their sentiment and intent using OpenAI, generates contextual responses, and automatically routes conversations to the appropriate team based on the analysis results.

How it works

  1. 1.Receive customer message via chat trigger
  2. 2.Analyze sentiment and request intent using OpenAI
  3. 3.Generate personalized response with LLM Chain
  4. 4.Route message to the appropriate department based on analysis

Use cases

  • Automated customer support with intelligent ticket distribution
  • Deliver faster resolutions by matching inquiries to the right teams

Requirements

  • Active OpenAI API key with appropriate permissions
  • n8n platform access with advanced node capabilities

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Chat Trigger OpenAI Sentiment Analysis LLM Chain

Details

Trigger Automatic trigger
Nodes 22
Apps 4
Views 341
Downloads 144

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (22)

/

When chat message received

Chat Trigger

#1

Switch Model

Code

#2

Set LLM index

Set

#3

Increase LLM index

Set

#4

No Operation, do nothing

No Op

#5

Check for expected error

If

#6

Loop finished without results

Set

#7

Unexpected error

Set

#8

Return result

Set

#9

OpenAI 4o-mini

OpenAI

#10

OpenAI 4o

OpenAI

#11

OpenAI o1

OpenAI

#12

OpenAI Chat Model

OpenAI

#13

Validate response

Sentiment Analysis

#14

Generate response

LLM Chain

#15

Sticky Note

Sticky Note

#16

Sticky Note1

Sticky Note

#17

Sticky Note2

Sticky Note

#18

Sticky Note3

Sticky Note

#19

Sticky Note4

Sticky Note

#20

Sticky Note5

Sticky Note

#21

Sticky Note6

Sticky Note

#22