Modules@robinpath/slack

@robinpath/slack

0.1.0Public

Slack Web API and Incoming Webhooks client for messaging, channels, reactions, file uploads, and user management

@robinpath/slack

Slack Web API and Incoming Webhooks client for messaging, channels, reactions, file uploads, and user management

Category Functions Auth License

Why use this module?

The slack module lets you:

  • Send a message to a Slack channel via chat.postMessage
  • Send a message via a Slack Incoming Webhook URL (no token needed)
  • Reply to a message thread via chat.postMessage with thread_ts
  • Add an emoji reaction to a message via reactions.add
  • Upload a file to a Slack channel using the new file upload API

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/slack

Quick Start

1. Set up credentials

slack.setToken "default" "xoxb-your-token" {"defaultChannel": "general"}

2. Send a message to a Slack channel via chat.postMessage

slack.send "default" "#general" "Hello from RobinPath!"

Available Functions

FunctionDescription
slack.setTokenStore a Slack Bot User OAuth Token for a workspace
slack.sendSend a message to a Slack channel via chat.postMessage
slack.sendWebhookSend a message via a Slack Incoming Webhook URL (no token needed)
slack.replyReply to a message thread via chat.postMessage with thread_ts
slack.reactAdd an emoji reaction to a message via reactions.add
slack.uploadUpload a file to a Slack channel using the new file upload API
slack.listChannelsList Slack channels via conversations.list
slack.getHistoryGet message history for a channel via conversations.history
slack.setStatusSet the authenticated user's status via users.profile.set
slack.userInfoGet user information via users.info
slack.createChannelCreate a new Slack channel via conversations.create
slack.updateMessageUpdate an existing message via chat.update

Examples

Send a message to a Slack channel via chat.postMessage

slack.send "default" "#general" "Hello from RobinPath!"

Send a message via a Slack Incoming Webhook URL (no token needed)

slack.sendWebhook "https://hooks.slack.com/services/T.../B.../xxx" "Deploy complete!"

Reply to a message thread via chat.postMessage with thread_ts

slack.reply "default" "C01234" "1234567890.123456" "Got it, thanks!"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/slack";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  slack.setToken "default" "xoxb-your-token" {"defaultChannel": "general"}
  slack.send "default" "#general" "Hello from RobinPath!"
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/slack
Version0.1.0
LicenseMIT
Unpacked Size7.0 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday