Graphrt

Slack

Conversations, history and threads, post/edit messages, reactions, users, file uploads and message search, agent posts need an opt-in, deletes are node only

Beta v0.1.0 Node.js 18 actions ToS risk low
Use in Graphrt Desktop

About

A Graphrt plugin for the Slack Web API. It reads conversations, history and threads, posts and edits messages, manages reactions, looks up users, uploads files (the current external-upload flow) and searches messages. Every operation is a workflow node, most are agent tools as well (see "Agent policy").

What it can do

  • Conversations: list_conversations, get_conversation_info, get_conversation_history, get_thread_replies, get_permalink
  • Messages: post_message, update_message, delete_message (node only)
  • Reactions: add_reaction, remove_reaction, get_reactions
  • Users: auth_test, list_users, get_user_info, lookup_user_by_email
  • Files: upload_file (files.getUploadURLExternal → upload → files.completeUploadExternal, optional channel, comment and thread)
  • Search: search_messages (search.messages with a user token, page-based next_cursor)
  • api_request: any other Web API method. As an agent tool it is GET-only and limited to read methods (.list, .info, .history, .replies, .get, .lookup), because Slack also runs write methods sent as GET.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Check token slack.auth_test
  • List conversations slack.list_conversations
  • Get conversation slack.get_conversation_info
  • Channel history slack.get_conversation_history
  • Thread replies slack.get_thread_replies
  • Message link slack.get_permalink
  • Get reactions slack.get_reactions
  • List users slack.list_users
  • Get user slack.get_user_info
  • Find user by email slack.lookup_user_by_email
Show all 18 actions
  • Post message slack.post_message
  • Edit message slack.update_message
  • Delete message slack.delete_message
  • Add reaction slack.add_reaction
  • Remove reaction slack.remove_reaction
  • Upload file slack.upload_file
  • Search messages slack.search_messages
  • Slack Web API request slack.api_request

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • SLACK_BOT_TOKEN Required
    Bot token (xoxb-...) used by every operation except search
  • SLACK_USER_TOKEN For search_messages
    User token (xoxp-...) with search:read
  • SLACK_UPLOAD_DIR For local uploads
    Directory upload_file may read local files from (https URLs work without it)
  • SLACK_TOOL_ALLOW_SEND Optional
    1 lets agent tools post, edit and upload
  • SLACK_TOOL_TOKEN_SOURCE

How to use it

In Graphrt Desktop

  1. Open Plugins and search for Slack.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install slack
workflow.yaml
- id: post
  type: slack.post_message
  channel: C0123456789
  text: "Build {{#start.build#}} finished"
- id: react
  type: slack.add_reaction
  channel: C0123456789
  timestamp: "{{#post.data.ts#}}"
  name: white_check_mark
- id: upload
  type: slack.upload_file
  file: /srv/reports/weekly.pdf          # inside $SLACK_UPLOAD_DIR
  channel_id: C0123456789
  initial_comment: Weekly report
Plugins in the docs