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 "Query Banned Users" operation in the Moderation resource allows you to retrieve a list of users who have been banned globally within your Stream Chat application. This operation supports filtering the results using MongoDB-style queries and limiting the number of returned entries.
This node is beneficial when you want to audit or monitor banned users, integrate ban lists into other systems, or build custom moderation dashboards. For example, you could use it to fetch all users banned by automated moderation tools or to get bans issued after a specific date.
Properties
| Name | Meaning |
|---|---|
| Filter Query | A JSON string representing a MongoDB-style filter to narrow down which banned users to query. Examples: {"banned": true}, {"user_id": "specific_user"}, {"created_at": {"$gte": "2023-01-01"}} |
| Limit | The maximum number of banned user records to return. Must be at least 1. Default is 50. |
Output
The output is an array of JSON objects, each representing a banned user record matching the filter criteria. Each object contains details about the banned user as provided by the Stream Chat API, such as user ID, ban reason, timeout duration, and any associated metadata.
No binary data is output by this operation.
Dependencies
- Requires an API key credential with permissions to perform moderation operations on the Stream Chat service.
- The node uses the Stream Chat server-side client SDK internally.
- Proper configuration of the API credentials in n8n is necessary for authentication.
Troubleshooting
- Invalid JSON in Filter Query: If the filter query string is not valid JSON, the node will throw a parsing error. Ensure the filter query is correctly formatted JSON.
- Permission Errors: Insufficient API permissions may cause authorization errors. Verify that the API key used has moderation read access.
- Empty Results: If no banned users match the filter, the output will be an empty array. Adjust filters or increase the limit if needed.
- Rate Limits: Excessive querying might hit API rate limits; consider adding delays or reducing request frequency.