cancel
Showing results for 
Search instead for 
Did you mean: 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results for 
Search instead for 
Did you mean: 
AD_Ambarish
Databricks Employee
Databricks Employee

ChatGPT Image Jun 2, 2025, 02_40_00 PM.png

In today’s fast-paced work environments, Slack has become the go-to for team communication. But what if you could go beyond chatting with colleagues—and start chatting with your data directly from Slack?

Thanks to the integration between Slack and Databricks AIBI Genie, that’s now possible. Imagine asking a question like “What were our top 5 products last quarter?” and getting not just an answer, but a clear explanation of how that answer was derived—right within Slack.

🤖 How It Works

When you send a message to the Slack bot, it routes your question to an AIBI Genie space. Genie uses your organization’s business context to convert your natural language query into a meaningful SQL query, runs it, and then responds with:

  • 📊 The answer to your question

  • 🧠 The thought process behind the answer

  • 🔍 Additional insights you might find useful

It’s like having a data analyst on-call inside your chat window.

🔧 Architecture Overview

This integration leverages several AWS services to make the magic happen:

Slack with Genie (1).png

  • API Gateway: Acts as the interface between Slack and AWS Lambda.

  • Lambda: Handles incoming Slack messages, forwards them to Genie, processes the response, and posts back to Slack.

  • DynamoDB: Tracks conversations and user context to ensure reliable, contextual responses.

🛠️ Setup Steps

Here’s a high-level walkthrough of how to build this integration:

  1. Set up AIBI Genie in Databricks
    Prepare your Genie Space using your datasets. Follow https://docs.databricks.com/aws/en/genie/set-up  guide for setup instructions.

  2. Configure the Slack Bot in your Workspace
    Build a Slack app that listens for messages and sends them to AWS Lambda. See Slack + API Gateway integration guide https://api.slack.com/quickstart.

  3. Create an API Gateway with Lambda Integration
    Set up a REST API in AWS with a Lambda proxy backend. Follow https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-... tutorial.

  4. Develop the Lambda Function
    The Lambda function receives Slack messages, communicates with Genie’s Conversational API, parses responses, and sends them back to Slack. Explore Genie Conversational APIs at https://docs.databricks.com/aws/en/genie/conversation-api.

  5. Use DynamoDB for State Management
    Store message IDs and user tokens to manage context and prevent duplicates.

🎥 In Action

Check out a demo

Screenshot 2025-06-02 at 3.15.43 PM.png

Screenshot 2025-06-02 at 3.15.24 PM.png

📘 What’s Next?

This is Part I of our blog series on integrating Slack with Databricks AIBI Genie. In the next post, we’ll dive deeper into code snippets, error handling, and performance considerations.

Stay tuned—and start chatting with your data today!

3 Comments