Slack (Preview) 🚧
Build intelligent Slack apps with AI
Preview Feature
This feature is currently under active development. The documentation below represents our planned implementation and may change before release. Send feedback to support@usehydra.ai.
Why Hydra AI for Slack? ⚡
Hydra AI takes the complexity out of creating intelligent Slack workflows. By registering components once, Hydra handles:
- Dynamic Selection: Automatically matches user queries with the best component.
- Contextual Adaptation: Hydrates components with the most relevant data.
Whether you're building workflows, modals, or interactive home tabs, Hydra AI simplifies the process.
Getting Started
1. Install Required Dependencies
2. Initialize HydraClient
Create an instance of HydraClient in your application:
3. Define and Register Components
Define Slack components using your preferred templating approach. We recommend jsx-slack
for its familiar JSX syntax and type safety, but you can use any templating library or write raw Block Kit JSON as long as it compiles to valid Slack Block Kit format.
Example: Welcome Message
4. Generate Components
Let HydraClient dynamically generate components based on user queries.
Example: Generate a Component for a User Query
5. Send Generated Blocks to Slack
Use the Slack API to send the generated blocks.
Example: Send a Slack Message
Advanced Features
Context Tools for Dynamic Data
Add external data-fetching capabilities to your components with contextTools
.
Example: Fetching a Dynamic User List
Differentiating Slack Workflows
HydraClient supports different types of Slack interactions:
- Messages: Generate blocks for chat messages.
- Modals: Create interactive forms and workflows.
- Home Tabs: Build personalized user dashboards.
Example: Create a Modal
Example: Open the Modal
Future Roadmap
We're constantly improving HydraClient! Here's what's coming:
Feature | Description | Status |
---|---|---|
Slack Component Library | Prebuilt components for common workflows like approvals and notifications. | Coming Soon |
Interactive Components | Native handling of Slack interactive elements (e.g., buttons, dropdowns). | Coming Soon |
Native Slack Integration | Directly send Slack messages and modals without external APIs. | Coming Soon |
Debug Mode | Visualize and log generated Slack JSON payloads. | Coming Soon |
Validation | Verify compatibility of generated components with Slack Block Kit before sending. | Coming Soon |
Multi-Platform Support | Extend support to other platforms like Microsoft Teams and Discord. | Coming Soon |
Error Handling | Comprehensive error handling with detailed logs and recovery strategies. | Coming Soon |
Error Reporting | Automated error reporting and monitoring capabilities. | Coming Soon |
Fallback Mechanisms | Graceful degradation and fallback options when components fail. | Coming Soon |
FAQ
How does HydraClient decide which component to use?
HydraClient uses the user query, context, and registered components to dynamically choose the best match. If no match is found, a default markdown text block is used.
Can I handle Slack interactive events with HydraClient?
Currently, you need to pass Slack events back to HydraClient as context. Native event handling is planned for future releases.
Is caching supported for generated components?
Not yet. HydraClient generates a new component for every request. Caching is a planned feature.
Feedback on our documentation:
This is being built right now so let us know if you want us to change or improve our implementation.