This workflow follows the Agent → OpenRouter Chat 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": "BookStore",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "21037c0b-6c2a-4c67-a0f1-55547c6f8ec6",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
20,
-280
],
"id": "08775aff-06fd-4794-8405-3c72914f7e4b",
"name": "Webhook"
},
{
"parameters": {
"model": "deepseek/deepseek-chat-v3-0324:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
160,
220
],
"id": "9b025389-ac27-4585-bd6a-2497ae6ddd06",
"name": "OpenRouter Chat Model",
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.body.msg }}",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
580,
0
],
"id": "651cccf0-67db-439e-bf04-259c1f6dd7fb",
"name": "AI Agent1"
},
{
"parameters": {
"model": "deepseek/deepseek-chat-v3-0324:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
500,
240
],
"id": "593d4f0b-fe89-4a57-b7a9-f9180ccf12d0",
"name": "OpenRouter Chat Model1",
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"respondWith": "allIncomingItems",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1200,
0
],
"id": "198fe6b8-ae40-4397-b5bc-c86ef25c39be",
"name": "Respond to Webhook"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $json.body.id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
700,
280
],
"id": "90927206-3e2d-4940-8e1b-3485ffa94cc7",
"name": "Postgres Chat Memory",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n results: {{ $json.output.parseJson(\"title\") }}\n}\n",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1000,
-180
],
"id": "004523fa-0630-4741-a184-8f3b6f18f9b5",
"name": "Edit Fields"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[]
]
},
"OpenRouter Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ec2599bb-40fc-4c5b-8275-ef2a1fe7ea6a",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "SbnHWbAJlrdZW3b1",
"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.
openRouterApipostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
BookStore. Uses lmChatOpenRouter, agent, memoryPostgresChat. Webhook trigger; 7 nodes.
Source: https://github.com/andre-goldmann/jdg.digital/blob/89fa3c7ed869e86f1577e9274048f106e24add47/n8n/BookStore.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.
🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCalculator. Webhook trigger; 63 nodes.
🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCalculator. Webhook trigger; 63 nodes.
🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCalculator. Webhook trigger; 63 nodes.
🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCode. Webhook trigger; 62 nodes.
🧪 LABR - nuevo asistente (REPARADO). Uses httpRequest, postgres, postgresTool, toolCode. Webhook trigger; 62 nodes.