AI Agents

An AI agent to chat with you with data, using OpenAI and

30 nodes 228 118 Webhook
Download

Workflow Description

An intelligent AI agent that converses with you based on data stored in PostgreSQL, powered by OpenAI's advanced language models. Receives requests via webhook and delivers contextual, accurate responses through smart conversation memory.

How it works

  1. 1.Receive conversation request via webhook and determine user intent
  2. 2.Retrieve conversation history and relevant data from PostgreSQL
  3. 3.Process the request with OpenAI model using stored context
  4. 4.Store new exchange in memory and database for future conversations
  5. 5.Send response via webhook with additional interaction options

Use cases

  • Build an intelligent customer support assistant that understands your interaction history
  • Create a data analysis bot that combines stored information with real-time processing
  • Develop an interactive sales agent that learns from customer records

Requirements

  • Active OpenAI account with valid API key
  • PostgreSQL database with tables for storing conversations and reference data
  • Configured webhook endpoint to receive requests and send responses

Service Value

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

Apps Used

Postgres OpenAI Tool Twitter/X AI Agent

Details

Trigger Webhook
Nodes 30
Apps 5
Views 228
Downloads 118

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

/

Postgres Chat Memory

Memory Postgres Chat

#1

OpenAI Chat Model

OpenAI

#2

Set fields

Set

#3

Sticky Note

Sticky Note

#4

Webhook - ChatInput

Webhook

#5

Sticky Note1

Sticky Note

#6

Respond to Webhook

Webhook

#7

Sticky Note2

Sticky Note

#8

Call Search Console Tool

Tool Workflow

#9

Sticky Note3

Sticky Note

#10

Sticky Note4

Sticky Note

#11

Sticky Note6

Sticky Note

#12

Sticky Note5

Sticky Note

#13

Sticky Note7

Sticky Note

#14

Tool calling

Execute Workflow Trigger

#15

Switch

Switch

#16

Set fields - Consruct API CALL

Set

#17

Sticky Note8

Sticky Note

#18

Set fields - Create searchConsoleDataArray

Set

#19

Set fields - Create searchConsoleDataArray 2

Set

#20

Search Console - Get Custom Insights

HTTP Request

#21

Sticky Note9

Sticky Note

#22

Sticky Note10

Sticky Note

#23

## Search Console - Get List of Properties

HTTP Request

#24

Sticky Note11

Sticky Note

#25

Sticky Note12

Sticky Note

#26

Array aggregation - response to AI Agent

Aggregate

#27

Array aggregation - response to AI Agent1

Aggregate

#28

Sticky Note13

Sticky Note

#29

AI Agent

Agent

#30