Steps to reproduce
- Enable webhook_listeners app (bundled with Nextcloud 30+)
- Register a webhook for NodeCreatedEvent, NodeWrittenEvent, and NodeDeletedEvent
- Create a file (observe webhook payload includes node.id)
- Delete the file (observe webhook payload missing node.id)
Expected behavior
NodeDeletedEvent webhook payload should include node.id field like other Node events (NodeCreatedEvent, NodeWrittenEvent).
Actual behavior
NodeDeletedEvent webhook payload only includes:
node.path (string)
node.name (string)
The node.id field is missing, making it difficult to correlate deletion events with previously created/modified files when tracking by ID.
Example payloads
NodeCreatedEvent (includes node.id):
{
"event": "NodeCreatedEvent",
"node": {
"id": 437,
"name": "test-webhook.txt",
"path": "/admin/files/test-webhook.txt"
}
}
NodeDeletedEvent (missing node.id):
{
"event": "NodeDeletedEvent",
"node": {
"name": "test-webhook.txt",
"path": "/admin/files/test-webhook.txt"
}
}
Additional context
- Also noticed:
node.id returns as integer (437) not string ("437") as suggested in webhook_listeners documentation
- Testing on Nextcloud 32 (docker: nextcloud:32.0.1)
- webhook_listeners app version: bundled with NC32
Impact
Applications tracking files by ID must implement path-based fallback logic specifically for deletion events, adding complexity and potential for race conditions if files are moved before deletion.
Suggested fix
Include node.id field in NodeDeletedEvent webhook payloads to maintain consistency with other Node events.
Steps to reproduce
Expected behavior
NodeDeletedEvent webhook payload should include
node.idfield like other Node events (NodeCreatedEvent, NodeWrittenEvent).Actual behavior
NodeDeletedEvent webhook payload only includes:
node.path(string)node.name(string)The
node.idfield is missing, making it difficult to correlate deletion events with previously created/modified files when tracking by ID.Example payloads
NodeCreatedEvent (includes node.id):
{ "event": "NodeCreatedEvent", "node": { "id": 437, "name": "test-webhook.txt", "path": "/admin/files/test-webhook.txt" } }NodeDeletedEvent (missing node.id):
{ "event": "NodeDeletedEvent", "node": { "name": "test-webhook.txt", "path": "/admin/files/test-webhook.txt" } }Additional context
node.idreturns as integer (437) not string ("437") as suggested in webhook_listeners documentationImpact
Applications tracking files by ID must implement path-based fallback logic specifically for deletion events, adding complexity and potential for race conditions if files are moved before deletion.
Suggested fix
Include
node.idfield in NodeDeletedEvent webhook payloads to maintain consistency with other Node events.