From bd133a7578c1bb86b35435cd4001e50681418f29 Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Thu, 17 Apr 2025 15:42:35 -0700 Subject: [PATCH] stub out readme --- servers/slack/README.md | 78 ++++++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 13 deletions(-) diff --git a/servers/slack/README.md b/servers/slack/README.md index 66f8523..9e836bd 100644 --- a/servers/slack/README.md +++ b/servers/slack/README.md @@ -1,23 +1,28 @@ -# โ›… Weather Tool Server +# ๐Ÿ’ฌ Slack Tool Server -A sleek and simple FastAPI-based server to provide weather data using OpenAPI standards. +A powerful FastAPI-based server providing Slack workspace interactions using OpenAPI standards. ๐Ÿ“ฆ Built with: -โšก๏ธ FastAPI โ€ข ๐Ÿ“œ OpenAPI โ€ข ๐Ÿงฐ Python +โšก๏ธ FastAPI โ€ข ๐Ÿ“œ OpenAPI โ€ข ๐Ÿ Python โ€ข ๐Ÿ’ฌ Slack API --- ## ๐Ÿš€ Quickstart -Clone the repo and get started in seconds: +Clone the repo and get started: ```bash git clone https://github.com/open-webui/openapi-servers -cd openapi-servers/servers/weather +cd openapi-servers/servers/slack # Install dependencies pip install -r requirements.txt +# Set up environment variables +export SLACK_BOT_TOKEN="xoxb-your-bot-token" +export SLACK_TEAM_ID="your-team-id" +export SLACK_CHANNEL_IDS="comma,separated,channel,ids" # Optional: restrict to specific channels + # Run the server uvicorn main:app --host 0.0.0.0 --reload ``` @@ -26,29 +31,76 @@ uvicorn main:app --host 0.0.0.0 --reload ## ๐Ÿ” About -This server is part of the OpenAPI Tools Collection. Use it to fetch real-time weather information, location-based forecasts, and more โ€” all wrapped in a developer-friendly OpenAPI interface. +This server is part of the OpenAPI Tools Collection. It provides a comprehensive interface to Slack workspace operations, including: -Compatible with any OpenAPI-supported ecosystem, including: +- ๐Ÿ“‹ List channels with message history +- ๐Ÿ“ค Post messages and replies +- ๐Ÿ‘ฅ User information and profiles +- ๐Ÿ‘‹ Add reactions to messages +- ๐Ÿ“œ View message threads and history -- ๐ŸŒ€ FastAPI -- ๐Ÿ“˜ Swagger UI -- ๐Ÿงช API testing tools +All functionality is wrapped in a developer-friendly OpenAPI interface, making it perfect for integration with AI agents, automation tools, or custom Slack applications. --- -## ๐Ÿšง Customization +## ๐Ÿ”‘ Prerequisites -Plug in your favorite weather provider API, tailor endpoints, or extend the OpenAPI spec. Ideal for integration into AI agents, automated dashboards, or personal assistants. +1. **Slack Bot Token**: Create a Slack App and get a Bot User OAuth Token + - Visit [Slack API Apps](https://api.slack.com/apps) + - Create a new app or select existing + - Add necessary bot scopes: + - `channels:history` + - `channels:read` + - `chat:write` + - `reactions:write` + - `users:read` + - `users:read.email` + - Install the app to your workspace + +2. **Team ID**: Your Slack workspace/team ID + - Found in workspace settings or URL + +3. **Channel IDs** (Optional): + - Restrict the server to specific channels + - Comma-separated list of channel IDs + +--- + +## ๐Ÿ› ๏ธ Available Tools + +The server provides the following Slack tools: + +- `slack_list_channels`: List channels with recent message history +- `slack_post_message`: Send messages to channels +- `slack_reply_to_thread`: Reply to message threads +- `slack_add_reaction`: Add emoji reactions to messages +- `slack_get_channel_history`: Get channel message history +- `slack_get_thread_replies`: Get replies in a thread +- `slack_get_users`: List workspace users +- `slack_get_user_profile`: Get detailed user profiles + +Each tool is available as a dedicated endpoint with full OpenAPI documentation. --- ## ๐ŸŒ API Documentation -Once running, explore auto-generated interactive docs: +Once running, explore the interactive API documentation: ๐Ÿ–ฅ๏ธ Swagger UI: http://localhost:8000/docs ๐Ÿ“„ OpenAPI JSON: http://localhost:8000/openapi.json +The documentation includes detailed schemas, example requests, and response formats for all available tools. + +--- + +## ๐Ÿ”’ Security Notes + +- Keep your `SLACK_BOT_TOKEN` secure +- Use environment variables for sensitive credentials +- Consider implementing additional authentication for the API server in production +- Review Slack's [security best practices](https://api.slack.com/authentication/best-practices) + --- Made with โค๏ธ by the Open WebUI community ๐ŸŒ