> 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/assign-workspace-to-channels-enterprise.md).

# Assign Workspace to Channels (Enterprise)

Sets the list of default channels for one Slack workspace by calling Slack's `admin.teams.settings.setDefaultChannels` API. The job does not use the collected assets: it runs once with the values you enter.

{% hint style="info" %}
Slack only offers this API to workspaces on an Enterprise plan. The token help text in the job form says so.
{% endhint %}

### Before you begin

* A Slack API token: a user token (`xoxp-`) with the scope `admin.teams:write`, on a Slack Enterprise plan. 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 `admin.teams:write`. Not masked after saving.                                                                                                        |
| Team ID         | Text | Yes      | None        | The ID of the workspace. In Slack, open the workspace and read the part of the URL that starts with `T`, for example `https://app.slack.com/client/T12345678/...` gives `T12345678`. |
| Channel IDs     | Text | Yes      | None        | The default channels. Comma separated channel IDs, each starting with `C` and made of uppercase letters and numbers, for example `C0ACBBQ7PPE,C0ACQAQ7PAA`.                          |

### How it works

* Splits **Channel IDs** on commas and sends one request with the Team ID and the channel list. It runs once per workflow run, regardless of how many assets were collected.
* If Slack rejects the request, the job fails with `Slack API assign workspaces to channels 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`    |
| Team ID         | `T12345678`               |
| Channel IDs     | `C0ACBBQ7PPE,C0ACQAQ7PAA` |

### 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 Channel</strong></td><td>Create a channel and add users.</td><td><a href="broken://pages/92a4c3e18a233a182596fca635620c9db44db345">Broken link</a></td></tr><tr><td><strong>Add Users to Channel</strong></td><td>Add users to an existing channel.</td><td><a href="broken://pages/4b971ea07e372bcb0ceb4ebf7e84410058a4a27d">Broken link</a></td></tr></tbody></table>

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