List User Groups

Lists all user groups in the workspace

Usage #

// Import the typed helper
import { listUsergroups } from "@hotglue/sdk/slack";
const result = await client.execute({
...listUsergroups({
include_disabled: bool,
include_count: bool,
include_users: bool,
}),
userId: "user_123",
});
// result is typed as ListUsergroupsOutput
const result = await client.execute({
integration: "slack",
tool: "list_usergroups",
userId: "user_123",
input: {
include_disabled: bool,
include_count: bool,
include_users: bool,
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});
await agent.generate("run the List User Groups tool");

Required Permissions #

usergroups:read

Input Schema #

include_disabled bool

Include disabled user groups

default: false
include_count bool

Include the number of users in each group

default: false
include_users bool

Include the list of users for each group

default: false

Output Schema #

ok bool required
usergroups object[]

This tool calls: #

GET https://slack.com/api/usergroups.list