RocketChat / RocketChat/Rocket.Chat

Missing data in outgoing webhooks with `userCreated` event trigger (as well as roomCreated/Archived/Join/Left triggers)

Open
#36,348 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

planned
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

After updating to 7.7.1 the outgoing webhook requests for "User created" event triggers don't contain the required data anymore.

Steps to reproduce:
  1. Go to admin panel > Integrations
  2. Create a new outgoing webhook with event trigger "User created" (value of other fields are not important)
  3. Create a new user to trigger the webhook
  4. Check the "Data Passed to URL" value in the webhook history, which is missing the important data like user_id
Expected behavior:

The "Data Passed to URL" should contain all required data such as user_id and user_name like in this example before the update:

Image

Actual behavior:

The "Data Passed to URL" only contains token and bot:

Image

Server Setup Information:
  • Version of Rocket.Chat Server: 7.7.1 and 7.8.0-develop
  • Operating System: Linux
Additional context

After investigating this, I believe the issue was was caused by this commit (triggerHandler.ts, Line 264). The check if room or message is defined prevents the proper data added for triggers that don't require a room or message. I will create a PR to fix this.

Relevant logs:
@rocket.chat/meteor:dsv: I20250702-23:38:05.915(2)? [2025-07-02T21:38:05.898Z] WARN (Integrations/583117 on bernays): The integration userCreated was called but the room or message was not defined.
@rocket.chat/meteor:dsv: I20250702-23:38:05.916(2)?     section: "Outgoing WebHook"
@rocket.chat/meteor:dsv: I20250702-23:38:05.981(2)? [2025-07-02T21:38:05.962Z] ERROR (Integrations/583117 on bernays): Error for the Integration "New user webhook" to https://test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in triggerHandler.ts around line 264 and reproduce the userCreated webhook, then compare its payload with the expected user_id and user_name fields. Check the roomCreated, Archived, Join, and Left triggers as well; done means their outgoing webhook data is no longer reduced to only token and bot when room or message is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.