Automated and scheduled Slack alerts.
Important: Handle Slack tokens with care. More on how to securely store and use secrets.
Slack is a great channel to share reports and alerts. With Python and AI, creating a Slackbot catered to your specific needs has never been easier.
Here are some examples of alerts and reports you may want to create:
Your options are limitless and fully customizable to your needs.
To create these alerts and scheduled Slack reports, we’re going to create a custom Slack app. Start by navigating to the Slack app API page and click Create New App.
Follow these steps:
Once your app is create, on the left hand side, select OAuth & Permissions, then follow these steps:
chat:write.public
scope. This scope allows the app to write to publich channels they’re not a part of. If you need to add the app to private channels or chats, you will need to select additional scopes.xoxb-
. If it doesn’t, you may not have generated a bot tokenNow that you have your Slack bot token, we can configure the message you want to send to Slack.
Start by querying your data and storing the data you want to share as a Python DataFrame string or image. Then follow these steps:
{{your_dataframe}}
Here’s an example message using two DataFrames and an image:
Once you’ve created your Slack cell with the message you want to send and verified that it works, you can now schedule your app to run at whatever cadence you would like.
Scheduling your bot to run is the same as scheduling a report. Check out our page on scheduling to learn more.
Automated and scheduled Slack alerts.
Important: Handle Slack tokens with care. More on how to securely store and use secrets.
Slack is a great channel to share reports and alerts. With Python and AI, creating a Slackbot catered to your specific needs has never been easier.
Here are some examples of alerts and reports you may want to create:
Your options are limitless and fully customizable to your needs.
To create these alerts and scheduled Slack reports, we’re going to create a custom Slack app. Start by navigating to the Slack app API page and click Create New App.
Follow these steps:
Once your app is create, on the left hand side, select OAuth & Permissions, then follow these steps:
chat:write.public
scope. This scope allows the app to write to publich channels they’re not a part of. If you need to add the app to private channels or chats, you will need to select additional scopes.xoxb-
. If it doesn’t, you may not have generated a bot tokenNow that you have your Slack bot token, we can configure the message you want to send to Slack.
Start by querying your data and storing the data you want to share as a Python DataFrame string or image. Then follow these steps:
{{your_dataframe}}
Here’s an example message using two DataFrames and an image:
Once you’ve created your Slack cell with the message you want to send and verified that it works, you can now schedule your app to run at whatever cadence you would like.
Scheduling your bot to run is the same as scheduling a report. Check out our page on scheduling to learn more.