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 provides server-side operations for managing users in a Stream Chat application. Specifically, the "Query Users" operation allows you to retrieve user data based on flexible filters and limits. This is useful when you want to search for users matching certain criteria or fetch a subset of users for display, reporting, or further processing.
Common scenarios include:
- Searching for users whose names partially match a string.
- Retrieving all users with a specific role or attribute.
- Limiting the number of users returned to avoid large data loads.
Example: Querying users whose name starts with "john" and limiting results to 10.
Properties
| Name | Meaning |
|---|---|
| Query Filter | MongoDB-style JSON query object to filter users. Common operators: $eq, $ne, $in, $autocomplete, $gt, $lt. Example: {"name": {"$autocomplete": "john"}}. Leave empty {} to return all users. |
| Limit | Maximum number of user results to return. Must be at least 1. Default is 50. |
Output
The output is an array of JSON objects representing the users that match the query filter. Each object contains user details as returned by the Stream Chat API's user query endpoint. The exact structure depends on your user data schema but typically includes fields like user ID, name, role, and custom attributes.
No binary data is output by this operation.
Dependencies
- Requires a valid API key credential for authenticating with the Stream Chat service.
- The node uses the Stream Chat server-side client library to perform queries.
- Ensure the API key has permissions to query user data.
Troubleshooting
- Empty Results: If no users are returned, verify your query filter syntax and values. An empty filter
{}returns all users up to the limit. - Invalid JSON in Query Filter: Make sure the JSON entered in the "Query Filter" property is valid. Invalid JSON will cause errors.
- Limit Too Low or High: The limit must be at least 1. Setting it too high may impact performance or hit API limits.
- API Authentication Errors: Check that your API credentials are correctly configured and have sufficient permissions.
- Unsupported Operators: Only MongoDB-style operators supported by Stream Chat can be used. Unsupported operators will cause errors.