镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Closed
nextcloud/documentation
#13853

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.

Activity

  1. joshtrichards commented on Nov 11, 2025

    @joshtrichards
    Member

    Try using the BeforeNodeDeletedEvent. The id should still be available at that time.

    The reason id is not in NodeDeletedEvent is because the the file is effectively guaranteed to be gone and, in turn, so is the FileInfo.

    Also noticed: node.id returns as integer (437) not string ("437") as suggested in webhook_listeners documentation

    I agree the docs are wrong; int matches implementation. I'll take a look.

  2. joshtrichards commented on Nov 11, 2025

    @joshtrichards
    Member

    Doc update PR pending in nextcloud/documentation#13853

  3. added theissue type on Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions