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 →
{
"name": "Exemplos",
"nodes": [
{
"parameters": {
"mode": "insert",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
"typeVersion": 1.3,
"position": [
0,
0
],
"id": "dca241a4-0f56-421d-a625-f9fa07a242b1",
"name": "Postgres PGVector Store",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"modelName": "models/text-embedding-004"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"typeVersion": 1,
"position": [
-40,
320
],
"id": "54b84fbe-0767-49ed-9b21-23ca58101ce7",
"name": "Embeddings Google Gemini",
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"fileSelector": "/dados/teste.pdf",
"options": {}
},
"type": "n8n-nodes-base.readWriteFile",
"typeVersion": 1,
"position": [
-460,
120
],
"id": "812ff873-75b6-4ea9-94c4-c0c489ef6a7c",
"name": "Read/Write Files from Disk"
},
{
"parameters": {
"operation": "pdf",
"options": {}
},
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
-220,
140
],
"id": "176c5add-42d5-466e-9484-9eece360e814",
"name": "Extract from File"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1.1,
"position": [
140,
220
],
"id": "ee2c641c-e0a0-4045-bd36-437dc8617217",
"name": "Default Data Loader"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
-860,
320
],
"id": "655769de-f0bb-4f33-aa9c-2fcc1e523a02",
"name": "When chat message received"
},
{
"parameters": {
"options": {
"systemMessage": "Respoda as perguntas do usu\u00e1rio somente em portugu\u00eas.\nUse sempre a tool 'Postgres PGVectorStore' para responder as perguntad do usu\u00e1rio"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
-640,
320
],
"id": "dc392b40-4e81-4c08-b2e1-3c0a938fcf8a",
"name": "AI Agent"
},
{
"parameters": {
"modelName": "models/gemini-2.5-flash",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
-640,
480
],
"id": "8847c6b0-27b1-404b-8f5f-ebfa86fc5161",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
-540,
540
],
"id": "d5e5d532-4f87-4591-98f9-e8349cb13051",
"name": "Simple Memory"
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "Use essa ferramenta para responder as perguntas do usu\u00e1rio",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
"typeVersion": 1.3,
"position": [
-400,
560
],
"id": "9ed47428-2caa-4b8f-b765-fadf22eefe6d",
"name": "Postgres PGVector Store1",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"modelName": "models/text-embedding-004"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"typeVersion": 1,
"position": [
-320,
780
],
"id": "6ceb2f71-53a1-4e12-8751-996a20a63367",
"name": "Embeddings Google Gemini1",
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-640,
80
],
"id": "1109e2e3-94c1-43ca-80a9-5fb76d35d999",
"name": "When clicking \u2018Execute workflow\u2019"
}
],
"connections": {
"Embeddings Google Gemini": {
"ai_embedding": [
[
{
"node": "Postgres PGVector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Read/Write Files from Disk": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Postgres PGVector Store",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Postgres PGVector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Postgres PGVector Store1": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Embeddings Google Gemini1": {
"ai_embedding": [
[
{
"node": "Postgres PGVector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "Read/Write Files from Disk",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "981652c1-7dbd-4e4d-be5d-f55d574a0ec8",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "5GSJPjjJ9FkySelT",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApipostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Exemplos. Uses vectorStorePGVector, embeddingsGoogleGemini, readWriteFile, documentDefaultDataLoader. Chat trigger; 12 nodes.
Source: https://github.com/leds-conectafapes/n8n-na-pratica/blob/e68fe48caa4ec7d2f23e9635c9a9bd74da57bd6b/dia-1/Exemplos-WorkFlow.json — 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.
AI chatbots are only as good as the data they learn from. Most large language models (LLM) rely only on their training datasets.
Fadhil. Uses agent, chatTrigger, mySql, vectorStoreSupabase. Chat trigger; 25 nodes.
This template is ideal for IT support teams, internal helpdesk automation engineers, and developers building intelligent ticketing systems. It helps streamline ITSM workflows by automatically classify
**Type of data is binary
n8n_ollama_pgvector. Uses chatTrigger, vectorStorePGVector, embeddingsGoogleGemini, documentDefaultDataLoader. Chat trigger; 20 nodes.