# Unarchive Slack Channel

Restore an archived Slack channel from a runbook

Unarchives an archived Slack channel so people can use it again. It is the reverse of the archive operation in [Manage Slack Channels](https://www.tryrisotto.com/docs/integrations/tools/slack/manage-slack-channels). Use it to bring back a seasonal or project channel on request.

## How It Works

The agent gives the tool the **channel ID** of the archived channel, for example `C1234567890`. The tool does not look up channels by name. Archived channels do not appear in normal channel lists, so ask the requestor for the channel ID or a link to the channel.

The tool then tries to unarchive the channel in two steps:

1. On an Enterprise Grid organization, it first uses Slack's admin API. This can unarchive any channel in the organization.
2. If that call fails for any reason, it uses the standard Slack call for your own channels.

If the channel is not archived, the tool reports "Channel is not archived."

## Authentication

> **Warning:** **Slack does not allow bot tokens to unarchive channels.** This tool needs a
> Slack **user token** (`xoxp-*`). It never falls back to a bot token or to the
> Slack app that handles your ticket conversations.

The tool uses the first token it finds in this order:

1. The per-tool **User Token** override.
2. The user token of the Slack Tools connector. Follow the [Slack Tools Setup](https://www.tryrisotto.com/docs/integrations/tools/slack/setup) guide to configure it.

The token needs one of these scopes:

- `channels:write` for public channels. The connector's user token includes it.
- `groups:write` for private channels. The connector's user token does not include it. To unarchive private channels, set a per-tool **User Token** that has `groups:write`.
- `admin.conversations:write` on Enterprise Grid, to unarchive any channel in the organization. The connector includes it when you check **Install across the entire Slack organization**. See [Enterprise Grid](https://www.tryrisotto.com/docs/integrations/tools/slack/setup#enterprise-grid).

The token's owner must be allowed to unarchive the channel. Slack can reject the call with a "not a member" error when the owner is not in the channel.

> **Warning:** **Check for the missing-scopes banner before you rely on this tool.** If your
> connector predates the `channels:write` scope, the tool's page in the
> dashboard shows a **Missing scopes** banner: *"The Slack tools app is missing
> required scopes. Reconnect it on the Slack page."* Click the link in the
> banner, or go to **Settings → Integrations → Slack**, then click **Connected**
> on the **Tools app** card and choose **Reconnect...**. Follow the [Slack Tools
> Setup](https://www.tryrisotto.com/docs/integrations/tools/slack/setup#reconnecting-the-connector) guide.

## Configuration Options

- **User Token** *(Optional override)* - Per-tool Slack user token (`xoxp-*`). Takes precedence over the Slack Tools connector. See [per-tool token override](https://www.tryrisotto.com/docs/integrations/tools/slack/setup#per-tool-token-override).
- **Team ID** *(Optional)* - Required only when you use a per-tool user token override.

## Example Runbook Uses

- Restore a seasonal channel, such as a planning channel, when someone asks for it.
- Undo an accidental archive without waiting for a Slack admin.

## Limitations

- The tool needs a channel ID. It cannot find an archived channel by name.
- Private channels need a user token with `groups:write`, or an Enterprise Grid admin install.
- The tool restores the channel only. It does not post a message in the channel. Add [Send Slack Channel Message](https://www.tryrisotto.com/docs/integrations/tools/slack/send_channel_message) to the runbook to tell people it is back.

## Troubleshooting

### Insufficient permissions, or a bot token is configured

Slack rejects unarchive calls from a bot token. Remove any bot token and
use the connector's user token, or set a per-tool **User Token**.

### Slack rejected the unarchive request (not a member)

The token is a bot token, or the token's owner is not a member of the channel.
Use a user token from a channel member. On Enterprise Grid, use an org-wide
install with the `admin.conversations:write` scope.

### Token is missing a required scope

Public channels need `channels:write`. Private channels need `groups:write`.
Reconnect the connector, or use a per-tool **User Token** that has the scope.

### Channel is not archived

The channel is already active. Check the channel ID.

### The Slack app does not have access to that workspace

On Enterprise Grid, add the connector app to the workspace. See [Add the app
to your workspaces](https://www.tryrisotto.com/docs/integrations/tools/slack/setup#add-the-app-to-your-workspaces).

## Related

- [Manage Slack Channels](https://www.tryrisotto.com/docs/integrations/tools/slack/manage-slack-channels) - create, rename, archive, and change channel privacy
- [Send Slack Channel Message](https://www.tryrisotto.com/docs/integrations/tools/slack/send_channel_message) - tell people the channel is back
- [Slack Tools Setup](https://www.tryrisotto.com/docs/integrations/tools/slack/setup)

Source: https://www.tryrisotto.com/docs/integrations/tools/slack/unarchive_channel
