Actions60
- User Actions
- Channel Actions
- Accept Invite
- Add Members
- Add Moderators
- Archive
- Ban User
- Create
- Delete
- Delete File
- Delete Image
- Demote Moderators
- Disable Slow Mode
- Enable Slow Mode
- Get Config
- Hide
- Invite Members
- Mark Read
- Mark Unread
- Mute
- Mute Status
- Pin
- Query Channels
- Query Members
- Reject Invite
- Remove Members
- Send Action
- Send File
- Send Image
- Show
- Stop Watching
- Truncate
- Unarchive
- Unban User
- Unmute
- Unpin
- Update
- Watch
- Message Actions
- Moderation Actions
Overview
The node performs server-side operations on Stream Chat channels, enabling management and interaction with chat channels programmatically. It supports a wide range of channel-related actions such as creating, updating, archiving, and managing members or moderators within channels. This node is beneficial in scenarios where automated control over chat channels is needed, for example:
- Archiving inactive or completed project channels automatically.
- Adding or removing members from team channels based on external triggers.
- Managing channel visibility or muting channels for specific users.
- Uploading files or images to channels programmatically.
- Enabling slow mode or other moderation features on channels.
Practical example: Automatically archive a "team" type channel named "project-x" when the project is completed, or add new members to a "messaging" type channel when they join a department.
Properties
| Name | Meaning |
|---|---|
| Channel Type | The type of the channel. Common options 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 | User ID used for server-side operations related to the channel, such as archiving or muting on behalf of a user. |
Output
The output JSON contains the result of the executed channel operation. The structure varies depending on the operation performed but generally includes details about the channel state after the operation or confirmation of the action taken. For example, after archiving a channel, the output will confirm the archived status.
If the operation involves querying data (e.g., listing members or channels), the output will be an array of objects representing the queried entities.
Binary data output is not applicable for the Archive operation specifically, but the node supports sending files or images in other channel operations.
Dependencies
- Requires an API key credential with appropriate permissions for Stream Chat server-side operations.
- The node uses the official Stream Chat server client library internally.
- Proper configuration of the Stream Chat API credentials in n8n is necessary.
- Network access to Stream Chat API endpoints must be available.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication errors.
- Using incorrect channel types or IDs may result in "channel not found" errors.
- Insufficient permissions in the API key can lead to authorization failures.
- Passing malformed JSON in properties like
channelDataortruncateOptionswill cause parsing errors.
Error messages:
"Unsupported operation: channel.archive": Indicates the operation is not recognized; verify the selected resource and operation."Error in channel.archive operation": General error wrapper indicating failure during the archive process; check inner message for details."Channel not found": The specified channel does not exist; verifychannelTypeandchannelId."Authentication failed": API credentials are invalid or lack required permissions; update credentials accordingly.
Resolution tips:
- Double-check all input parameters for correctness.
- Ensure the API key has server-side permissions for channel management.
- Validate JSON inputs using external tools before entering them.
- Use the node's "Execute Once" setting for bulk operations to avoid rate limits or partial failures.
Links and References
- Stream Chat Documentation - Channels
- Stream Chat Server SDKs
- MongoDB Query Syntax Reference (for filters used in queries)