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
- Seasonal channel rotation: Rename quarterly planning channels at the start of each quarter (e.g., rename
#q4-planningto#q1-planning) rather than creating and archiving new channels. - Project name updates: When a project is renamed in your project management system, automatically update the corresponding Slack channel name to keep it in sync.
- Naming convention standardization: Run a bulk rename workflow to bring all channels into compliance with a new naming policy (e.g., adding team prefixes).
- Post-resolution incident channel: Rename an active incident channel (e.g.,
#incident-p1-activeto#incident-p1-resolved) to signal status change.
Configuration
Connection
| Field | Type | Required | Description |
|---|---|---|---|
botToken | string | Required | Bot Token starting with xoxb-. Requires channels:manage scope. The bot must have admin permissions for the workspace in some configurations. |
Operation Fields
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | Required | The channel to rename. Starts with C (public) or G (private). |
name | string | Required | The 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 Code | Cause | Resolution |
|---|---|---|
name_taken | A 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_name | The 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_authorized | The 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_found | Invalid channel ID. | Verify the channel ID using channel/get first. |
missing_scope | Bot token lacks channels:manage scope. | Re-authorize the Slack app with the required scope. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
channelId | string | The channel ID (unchanged by the rename). |
channelName | string | The new channel name as confirmed by Slack. |
status | string | success or error. |
errorCode | string | Slack error code when status is error. |
payload | object | Full 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
| Expression | Result |
|---|---|
{{$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 Area | Recommendation |
|---|---|
| Scope requirements | Requires channels:manage scope. Some workspaces require admin-level permissions to rename channels. |
| Rate limiting | Tier 2 (20+ req/min). For bulk rename operations, add delays between calls to avoid rate limits. |
| No hard-coded IDs | Always source channelId dynamically. The channel ID persists through renames — store IDs, not names, in your data systems. |
| Name sanitization | Always sanitize input names before passing to this node. Raw user input may contain uppercase, spaces, or special characters that cause invalid_name errors. |
| Naming conventions | Channel names must be lowercase, max 80 chars, no spaces or dots. Enforce a consistent naming pattern: team-{name}, project-{name}, incident-{id}. |
| Downstream name updates | After 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}}"
}