Rocket.Chat: Trigger

Receive Rocket.Chat messages via Webhook, Polling, or Realtime

Overview

This node triggers workflows based on messages received from Rocket.Chat using three modes: Webhook, Polling, and Realtime (WebSocket). It is useful for automating responses or processing messages from Rocket.Chat channels or rooms. For example, it can trigger a workflow immediately when a new message arrives via webhook, periodically check a room for new messages using polling, or subscribe to real-time message streams via WebSocket for instant updates.

Use Case Examples

  1. Trigger a workflow immediately when a new message is posted in Rocket.Chat using webhook mode.
  2. Poll a specific Rocket.Chat room every 15 seconds to process new messages.
  3. Subscribe to a Rocket.Chat room's real-time message stream via WebSocket to handle messages as they arrive.

Properties

Name Meaning
Mode Selects the mode of receiving messages: webhook, polling, or realtime (WebSocket).
Acknowledge Immediately If true, the webhook mode acknowledges the incoming message immediately to Rocket.Chat.
Room (pollRoom) The Rocket.Chat room to poll for new messages when in polling mode.
Interval (seconds) The interval in seconds at which to poll the specified room for new messages in polling mode. Minimum is 5 seconds.
Room (rtRoomId) The Rocket.Chat room ID to subscribe to for real-time messages when in realtime mode.

Output

JSON

  • message - The Rocket.Chat message object received from the selected mode.

Dependencies

  • Requires Rocket.Chat Personal Access Token credential for API authentication.

Troubleshooting

  • In webhook mode, if 'Acknowledge Immediately' is false, the workflow will not send a response to Rocket.Chat, which may cause timeouts or retries.
  • In polling mode, ensure the room ID is valid and accessible; otherwise, no messages will be retrieved.
  • In realtime mode, a valid room ID and a working WebSocket connection are required; connection failures or invalid tokens will prevent message streaming.

Links

Discussion