AI Agents

Automated workflow

11 nodes 223 131 Automatic trigger
Download

Workflow Description

An intelligent workflow that combines a smart agent with PostgreSQL database integration, receiving user queries through a chat interface, processing them with OpenAI models, and retrieving relevant data from the database to deliver accurate and reliable responses.

How it works

  1. 1.Activate the workflow when a message is received through the chat trigger interface
  2. 2.Route the message to an intelligent agent powered by OpenAI language model
  3. 3.Query the PostgreSQL database to retrieve relevant information and records
  4. 4.Combine retrieved results and send the response back to the user

Use cases

  • Automated customer support system answering common inquiries using company data
  • Smart content management assistant that searches the database and delivers personalized information
  • Conversational bot for business processes retrieving customer records and orders directly

Requirements

  • Active OpenAI account with valid API key configured
  • PostgreSQL database set up with required data tables and proper connections
  • Chat interface properly configured for seamless user communication

Service Value

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

Apps Used

Chat Trigger OpenAI Postgres AI Agent

Details

Trigger Automatic trigger
Nodes 11
Apps 4
Views 223
Downloads 131

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 (11)

/

Sticky Note3

Sticky Note

#1

Sticky Note5

Sticky Note

#2

Sticky Note6

Sticky Note

#3

Sticky Note7

Sticky Note

#4

When chat message received

Chat Trigger

#5

OpenAI Chat Model

OpenAI

#6

DB Schema

Postgres Tool

#7

Get table definition

Postgres Tool

#8

Sticky Note

Sticky Note

#9

AI Agent

Agent

#10

Run SQL Query

Postgres Tool

#11