Outgoing webhook, Limitation to single channel only

Implementing Asymmetric Broadcast: Host Channel to Guest DMs (Best Practice)

Hello, Rocket.Chat Community!

I am developing an event management application and am using our self-hosted Rocket.Chat instance (v7.10.0) for the chat functionality. I’ve successfully implemented an “asymmetric broadcast” feature that functions like an event invite system (e.g., Evite).

The goal is: A Host posts a single message in a private control channel, and the server distributes that message as a private Direct Message (DM) to a pre-selected list of Guests.

My current implementation works, but I want to confirm I’m using the best practice, especially regarding the webhook trigger and dynamic guest list handling.

My Working Solution

  1. Phase 1: Setup (Server Logic) :
  • When the Host selects guests in our Android app, our server (Python/Flask) calls groups.create to create a new private control room (e.g., #host-broadcast-session-A ) and adds the Host.
  • Our server saves the room_id and the guest_list array to our external database (simulated with a dictionary in the code).
  1. Phase 2: Trigger & Distribution :
  • Outgoing Webhook: Set to listen to the exact channel name: #host-broadcast-session-A .
  • Server Action: When the webhook hits, our Flask server retrieves the guest_list from our database.
  • DM Loop: Our server loops through the guests, calling the chat.postMessage API for each one, authenticating with the Host’s API Keys .

Specific Questions for the Community

  1. Impersonation vs. Host Keys: We found that using the Host’s API Key for authentication in the chat.postMessage loop is the only way to ensure the sent message is recorded in the Host’s own DM history with the Guest. Is this confirmed as the official/required best practice for the Host to have a record of sent DMs?
  2. Dynamic Webhook Trigger: Since using channel wildcards (e.g., #broadcast-* ) failed validation upon saving the webhook, we are forced to create a new webhook for every unique broadcast room name, or rely on a “trigger word” (e.g., !broadcast ). Is there a way to make a single Outgoing Webhook listen dynamically to any channel based on a simple prefix, or is the Trigger Word method the recommended path to handle multiple dynamic rooms?

Thank you for any insight on optimizing this scalable broadcast architecture!

  • Version of Rocket.Chat Server:
  • Operating System:
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:
  • Proxy:
  • Firewalls involved: