> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create user group

> Create a Slack user group and its channel preferences.

`slack.createUserGroup` creates a workspace user group.

## Example

```ts automations/create-user-group.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { slack } from "automate.ax/slack"

export default automation("Create user group", () => {
  onDashboardRun({ title: "Create user group" })

  slack.createUserGroup({
    name: "Incident Response",
    handle: "incident-response",
    channelIds: ["C01234567"],
  })
})
```

## Inputs

| Input                  | Type       | Required | Description                                 |
| ---------------------- | ---------- | -------- | ------------------------------------------- |
| `name`                 | `string`   | Yes      | Unique group name.                          |
| `handle`               | `string`   | No       | Unique mention handle.                      |
| `description`          | `string`   | No       | Group description.                          |
| `channelIds`           | `string[]` | No       | Default channel IDs.                        |
| `additionalChannelIds` | `string[]` | No       | Extra channels members may add.             |
| `enableSection`        | `boolean`  | No       | Show default channels as a sidebar section. |
| `includeCount`         | `boolean`  | No       | Include the member count in the response.   |

## Output

Returns the created user group. Requires `usergroups:write`, a paid Slack plan, and workspace permissions that allow the installed bot to manage user groups.
