channel/create
Creates a new public or private Slack channel in the workspace. The bot must have channels:manage scope for public channels or groups:write scope for private channels.
When to Use
- Tenant onboarding: Automatically create a dedicated
#client-acmechannel when a new customer account is provisioned in your CRM. - Incident response: Spin up
#incident-P1-2024-01-15channels dynamically when a high-severity alert fires, giving the response team an immediate dedicated space. - Project kickoff: Create project channels as part of a project management workflow — triggered when a new project is created in Jira, Asana, or a custom system.
- Team provisioning: Provision a standard set of channels (
#team-general,#team-alerts,#team-deploys) when a new engineering team is formed. - Feature flag environments: Create per-environment notification channels (e.g.,
#deploy-staging,#deploy-prod) as part of environment setup automation.
Configuration
Connection
| Field | Type | Required | Description |
|---|---|---|---|
botToken | string | Required | Bot Token starting with xoxb-. Requires channels:manage (public) or groups:write (private) scopes. |
Operation Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | Channel name — lowercase letters, numbers, hyphens only. No spaces or dots. Max 80 characters. |
isPrivate | boolean | Optional | Set to true to create a private channel. Default: false (public channel). |
teamId | string | Optional | Team ID for Enterprise Grid workspaces. Only required when operating across multiple orgs in a grid. |
Naming Rules: Channel names must be all lowercase, max 80 characters, and may only contain letters, numbers, and hyphens. Spaces and dots are not allowed and will cause a validation error.
Sample Configuration
{
"operation": "channel/create",
"connection": {
"botToken": "{{credentials.slackBotToken}}"
},
"fields": {
"name": "{{$json.channelName | lower | replace(' ', '-')}}",
"isPrivate": false,
"teamId": ""
}
}
Validation Errors
| Error Code | Cause | Resolution |
|---|---|---|
name_taken | A channel with this name already exists (even if archived). | Check existence first using channel/get or append a unique suffix. Archived channels can block the name — use channel/unarchive instead of creating new. |
invalid_name | The channel name contains invalid characters (uppercase, spaces, dots, special chars) or exceeds 80 characters. | Sanitize the name using expressions: lowercase and replace spaces with hyphens before passing to this node. |
restricted_action | Workspace policy restricts channel creation by bots or non-admins. | Check workspace settings under Administration > Settings. The bot may need admin-level permissions or the workspace may be locked. |
missing_scope | Bot token lacks channels:manage or groups:write scope. | Re-authorize the Slack app with the required scopes in the Slack App Dashboard. |
Output
Success Port
| Field | Type | Description |
|---|---|---|
channelId | string | The unique Slack channel ID (e.g., C08XXXXXX). Use this in subsequent operations. |
channelName | string | The normalized channel name as accepted by Slack. |
isPrivate | boolean | Whether the created channel is private. |
createdTimestamp | number | Unix timestamp (seconds) when the channel was created. |
creatorUserId | string | Slack user ID of the creator (the bot's user ID). |
status | string | success or error. |
errorCode | string | Slack error code when status is error. Empty on success. |
payload | object | Full raw Slack API response for advanced processing. |
Error Port
If the operation fails and error handling is set to Continue on Error, execution routes to the error port with status: "error" and a populated errorCode field. Common codes: name_taken, invalid_name, restricted_action, missing_scope.
Sample Output
{
"channelId": "C08AB3XYZ12",
"channelName": "project-alpha-launch",
"isPrivate": false,
"createdTimestamp": 1716729600,
"creatorUserId": "U01BOT99999",
"status": "success",
"errorCode": "",
"payload": {
"ok": true,
"channel": {
"id": "C08AB3XYZ12",
"name": "project-alpha-launch",
"is_channel": true,
"is_private": false,
"created": 1716729600,
"creator": "U01BOT99999"
}
}
}
Expression Reference
| Expression | Result |
|---|---|
{{$node["channel-create"].json.channelId}} | The new channel's ID — use in downstream channel/invite or message/send nodes. |
{{$node["channel-create"].json.channelName}} | Normalized channel name as confirmed by Slack. |
{{$node["channel-create"].json.isPrivate}} | Boolean confirming privacy setting. |
{{$node["channel-create"].json.createdTimestamp}} | Unix timestamp — convert with new Date(ts * 1000).toISOString(). |
{{$node["channel-create"].json.status === "success"}} | Boolean gate — use in IF node to branch on success/failure. |
Node Policies & GuardRails
| Policy Area | Recommendation |
|---|---|
| Scope requirements | Ensure the bot token has channels:manage for public channels and groups:write for private channels. Missing scopes produce silent failures in some configurations. |
| Rate limiting | Channel create is Tier 2 (20+ req/min). For bulk provisioning (e.g., 50+ channels), insert a Wait node with a 3-second delay between iterations to avoid hitting rate limits. |
| Name sanitization | Always run channel names through a sanitize expression before passing to this node: {{$json.name.toLowerCase().replace(/[\s\.]+/g, '-').substring(0, 80)}} |
| Idempotency | Before creating, use channel/getMany or channel/get to check if a channel with the same name exists. Slack returns name_taken even for archived channels. |
| No hard-coded IDs | Never hard-code the resulting channelId in downstream nodes. Always read it from the output expression {{$node["channel-create"].json.channelId}}. |
| Audit trail | Log channelId, channelName, and createdTimestamp to your audit system immediately after creation for compliance tracking. |
Examples
Example 1 — New Client Onboarding Channel
Triggered by a CRM webhook when a new customer account is created. Creates a dedicated client channel and posts a welcome message.
// Trigger: CRM webhook payload
// $json.clientName = "Acme Corp"
// $json.accountId = "ACC-10042"
{
"operation": "channel/create",
"fields": {
"name": "{{('client-' + $json.clientName).toLowerCase().replace(/\s+/g, '-')}}",
"isPrivate": true
}
}
// Next node: channel/invite — add account manager
// Next node: message/send — post welcome message with account details
Example 2 — Auto Incident Channel
PagerDuty alert fires a workflow that creates an incident-specific channel, sets its topic, and invites the on-call team.
// $json.severity = "P1"
// $json.incidentId = "INC-2024-0315"
// $json.date = "2024-03-15"
{
"operation": "channel/create",
"fields": {
"name": "{{'incident-' + $json.severity.toLowerCase() + '-' + $json.date}}",
"isPrivate": false
}
}
// Outputs channelId → used by channel/setTopic and channel/invite nodes
Example 3 — Environment Channel Provisioning
DevOps workflow that creates standard deployment notification channels for a new environment.
// Loop over environments: ["staging", "uat", "prod"]
// $json.env = current iteration value
{
"operation": "channel/create",
"fields": {
"name": "{{'deploy-' + $json.env}}",
"isPrivate": false
}
}
// Result channels: #deploy-staging, #deploy-uat, #deploy-prod