Skip to content

[Bug]: NodeDeletedEvent webhook missing node.id field #56371

@cbcoutinho

Description

@cbcoutinho

Steps to reproduce

  1. Enable webhook_listeners app (bundled with Nextcloud 30+)
  2. Register a webhook for NodeCreatedEvent, NodeWrittenEvent, and NodeDeletedEvent
  3. Create a file (observe webhook payload includes node.id)
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions