Slack Web Port
This is the Harbor reference integration for the Slack Web API.
Slack Web Port
Purpose
This is the Harbor reference integration for the Slack Web API.
Use it when:
- building Slack actions in Harbor
- extending the Dock / Hub Slack entry
- teaching Codex or OpenClaw how to map an RPC-style API into Harbor Ports and Harbor Actions without turning Harbor into a generic chat proxy
Harbor Port worksheet
Product
- Product: Slack Web API
- Publisher slug:
slack - Publisher name:
Slack - Category:
Messaging - Tags:
slack,messaging,chat,collaboration,workspace
Safe Harbor Port metadata
- Kind:
http_api - Label:
Slack Web API - Description:
Slack Web API connection managed locally through Harbor. - Base URL:
https://slack.com/api/ - Auth mode:
header_token - Auth header name:
Authorization - Auth token prefix:
Bearer
Hidden local config
authToken
Harbor stores the token locally only. Dock / Hub manifests must never contain it.
Harbor action design notes
Slack's Web API is HTTP-based but RPC-style rather than strictly REST-shaped. It still fits Harbor well because:
- every starter action stays on one fixed origin
- method URLs are explicit and reviewable, like
/conversations.list - query inputs can be typed with Harbor's Action Model
- write methods such as
chat.postMessagecan use bounded JSON bodies - Harbor never needs to expose raw auth or arbitrary full-route editing
Good Harbor Slack starter actions:
- fixed
GETreads for workspace conversations and user lists - explicit
POSTwrites for message posting requestBodyMode: "none"for readsrequestBodyMode: "json"for writesresultMode: "json_summary"for all starter actions
Avoid for now:
- giant Slack admin surfaces
- generic method-forwarding across the whole Slack API
- broad write coverage before operator review
- freeform transport escape hatches instead of typed query inputs and bounded JSON request bodies
Starter Slack actions
Automatic read actions
list-conversations->GET /conversations.listlist-users->GET /users.list
Approval-friendly write actions
post-message->POST /chat.postMessage
Why these actions
These routes fit Harbor's current safe model well because they:
- cover the basic operator loop of finding conversations, resolving users, and sending a reviewed message
- keep the route surface small and explicit
- use Harbor's Action Model for typed pagination and filter values
- map cleanly to Slack's bearer-token auth model
- give Harbor an immediately useful messaging integration without becoming a generic Slack method executor
Action Model notes
At execution time, callers should supply values by location:
input.queryforlist-conversationsandlist-usersinput.bodyforpost-message
Example conversation listing request:
{
"query": {
"limit": 100,
"exclude_archived": true,
"types": "public_channel,private_channel"
}
}
Example Slack user listing request:
{
"query": {
"limit": 50,
"include_locale": true
}
}
Example Slack message post request:
{
"body": {
"channel": "C0123456789",
"text": "Hello from Harbor",
"thread_ts": "1713472452.123456"
}
}
For post-message, keep the JSON body bounded to the fields you actually intend to use, such as:
channeltextthread_tsreply_broadcastparseunfurl_linksunfurl_media
Suggested operator workflow
- Import the Slack Dock entry from Dock / Hub.
- Configure the local Slack bearer token in Harbor Node.
- Validate that the token has the Slack scopes needed for the actions you want to use.
- Use
list-conversationsto discover channel IDs andlist-usersto inspect workspace users first. - Keep
post-messageonrequire_approvalunless there is a clear local policy reason not to.
Suggested agent workflow
- Inspect the existing Slack Harbor Port.
- Inspect live actions and drafts.
- Propose additional fixed Slack methods only when they remain bounded and reviewable.
- Validate and test drafts.
- Request publish instead of self-publishing unless Harbor explicitly allows it.
Agents should never:
- ask Harbor for the stored Slack token
- widen Slack into a generic method-forwarding proxy
- hide Slack method names behind vague labels
- add broad write or admin coverage without review
Current update strategy
For now, Slack updates are manual:
- update the Dock / Hub Slack integration document in
apps/hub/catalog/integrations/slack/slack-web-api.json - bump the manifest version when the action set changes materially
- re-import into Harbor or create new drafts from the updated Dock entry
Scope notes
These starter actions usually need:
channels:readgroups:readim:readmpim:readusers:readchat:write
The exact scope mix depends on which conversation types and write flows the local operator wants to enable.
Official reference starting points
- Slack Web API overview:
https://docs.slack.dev/apis/web-api/ - Slack OAuth install flow:
https://docs.slack.dev/authentication/installing-with-oauth/ - conversations.list:
https://docs.slack.dev/reference/methods/conversations.list/ - users.list:
https://docs.slack.dev/reference/methods/users.list/ - chat.postMessage:
https://docs.slack.dev/reference/methods/chat.postMessage/