Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The node enables server-side operations on Stream Chat channels, specifically allowing you to send a message action within a channel. This operation is useful when you want to trigger or record an interaction related to a specific message in a chat channel, such as voting on a poll, reacting with an emoji, or any custom action supported by your chat application.

Typical use cases include:

  • Sending interactive actions tied to messages (e.g., voting "yes" or "no" on a poll).
  • Triggering client-side UI updates based on user interactions.
  • Recording user responses or reactions to messages for analytics or moderation.

For example, you might use this node to send a "vote" action with an option "yes" on a particular message in a team chat channel.

Properties

Name Meaning
Channel Type The type of the channel. Common options: "messaging" (1-on-1 chats), "team" (group channels), "livestream" (broadcast channels).
Channel ID Unique identifier for the channel (e.g., "general", "random", "team-alpha"). Combined with Channel Type to form the full channel ID (CID). Required.
Message ID The ID of the message to which the action will be sent. Required.
Form Data JSON object containing the form data for the action. For example, {"action": "vote", "option": "yes"}. This defines the specifics of the action being sent.

Output

The output is a JSON object representing the response from the Stream Chat API after sending the action. It typically includes details about the action sent and its status. The exact structure depends on the Stream Chat API's response but generally confirms that the action was successfully associated with the specified message in the channel.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate with the Stream Chat service.
  • The node uses the Stream Chat server-side SDK client to perform operations.
  • Proper permissions must be granted to the API credentials to send message actions on channels.

Troubleshooting

  • Common issues:

    • Invalid or missing Channel ID or Message ID will cause errors.
    • Incorrect Channel Type may lead to failure if the channel does not exist or is inaccessible.
    • Malformed JSON in the Form Data property can cause parsing errors.
    • Insufficient permissions on the API key may result in authorization errors.
  • Error messages:

    • "Unsupported operation: channel.sendAction": Indicates the operation is not recognized; ensure the Resource is set to "Channel" and Operation to "Send Action".
    • Errors related to invalid IDs or permissions will usually contain descriptive messages from the Stream Chat API.
  • Resolution tips:

    • Verify that the Channel Type and Channel ID correspond to an existing channel.
    • Confirm the Message ID exists within the specified channel.
    • Validate the JSON syntax of the Form Data input.
    • Check API key permissions and update them if necessary.

Links and References

Discussion