An AI agent to chat with you with data, using OpenAI and
Workflow Description
An AI agent that engages in intelligent conversations by retrieving and analyzing data from a Postgres database, powered by OpenAI models. It processes queries via webhook and delivers context-aware responses that integrate historical data and real-time information.
How it works
- 1.Receive query through webhook and route to AI agent
- 2.Fetch relevant context and data from Postgres database
- 3.Process request using OpenAI model with available tools
- 4.Send intelligent response back via webhook
Use cases
- Automated customer support with organized knowledge base
- Data-driven analytical conversations using live business information
- Integration of AI agent capabilities with existing data systems
Requirements
- Structured and accessible Postgres database
- Valid OpenAI API key with appropriate permissions
- Webhook interface for external system communication
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (30)
Postgres Chat Memory
Memory Postgres Chat
OpenAI Chat Model
OpenAI
Set fields
Set
Sticky Note
Sticky Note
Webhook - ChatInput
Webhook
Sticky Note1
Sticky Note
Respond to Webhook
Webhook
Sticky Note2
Sticky Note
Call Search Console Tool
Tool Workflow
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note6
Sticky Note
Sticky Note5
Sticky Note
Sticky Note7
Sticky Note
Tool calling
Execute Workflow Trigger
Switch
Switch
Set fields - Consruct API CALL
Set
Sticky Note8
Sticky Note
Set fields - Create searchConsoleDataArray
Set
Set fields - Create searchConsoleDataArray 2
Set
Search Console - Get Custom Insights
HTTP Request
Sticky Note9
Sticky Note
Sticky Note10
Sticky Note
## Search Console - Get List of Properties
HTTP Request
Sticky Note11
Sticky Note
Sticky Note12
Sticky Note
Array aggregation - response to AI Agent
Aggregate
Array aggregation - response to AI Agent1
Aggregate
Sticky Note13
Sticky Note
AI Agent
Agent