n8n_stack/imports/workflows/ollama-chat-delete.json

57 lines
1.6 KiB
JSON
Raw Normal View History

{
"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 = '{{ $json.body.session_id }}' RETURNING session_id",
"additionalFields": {}
},
"id": "node-pg-004",
"name": "Delete Session",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.5,
"position": [300, 300],
"credentials": {
"postgres": {
"id": "pnmeNZ3ONDWrQP8M",
"name": "Postgres account"
}
}
},
{
"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": []
}