Portal Community

channel/rename

Renames an existing Slack channel. The channel ID remains unchanged — only the display name changes. The new name must follow Slack's naming rules: lowercase, max 80 characters, no spaces or dots. Requires channels:manage scope.

When to Use

Configuration

Connection

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

Operation Fields

FieldTypeRequiredDescription
channelIdstringRequiredThe channel to rename. Starts with C (public) or G (private).
namestringRequiredThe new channel name. Must be lowercase, max 80 characters, no spaces or dots. Hyphens are allowed.
Channel ID is permanent: Renaming a channel does not change its ID. Any existing expressions or configurations referencing the channel ID will continue to work without updates.

Sample Configuration

{
  "operation": "channel/rename",
  "connection": {
    "botToken": "{{credentials.slackBotToken}}"
  },
  "fields": {
    "channelId": "{{$json.channelId}}",
    "name": "{{$json.newName.toLowerCase().replace(/[\s\.]+/g, '-').substring(0, 80)}}"
  }
}

Validation Errors

Error CodeCauseResolution
name_takenA channel with the new name already exists (active or archived).Check existing channels with channel/getMany. Use a unique suffix or choose a different name.
invalid_nameThe new name contains uppercase letters, spaces, dots, or exceeds 80 characters.Sanitize the name before passing it: .toLowerCase().replace(/[\s\.]+/g, '-').substring(0, 80)
not_authorizedThe bot does not have permission to rename this channel. Some workspaces restrict renames to admins.Check workspace settings. The bot may need to be a workspace admin, or the feature may need to be enabled in workspace settings.
channel_not_foundInvalid channel ID.Verify the channel ID using 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 ID (unchanged by the rename).
channelNamestringThe new channel name as confirmed by Slack.
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 rename workflows, handle name_taken by appending a suffix and retrying.

Sample Output

{
  "channelId": "C08AB3XYZ12",
  "channelName": "q1-planning-2025",
  "status": "success",
  "errorCode": "",
  "payload": {
    "ok": true,
    "channel": {
      "id": "C08AB3XYZ12",
      "name": "q1-planning-2025"
    }
  }
}

Expression Reference

ExpressionResult
{{$node["channel-rename"].json.channelName}}New channel name — use in confirmation messages or audit logs.
{{$node["channel-rename"].json.channelId}}Channel ID (unchanged) — continue using in downstream operations.
{{$json.name.toLowerCase().replace(/[\s\.]+/g, '-').substring(0, 80)}}Sanitized name expression — use as the name field value to prevent validation errors.
{{$node["channel-rename"].json.status === "success"}}Boolean gate — confirm rename before updating external records.

Node Policies & GuardRails

Policy AreaRecommendation
Scope requirementsRequires channels:manage scope. Some workspaces require admin-level permissions to rename channels.
Rate limitingTier 2 (20+ req/min). For bulk rename operations, add delays between calls to avoid rate limits.
No hard-coded IDsAlways source channelId dynamically. The channel ID persists through renames — store IDs, not names, in your data systems.
Name sanitizationAlways sanitize input names before passing to this node. Raw user input may contain uppercase, spaces, or special characters that cause invalid_name errors.
Naming conventionsChannel names must be lowercase, max 80 chars, no spaces or dots. Enforce a consistent naming pattern: team-{name}, project-{name}, incident-{id}.
Downstream name updatesAfter renaming, update any external references (databases, dashboards, documentation) that store channel names rather than IDs.

Examples

Example 1 — Quarterly Channel Rotation

Scheduled workflow that runs at the start of each quarter to rename planning channels.

// Runs on January 1, April 1, July 1, October 1
const quarter = Math.ceil((new Date().getMonth() + 1) / 3);
const year = new Date().getFullYear();
const newName = `q${quarter}-planning-${year}`;

{
  "operation": "channel/rename",
  "fields": {
    "channelId": "C08PLANNING01",
    "name": newName
  }
}

Example 2 — Project Name Sync

When a project is renamed in Jira, the corresponding Slack channel is automatically renamed to match.

// Trigger: Jira project rename webhook
// $json.oldProjectKey, $json.newProjectName, $json.slackChannelId

{
  "operation": "channel/rename",
  "fields": {
    "channelId": "{{$json.slackChannelId}}",
    "name": "{{'project-' + $json.newProjectName.toLowerCase().replace(/\s+/g, '-').substring(0, 72)}}"
  }
}
// message/send — notify channel of rename

Example 3 — Bulk Naming Convention Enforcement

One-time workflow that adds the required team- prefix to all channels that are missing it.

// channel/getMany → filter channels not starting with standard prefixes
const channels = $node["channel-getmany"].json.channels
  .filter(c => !c.channelName.match(/^(team|project|client|incident|deploy)-/));

// For each: channel/rename
{
  "channelId": "{{$json.channelId}}",
  "name": "{{'team-' + $json.channelName}}"
}