Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The node enables server-side operations for managing chat channels using the Stream Chat service. Specifically, the "Invite Members" operation allows inviting one or more users to an existing chat channel. This is useful in scenarios where you want to programmatically add participants to group chats, team channels, or broadcast channels without requiring them to join manually.

Practical examples include:

  • Inviting new team members to a project discussion channel.
  • Adding users to a live event broadcast channel.
  • Automatically inviting users to 1-on-1 messaging channels based on business logic.

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 type to form the full channel ID (CID).
Members Comma-separated list of user IDs to invite (e.g., "john_doe,jane_smith,admin123"). No spaces around commas.

Output

The output JSON contains the response from the Stream Chat API after attempting to invite the specified members to the channel. It typically includes details about the updated channel state, such as the list of members and their invitation status.

No binary data is output by this operation.

Dependencies

  • Requires a valid API key credential for the Stream Chat service configured in n8n.
  • The node uses the official Stream Chat server-side client library to perform operations.
  • Proper permissions must be granted to the API key to invite members to channels.

Troubleshooting

  • Common issues:

    • Invalid or missing Channel ID or Channel Type will cause the operation to fail.
    • Providing user IDs that do not exist in the Stream Chat app will result in errors or ignored invites.
    • Insufficient API permissions can lead to authorization errors.
  • Error messages:

    • "Unsupported operation: channel.inviteMembers": Indicates the operation name or resource was incorrect.
    • API errors related to invalid channel or user IDs usually specify which parameter caused the failure.
  • Resolutions:

    • Verify that the Channel Type and Channel ID are correct and correspond to an existing channel.
    • Ensure all user IDs in the Members list exist in your Stream Chat application.
    • Confirm that the API key used has permission to manage channel memberships.

Links and References

Discussion