This workflow corresponds to n8n.io template #7197 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "okpWKYL7NWpYys9Q",
"name": "Financial Analyst Agent",
"tags": [],
"nodes": [
{
"id": "9d80bab4-d014-4e2c-9f9c-15cb29f49545",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
416,
192
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "f3cd7b4d-0e89-403f-b505-4f9fdce05f30",
"name": "P_L_Reports",
"type": "n8n-nodes-base.postgresTool",
"position": [
608,
400
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "09825591-c77e-4635-a635-282a3cc0d98c",
"name": "Balance_Sheets",
"type": "n8n-nodes-base.postgresTool",
"position": [
752,
400
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "7da3e4a5-0861-493e-a427-9cecf010de3d",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
480,
400
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "d6e2fec8-9910-496f-a630-113ee0e94eb2",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
336,
400
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "ee289e2e-716f-49b5-aaf0-80737e1692bc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-32
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "4da765c4-d0b7-46dd-b197-d0179bdf1c92",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
176,
192
],
"parameters": {},
"typeVersion": 1.3
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "8783b3c8-e1bb-4505-8de7-50dfa925535f",
"connections": {
"AI Agent": {
"main": [
[]
]
},
"P_L_Reports": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Balance_Sheets": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is designed for finance teams, accountants, and data analysts 📊 who want to interact with financial data from two PostgreSQL databases — one containing Profit & Loss data and another containing Balance Sheet data — using natural language chat. It’s perfect for…
Source: https://n8n.io/workflows/7197/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Chat with Postgresql Database. Uses chatTrigger, agent, lmChatOpenAi, postgresTool. Chat trigger; 11 nodes.
Chat with Postgresql Database. Uses chatTrigger, agent, lmChatOpenAi, postgresTool. Chat trigger; 11 nodes.
This workflow template is designed for any professionals seeking relevent data from database using natural language. Each time user ask's question using the n8n chat interface, the workflow runs. Then
Turn your PostgreSQL database into a conversational AI agent! Ask questions in plain English and get instant data results without writing SQL. Natural Language Queries: "Show laptops under $500 in sto
Postgrestool Stickynote. Uses stickyNote, chatTrigger, postgresTool, memoryBufferWindow. Chat trigger; 7 nodes.