> 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/update-group.md).

# Update Group

Updates one existing Slack user group with Slack's `usergroups.update` API. You give the group ID and only the values you want to change. The job does not use the collected assets: it runs once with the values you enter.

### 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 ID          | Text     | Yes      | None        | The ID of the user group to update, for example `S01234567`.                                                                                                                                   |
| Group Name        | Text     | No       | None        | New name. Up to 80 characters.                                                                                                                                                                 |
| Group Handle      | Text     | No       | None        | New unique mention handle, for example `account-team`. Lowercase letters, numbers, hyphens and underscores only. Up to 80 characters.                                                          |
| Group Description | Text     | No       | None        | New description.                                                                                                                                                                               |
| 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-`).                                                                                                                         |

**Group ID**, **Enable section** and **Team id** follow the field names where the product defines no label.

### How it works

* Sends one `usergroups.update` request with the group ID plus every text field you filled in. Empty fields are left out, so they do not change the group. It runs once per workflow run.
* **Enable section** is always sent, including as false when the box is cleared, so the sidebar setting is set on every run.
* If Slack rejects the request, the job fails with `Slack API Update 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 ID          | `S01234567`               |
| Group Description | `Handles security alerts` |

### 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>Create Group</strong></td><td>Create a Slack user group.</td><td><a href="broken://pages/37d9d5e0f894e2bc72d5af830106ebc5c548b88f">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 %}
