Modulify

Count the members on each role

get_role_member_counts

Counts how many people hold each role in a workspace.

Read it before delete_workspace_role, because deleting a role that people still hold moves them back to the stock Member role. Read it before changing a role's permissions with update_workspace_role too, so you know how many people the change reaches.

The answer maps each role to its count, keyed by owner, member or a custom role's id. Only people who have joined are counted, not pending invitations, and a role nobody holds is left out. See Members and roles.

Inputs

Input Type Required Description
workspaceId string Yes The workspace id.