> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/slack/create-group.md).

# Create Group

Creates one Slack user group with Slack's `usergroups.create` API. The job does not use the collected assets: it runs once with the values you enter. To fill the group afterwards, follow it with [Assign Group To Users](broken://pages/ac474e38a38faf0f09dd392f00fba0c97220476d).

### Before you begin

* A Slack API token: a user token (`xoxp-`) with the scope `usergroups:write`. Organization-level tokens (`xoxa-`) work only with a Team id. Enter it in **Slack API Token**.
* Asset type: **User** (`allowed_asset_types` is `user`). The job does not read any asset data and has no required columns.
* Job defaults: Slack Domain, Slack API Token and the other fields can be saved as defaults for this job in [Action Center Settings](broken://pages/fa25776ab251a33bb2a7e69faf62f677f3b76280).

### Settings

| Setting           | Type     | Required | Default     | Description                                                                                                                                                                                    |
| ----------------- | -------- | -------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Slack Domain      | Text     | No       | `slack.com` | The Slack domain the requests are sent to. Requests go to `https://<domain>/api/...`.                                                                                                          |
| Slack API Token   | Text     | Yes      | None        | User token (`xoxp-`) with scope `usergroups:write`. Not masked after saving.                                                                                                                   |
| Group Name        | Text     | Yes      | None        | A name for the user group. Must be unique. Up to 80 characters.                                                                                                                                |
| Group Handle      | Text     | Yes      | None        | Unique mention handle, for example `account-team`. Up to 80 characters, lowercase letters, numbers, hyphens and underscores only.                                                              |
| Group Description | Text     | No       | None        | Description of the group.                                                                                                                                                                      |
| Channels          | Text     | No       | None        | Group members are added to these channels automatically. Comma separated channel IDs, each starting with `C` and made of uppercase letters and numbers, for example `C0ACBBQ7PPE,C0ACQAQ7PAA`. |
| Enable section    | Checkbox | No       | Off         | Select to show the group as a section in the Slack Home sidebar.                                                                                                                               |
| Team id           | Text     | No       | None        | Slack Team ID. Needed only with an organization-level token (`xoxa-`).                                                                                                                         |

**Enable section** and **Team id** are labels derived from the field names.

### How it works

* Sends one `usergroups.create` request. Description, channels and the sidebar option are sent only when you set them; the Team id only with an `xoxa-` token. It runs once per workflow run.
* If Slack rejects the request, the job fails with `Slack API Create User Group error: <code>`. The run stops and the error appears under **Error Details** in **History**.
* Passes the same assets it received to the next node.

### Example

| Setting         | Value                  |
| --------------- | ---------------------- |
| Slack Domain    | `slack.com`            |
| Slack API Token | `YOUR_SLACK_API_TOKEN` |
| Group Name      | `Security Team`        |
| Group Handle    | `security-team`        |
| Channels        | `C01234567`            |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/c53d026b9438b74e5c96c7a59bb6d75211026536">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/fa25776ab251a33bb2a7e69faf62f677f3b76280">Broken link</a></td></tr><tr><td><strong>Update Group</strong></td><td>Change a Slack user group.</td><td><a href="broken://pages/ab58b35f6f13a552d7422e9c7d917dd7a0ab7ed2">Broken link</a></td></tr><tr><td><strong>Assign Group To Users</strong></td><td>Add selected users to a user group.</td><td><a href="broken://pages/ac474e38a38faf0f09dd392f00fba0c97220476d">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.3.0.
{% endhint %}
