59 lines
1.7 KiB
JSON
59 lines
1.7 KiB
JSON
|
|
{
|
||
|
|
"id": "1003",
|
||
|
|
"name": "Chatbot Session löschen",
|
||
|
|
"nodes": [
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"httpMethod": "DELETE",
|
||
|
|
"path": "chat-session",
|
||
|
|
"responseMode": "responseNode",
|
||
|
|
"options": {}
|
||
|
|
},
|
||
|
|
"id": "node-wh-002",
|
||
|
|
"name": "Webhook",
|
||
|
|
"type": "n8n-nodes-base.webhook",
|
||
|
|
"typeVersion": 2,
|
||
|
|
"position": [100, 300],
|
||
|
|
"webhookId": "ollama-chat-delete"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"operation": "executeQuery",
|
||
|
|
"query": "DELETE FROM chat_sessions WHERE session_id = $1 RETURNING session_id",
|
||
|
|
"additionalFields": {
|
||
|
|
"queryParams": "={{ JSON.stringify([$json.body.session_id]) }}"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"id": "node-pg-004",
|
||
|
|
"name": "Delete Session",
|
||
|
|
"type": "n8n-nodes-base.postgres",
|
||
|
|
"typeVersion": 2.5,
|
||
|
|
"position": [300, 300],
|
||
|
|
"credentials": {
|
||
|
|
"postgres": {
|
||
|
|
"id": "SETUP_REQUIRED",
|
||
|
|
"name": "n8n PostgreSQL"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"parameters": {
|
||
|
|
"respondWith": "json",
|
||
|
|
"responseBody": "={{ JSON.stringify({ deleted: $input.first().json.session_id != null, session_id: $('Webhook').first().json.body.session_id }) }}",
|
||
|
|
"options": {}
|
||
|
|
},
|
||
|
|
"id": "node-rw-002",
|
||
|
|
"name": "Respond",
|
||
|
|
"type": "n8n-nodes-base.respondToWebhook",
|
||
|
|
"typeVersion": 1.1,
|
||
|
|
"position": [500, 300]
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"connections": {
|
||
|
|
"Webhook": { "main": [[{ "node": "Delete Session", "type": "main", "index": 0 }]] },
|
||
|
|
"Delete Session": { "main": [[{ "node": "Respond", "type": "main", "index": 0 }]] }
|
||
|
|
},
|
||
|
|
"active": false,
|
||
|
|
"settings": { "executionOrder": "v1" },
|
||
|
|
"tags": []
|
||
|
|
}
|