Welcome to the Slack Thread Summarizer App template! This template is designed to help you create an application that listens for mentions in a Slack thread and provides a concise summary of the conversation. It's perfect for keeping up with important discussions without having to read through every message. Let's walk through the steps to get your app up and running on the Lazy platform.
To begin using this template, simply click on the "Start with this Template" button in the Lazy Builder interface. This will pre-populate the code in the Lazy Builder, so you won't need to copy, paste, or delete any code manually.
Before testing your app, you'll need to set up some environment secrets. These are not the same as environment variables in your operating system; they are specific to the Lazy platform and can be set in the Environment Secrets tab within the Lazy Builder.
You will need to provide the following environment secrets:
Make sure to keep these tokens secure and do not share them publicly.
Once you have set up the necessary environment secrets, you can test your app by pressing the "Test" button in the Lazy Builder. This will deploy your app and launch the Lazy CLI. There is no need for user input at this stage, as the app will operate based on events within Slack.
After deploying your app, it will listen for mentions in Slack threads. When your bot is mentioned, it will fetch the thread's messages, filter out those from bots or containing mentions of the bot, and then summarize the conversation. The summary will be posted back into the same thread.
To integrate this app with your Slack workspace, you need to have a Slack bot set up with the appropriate permissions. Ensure your bot has permissions to read messages and post in threads where it is mentioned. You may need to invite the bot to the channels where you want it to operate.
If you need to reference the Slack API documentation for further details on permissions and bot setup, you can find it at Slack API Documentation.
That's it! You now have a Slack Thread Summarizer App ready to help you stay on top of important conversations in your Slack workspace. Enjoy the convenience of automated summaries and never miss out on key takeaways from your team's discussions.
This app allows users to interact with a Slack bot, ask a question about the data in a table or request the table schema, and then uses the latest ChatGPT to generate a query that is executed on BigQuery to return the results. The app includes a retry mechanism for query generation in case of an error (up to two retries) and provides the LLM with the table info to generate more accurate queries. The table schema is only printed if it is successfully retrieved. All errors from retries are now passed to the LLM. The generated query is printed before the results, and the results are displayed in a pretty table format. The bot uses the Slack API to send and receive messages and parses the user's message to determine the action to take. The bot always responds in a thread to the original message.