Portal Community

channel/archive

Archives a Slack channel, hiding it from all members' channel lists and preventing new messages from being posted. The channel and all its history are preserved and remain searchable. Use channel/unarchive to restore. Requires channels:manage scope.

Archiving hides the channel for all members. Members cannot post to an archived channel and it will no longer appear in their channel list. The channel name is blocked from reuse while archived. Use channel/unarchive to restore access. This is the closest Slack has to "deleting" a channel — history is always preserved.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
botTokenstringRequiredBot Token starting with xoxb-. Requires channels:manage scope. The bot must have admin permissions in some workspace configurations.

Operation Fields

FieldTypeRequiredDescription
channelIdstringRequiredThe channel to archive. Starts with C (public) or G (private).

Sample Configuration

{
  "operation": "channel/archive",
  "connection": {
    "botToken": "{{credentials.slackBotToken}}"
  },
  "fields": {
    "channelId": "{{$json.channelId}}"
  }
}

Validation Errors

Error CodeCauseResolution
already_archivedThe channel is already archived.Check isArchived with channel/get before archiving. Treat this error as a warning, not a failure.
cant_archive_generalAttempting to archive the workspace's #general channel.The #general channel cannot be archived. Skip it in bulk archive workflows.
not_authorizedThe bot does not have permission to archive this channel. Some workspaces require admin-level permissions.Check workspace settings. The operation may require workspace admin privileges beyond the bot's current scope.
channel_not_foundInvalid channel ID.Verify the channel ID with channel/get first.
missing_scopeBot token lacks channels:manage scope.Re-authorize the Slack app with the required scope.

Output

Success Port

FieldTypeDescription
channelIdstringThe channel that was archived.
statusstringsuccess or error.
errorCodestringSlack error code when status is error.
payloadobjectFull raw Slack API response.

Error Port

On failure with Continue on Error enabled, routes to the error port. For bulk archive workflows, treat already_archived and cant_archive_general as safe-to-ignore warnings.

Sample Output

{
  "channelId": "C08PROJECT01",
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true
  }
}

Expression Reference

ExpressionResult
{{$node["channel-archive"].json.channelId}}Archived channel ID — use in audit log entries and completion notifications.
{{$node["channel-archive"].json.status === "success"}}Boolean confirmation — gate downstream archival notifications.

Node Policies & GuardRails

Policy AreaRecommendation
Scope requirementsRequires channels:manage scope. Some workspace configurations require workspace admin privileges to archive channels.
Rate limitingTier 2 (20+ req/min). For bulk archive operations, add delays between calls.
No hard-coded IDsAlways source channelId dynamically. Never hard-code channel IDs in archive configurations.
Archive instead of deleteSlack has no delete operation for channels. Archive is the permanent lifecycle end state. Archived channels preserve full history and are searchable. Do not try to recreate channels by name after archiving without unarchiving first.
Pre-archive notificationAlways post a final message to the channel before archiving, informing members that the channel will be archived and where they should go for future communication.
General channel exceptionAlways filter out the #general channel from bulk archive workflows. Attempting to archive it returns cant_archive_general.

Examples

Example 1 — Project Completion Archival Workflow

Full project lifecycle close-out: post final message, export history, then archive.

// Node 1: message/send — final notification
{
  "channelId": "{{$json.channelId}}",
  "text": "Project {{$json.projectName}} is now complete and marked as delivered. This channel will be archived in 24 hours. Post-mortem document: {{$json.documentUrl}}"
}

// Node 2 (24h later): channel/archive
{ "channelId": "{{$json.channelId}}" }

// Node 3: log archival to project management system

Example 2 — Inactive Channel Cleanup Audit

Monthly scheduled workflow that archives channels with no activity in 90 days.

// channel/getMany → all active channels
// For each channel: channel/getHistory (oldest: 90 days ago, limit: 1)
// IF: messageCount === 0
//   channel/archive

const ninetyDaysAgo = (Date.now() / 1000 - 90 * 86400).toString();
// IF last message older than 90 days → archive

Example 3 — Post-Incident Channel Archive

After an incident is marked resolved in PagerDuty, archives the incident channel after exporting the thread.

// Trigger: incident resolved event
// Node 1: channel/getHistory → export to incident archive DB
// Node 2: message/send — "Incident resolved. Channel archived for records."
// Node 3: channel/archive
{ "channelId": "{{$json.incidentChannelId}}" }