Matimo provider — Slack tools (send messages, manage channels, users)
Project description
matimo-slack
Slack tools for Matimo — send messages, manage channels, upload files, and more.
Installation
pip install matimo matimo-slack
Available Tools (19 Total)
| Category | Tool | Description |
|---|---|---|
| Messaging | slack_send_channel_message |
Post message with markdown/blocks |
slack-send-message |
Post plain message to channel | |
slack_reply_to_message |
Reply in thread | |
slack_send_dm |
Send direct message | |
| Channels | slack-list-channels |
List all channels/DMs |
slack_create_channel |
Create public/private channel | |
slack_join_channel |
Add bot to channel | |
slack_set_channel_topic |
Update channel description/topic | |
| Files | slack_upload_file |
Upload file (modern API) |
slack_upload_file_v2 |
Get upload URL for large files | |
slack_complete_file_upload |
Complete upload and share to channel | |
| Reading | slack_get_channel_history |
Read messages from channel |
slack_get_thread_replies |
Get thread replies | |
slack_search_messages |
Search message history | |
| Reactions | slack_add_reaction |
Add emoji reaction to message |
slack_get_reactions |
Get reactions on a message | |
| Users | slack_get_user_info |
Get user profile details |
slack-get-user |
Alias of slack_get_user_info |
Quick Start
import asyncio
import os
from matimo import Matimo
from matimo_slack import get_tools_path
async def main():
matimo = await Matimo.init(get_tools_path())
# Send a message
await matimo.execute('slack_send_channel_message', {
'channel': '#general',
'text': 'Hello from Matimo!',
})
# List channels
result = await matimo.execute('slack-list-channels', {})
print(result)
asyncio.run(main())
Authentication
All tools authenticate using a Slack Bot Token:
export SLACK_BOT_TOKEN="xoxb-your-bot-token"
Setting Up a Slack App
- Go to api.slack.com/apps → Create New App → From scratch
- Navigate to OAuth & Permissions and add scopes (see table below)
- Click Install to Workspace and copy the Bot User OAuth Token
- Set
SLACK_BOT_TOKENin your environment
Required OAuth Scopes
| Tool | Slack API Method | Required Scopes |
|---|---|---|
slack_send_channel_message / slack-send-message |
chat.postMessage |
chat:write |
slack_reply_to_message |
chat.postMessage |
chat:write |
slack_send_dm |
conversations.open + chat.postMessage |
im:write, chat:write |
slack-list-channels |
conversations.list |
channels:read, groups:read, im:read, mpim:read |
slack_create_channel |
conversations.create |
channels:manage |
slack_join_channel |
conversations.join |
channels:join |
slack_set_channel_topic |
conversations.setTopic |
channels:write.topic |
slack_upload_file / slack_upload_file_v2 |
files.getUploadURLExternal |
files:write |
slack_complete_file_upload |
files.completeUploadExternal |
files:write |
slack_get_channel_history |
conversations.history |
channels:history |
slack_get_thread_replies |
conversations.replies |
channels:history |
slack_search_messages |
search.messages |
search:read |
slack_add_reaction |
reactions.add |
reactions:write |
slack_get_reactions |
reactions.get |
reactions:read |
slack_get_user_info / slack-get-user |
users.info |
users:read |
LangChain Agent Example
from matimo import Matimo
from matimo_slack import get_tools_path
from matimo.integrations.langchain import convert_tools_to_langchain
from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate
matimo = await Matimo.init(get_tools_path())
lc_tools = convert_tools_to_langchain(
matimo.list_tools(),
matimo,
credentials={'SLACK_BOT_TOKEN': os.environ['SLACK_BOT_TOKEN']},
)
llm = ChatOpenAI(model='gpt-4o-mini')
prompt = ChatPromptTemplate.from_messages([
('system', 'You are a Slack assistant.'),
('human', '{input}'),
('placeholder', '{agent_scratchpad}'),
])
agent = create_tool_calling_agent(llm, lc_tools, prompt)
executor = AgentExecutor(agent=agent, tools=lc_tools)
result = await executor.ainvoke({'input': 'List all public channels'})
Usage Notes
- The bot must be a member of a channel before it can post messages or read history
- Use
slack_upload_file(not the deprecatedfiles.upload) for file uploads slack_search_messagesrequires thesearch:readscope which needs special approval from Slack- Rate limits apply — add delays between rapid API calls in bulk operations
Documentation
Links
- PyPI: https://pypi.org/project/matimo-slack/
- GitHub: https://github.com/tallclub/matimo
- Slack API Docs: https://api.slack.com/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
matimo_slack-0.1.0.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matimo_slack-0.1.0.tar.gz.
File metadata
- Download URL: matimo_slack-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e45ec100bb0d1022815a470edf2c29838ddaa57ddc2da102ef6d8592f8c1fae
|
|
| MD5 |
abb96fb64d1190274078dab1bd0a7209
|
|
| BLAKE2b-256 |
b4f2f6726f18277512f5bc96062e5e6adb2fa0f288581ed5d4fc78299eab286d
|
File details
Details for the file matimo_slack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: matimo_slack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa57c914503915f604f5354182f7b78c286d00fba4409260543378178e7be9f
|
|
| MD5 |
ec418b1ca260ad4e943b0d61dfd3b350
|
|
| BLAKE2b-256 |
9901f2928e05b23338d024a8436210a691b0e557987837ee3529fd89dbc3be22
|