Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The node performs server-side operations on Stream Chat channels, specifically here focusing on the "Mute Status" operation for a channel. This operation retrieves the mute status of a specified channel, indicating whether the channel is muted and potentially additional mute-related metadata.

This node is beneficial in scenarios where you want to programmatically check if a channel is muted before taking further actions, such as notifying users, updating UI elements, or managing channel settings automatically.

Practical example:

  • Before sending notifications about new messages in a channel, check if the channel is muted to avoid disturbing users unnecessarily.
  • Display mute status information in an admin dashboard to monitor channel states.

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).

Output

The output JSON contains the mute status information of the specified channel. It typically includes details such as whether the channel is muted and possibly related metadata like expiration time or user-specific mute data.

Since this operation only retrieves status information, no binary data output is involved.

Example output structure (simplified):

{
  "muted": true,
  "user_id": "example_user",
  "expiration": 1234567890
}

The exact fields depend on the Stream Chat API response for the mute status.

Dependencies

  • Requires an API key credential configured in n8n to authenticate with the Stream Chat service.
  • The node uses the Stream Chat server-side client library to perform operations.
  • Proper permissions must be granted to the API key to query channel mute statuses.

Troubleshooting

  • Common issues:

    • Invalid or missing Channel Type or Channel ID parameters will cause errors.
    • Insufficient API permissions may result in authorization errors.
    • Network connectivity issues can prevent successful API calls.
  • Error messages:

    • "Unsupported operation: channel.muteStatus": Indicates the operation is not recognized; ensure the correct resource and operation are selected.
    • API errors returned from Stream Chat (e.g., "Channel not found", "Unauthorized") should be checked and resolved by verifying input parameters and credentials.
  • Resolution tips:

    • Double-check that the Channel Type and Channel ID are correctly specified.
    • Verify that the API key has the necessary permissions.
    • Ensure network access to Stream Chat endpoints.

Links and References

Discussion