Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- JSON Get
- JSON Set
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Set Cardinality
AI-generatedSummary
Get the number of members in a specified Redis set.
Inputs
- Set (required) — Name of the set whose cardinality is to be retrieved.
Output shape
a list with one item per input containing a JSON object with the set name and its member count
The output JSON includes 'set' (the set name) and 'cardinality' (number of members). Errors result in workflow failure or an error object if 'continueOnFail' is enabled.
Examples
Example 1: Retrieve the number of members in a user group set called 'active_users' to monitor group size.
Set=active_users