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 "Remove Members" operation in the Channel resource allows you to remove one or more users from a specified chat channel within the Stream Chat service. This is useful for managing membership in group chats, team channels, or broadcast channels by dynamically controlling who has access.
Common scenarios include:
- Moderators removing disruptive or inactive members from a team or messaging channel.
- Automatically cleaning up members from a channel when they leave an organization or project.
- Managing access control in livestream or broadcast channels by removing viewers or participants.
For example, if you have a team channel named "team-alpha" and want to remove users with IDs "john_doe" and "jane_smith", this operation will update the channel membership accordingly.
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 remove from the channel (e.g., "john_doe,jane_smith,admin123"). No spaces around commas. |
Output
The node outputs a JSON object representing the result of the remove members operation as returned by the Stream Chat API client. This typically includes details about the updated channel state or confirmation of the removal action.
No binary data output is produced by this operation.
Example output snippet (conceptual):
{
"channel": {
"cid": "team:team-alpha",
"members": [
// Remaining members after removal
],
"updated_at": "2024-06-01T12:00:00Z"
}
}
Dependencies
- Requires a valid API key credential for the Stream Chat service configured in n8n.
- The API key must have permissions to manage channel memberships.
- The node uses the official Stream Chat server-side client library to perform operations.
Troubleshooting
- Error: Unsupported operation — Ensure that the Resource is set to "Channel" and Operation to "Remove Members".
- Invalid Channel ID or Channel Type — Verify that the channel exists and the identifiers are correct.
- Empty or malformed Members list — Provide a comma-separated list of valid user IDs without spaces.
- Permission errors — Confirm that the API key used has sufficient rights to modify channel memberships.
- Network or API errors — Check connectivity and Stream Chat service status.
If the node fails on a specific item but "Continue On Fail" is enabled, the error message will be included in the output JSON for that item.