> 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/add-users-to-channel.md).

# Add Users to Channel

Invites all selected users to one existing Slack channel with a single call to Slack's `conversations.invite` API (with `force` set to true). The users come from the assets the previous node collected.

### Before you begin

* A Slack API token: a user token (`xoxp-`) or a bot token (`xoxb-`) with the scopes `channels:write.invites` and `groups:write.invites`. Enter it in **Slack API Token**.
* Asset type: **User** only (`allowed_asset_types` is `user`).
* Required column: `Specifics.slack.id`. Users whose Slack ID is empty are skipped without a message.
* 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-`) or bot token (`xoxb-`) with scopes `channels:write.invites` and `groups:write.invites`. Not masked after saving. |
| Channel ID      | Text | Yes      | None        | The channel to add the users to, for example `C12345678`.                                                                             |

### How it works

* Collects the Slack IDs of all selected users and sends them in one request as a comma separated list. Users that have no value in `Specifics.slack.id` are filtered out before the job runs.
* If no user has a Slack ID, the job fails with `No Slack user IDs found in the selected users.`
* If Slack rejects the request, the job fails with `Slack API add users to channel error for channel <ID>: <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` |
| Channel ID      | `C12345678`            |

### 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>Remove Users from Channel</strong></td><td>The opposite action.</td><td><a href="broken://pages/cbb6ed2756dee6fb420801cb4975a9c5d7207ba6">Broken link</a></td></tr><tr><td><strong>Create Channel</strong></td><td>Create a new channel and add users in one job.</td><td><a href="broken://pages/92a4c3e18a233a182596fca635620c9db44db345">Broken link</a></td></tr></tbody></table>

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