Portal Community

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

Configuration

Connection

FieldTypeRequiredDescription
botTokenstringRequiredBot Token starting with xoxb-. Requires channels:read (public) or groups:read (private) scopes.

Operation Fields

FieldTypeRequiredDescription
channelIdstringRequiredThe 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 CodeCauseResolution
channel_not_foundThe 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_scopeBot token lacks channels:read or groups:read scope.Re-authorize the Slack app with the required scopes.

Output

Success Port

FieldTypeDescription
channelIdstringThe channel ID as provided.
channelNamestringThe current name of the channel.
isPrivatebooleanWhether this is a private channel.
isArchivedbooleanWhether the channel is currently archived.
topicstringThe current channel topic text.
purposestringThe channel purpose description.
numMembersnumberCurrent member count. Note: not available for private channels via this endpoint.
createdTimestampnumberUnix timestamp of channel creation.
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 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

ExpressionResult
{{$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 AreaRecommendation
Scope requirementsEnsure 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 limitingTier 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 IDsNever hard-code channel IDs in the configuration. Always pass IDs via expressions from upstream nodes or a data store lookup.
Archive check patternAlways check isArchived before posting. Build an IF node branch: if archived, either skip or call channel/unarchive first.
Private channel accessThe bot must be a member of a private channel to retrieve its info. Use channel/join first if needed, then call channel/get.
Audit trailLog 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"