Portal / Nodes / Slack / channel/get
channel/get
Retrieves detailed metadata for a single Slack channel by its ID — including name, privacy, member count, topic, purpose, and archive status. Requires channels:read scope for public channels or groups:read for private channels.
When to Use
- Pre-send verification: Confirm a channel exists and is not archived before routing a message to it — prevents failed delivery in automated alert pipelines.
- Capacity planning: Retrieve
numMembers to determine if a channel has grown beyond a threshold and needs splitting into sub-channels.
- Archive guard: Check
isArchived before posting — route to an alternate channel or unarchive first if the target is archived.
- Channel directory audits: Read topic and purpose fields to validate that channels conform to organizational documentation standards.
- Dynamic channel picker: Resolve a channel name to its ID in an admin tool by doing a lookup before displaying or acting on it.
Configuration
Connection
| Field | Type | Required | Description |
botToken | string | Required | Bot Token starting with xoxb-. Requires channels:read (public) or groups:read (private) scopes. |
Operation Fields
| Field | Type | Required | Description |
channelId | string | Required | The Slack channel ID starting with C (public) or G (private group). Example: C08AB3XYZ12. |
Channel ID vs. Name: This operation requires the channel ID, not the name. If you only have a channel name, use channel/getMany to look up the ID first, then pass it here.
Sample Configuration
{
"operation": "channel/get",
"connection": {
"botToken": "{{credentials.slackBotToken}}"
},
"fields": {
"channelId": "{{$json.channelId}}"
}
}
Validation Errors
| Error Code | Cause | Resolution |
channel_not_found | The channel ID does not exist, has been deleted (impossible in Slack — channels can only be archived), or the bot does not have access to view it. | Verify the channel ID is correct. For private channels, ensure the bot has been added as a member. Use channel/getMany to enumerate accessible channels. |
missing_scope | Bot token lacks channels:read or groups:read scope. | Re-authorize the Slack app with the required scopes. |
Output
Success Port
| Field | Type | Description |
channelId | string | The channel ID as provided. |
channelName | string | The current name of the channel. |
isPrivate | boolean | Whether this is a private channel. |
isArchived | boolean | Whether the channel is currently archived. |
topic | string | The current channel topic text. |
purpose | string | The channel purpose description. |
numMembers | number | Current member count. Note: not available for private channels via this endpoint. |
createdTimestamp | number | Unix timestamp of channel creation. |
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 with status: "error" and errorCode set. Use an IF node to branch on errorCode === "channel_not_found" to handle missing channels gracefully.
Sample Output
{
"channelId": "C08AB3XYZ12",
"channelName": "project-alpha-launch",
"isPrivate": false,
"isArchived": false,
"topic": "Sprint 42 — targeting 2024-02-01 GA release",
"purpose": "Coordination channel for Project Alpha launch team",
"numMembers": 14,
"createdTimestamp": 1716729600,
"status": "success",
"errorCode": "",
"payload": {
"ok": true,
"channel": {
"id": "C08AB3XYZ12",
"name": "project-alpha-launch",
"is_private": false,
"is_archived": false,
"topic": { "value": "Sprint 42 — targeting 2024-02-01 GA release" },
"purpose": { "value": "Coordination channel for Project Alpha launch team" },
"num_members": 14,
"created": 1716729600
}
}
}
Expression Reference
| Expression | Result |
{{$node["channel-get"].json.channelName}} | Current channel name — use for display or audit logging. |
{{$node["channel-get"].json.isArchived}} | Boolean — gate with IF node to block sending to archived channels. |
{{$node["channel-get"].json.numMembers}} | Member count — compare against a threshold to trigger capacity alerts. |
{{$node["channel-get"].json.topic}} | Current topic text — use in reports or to check if topic needs updating. |
{{$node["channel-get"].json.purpose}} | Purpose field — validate against naming standards in compliance workflows. |
Node Policies & GuardRails
| Policy Area | Recommendation |
| Scope requirements | Ensure channels:read for public channels and groups:read for private channels. The bot must also be a member of private channels to retrieve their details. |
| Rate limiting | Tier 3 operation (50+ req/min). Safe for moderate polling but avoid calling in tight loops. Cache results for channels that change infrequently. |
| No hard-coded IDs | Never hard-code channel IDs in the configuration. Always pass IDs via expressions from upstream nodes or a data store lookup. |
| Archive check pattern | Always check isArchived before posting. Build an IF node branch: if archived, either skip or call channel/unarchive first. |
| Private channel access | The bot must be a member of a private channel to retrieve its info. Use channel/join first if needed, then call channel/get. |
| Audit trail | Log channel metadata snapshots to your audit system when performing compliance reviews. |
Examples
Example 1 — Archive Guard Before Posting
Before sending an alert, verify the target channel is active. If archived, route the message to a fallback channel.
// Node 1: channel/get
{ "channelId": "{{$json.targetChannelId}}" }
// Node 2: IF node
// Condition: {{$node["channel-get"].json.isArchived === false}}
// True branch → message/send to targetChannelId
// False branch → message/send to fallbackChannelId (#general-alerts)
Example 2 — Channel Compliance Audit
Reads a list of channel IDs from a database, retrieves each channel's metadata, and flags any that are missing a purpose.
// Loop over channel IDs from DB query
// $json.channelId = current ID in loop
{ "operation": "channel/get", "fields": { "channelId": "{{$json.channelId}}" } }
// IF node: {{$node["channel-get"].json.purpose === ""}}
// True → log to compliance report: "Channel missing purpose"
Example 3 — Member Count Capacity Alert
Scheduled daily workflow that checks if the general announcements channel has grown beyond 500 members, triggering a review alert.
{ "operation": "channel/get", "fields": { "channelId": "C08ANNOUNCE01" } }
// IF: {{$node["channel-get"].json.numMembers > 500}}
// True → message/send to #ops-team: "Announcements channel has {{numMembers}} members — review needed"