Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The node performs server-side operations on Stream Chat channels, enabling management of channel properties and membership. The "Unpin" operation specifically removes a pinned status from a channel for a given user. This is useful in scenarios where a user no longer wants a particular channel to appear prominently or at the top of their chat list.

Practical examples:

  • A user has previously pinned a team discussion channel but now wants to unpin it to reduce clutter.
  • An admin wants to programmatically unpin channels for users as part of a moderation or cleanup process.

Properties

Name Meaning
Channel Type The type of the channel. Common types include: "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).
User ID The user ID for whom the unpin operation will be performed. This identifies which user's pinned channels are affected.

Output

The output JSON contains the response from the Stream Chat API after attempting to unpin the channel for the specified user. It typically includes confirmation of the action or details about the updated channel state.

No binary data is output by this operation.

Example output structure (simplified):

{
  "pinned": false,
  "channel": {
    "type": "messaging",
    "id": "general"
  },
  "user_id": "user123"
}

Dependencies

  • Requires an API key credential with permissions to perform server-side Stream Chat operations.
  • The node uses the official Stream Chat server client library internally.
  • Proper configuration of the API credentials in n8n is necessary for authentication.

Troubleshooting

  • Common issues:

    • Invalid or missing Channel ID or User ID parameters will cause errors.
    • Insufficient permissions in the API key credential may result in authorization failures.
    • Attempting to unpin a channel that is not currently pinned for the user may return a no-op or error depending on the API behavior.
  • Error messages:

    • "Unsupported operation: channel.unpin": Indicates the operation name or resource was incorrect; verify parameters.
    • API errors related to authentication or authorization: Check API key validity and permissions.
    • JSON parsing errors if input parameters are malformed (not applicable here since inputs are simple strings).

Links and References

Discussion