https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Shrikkanth

05/26/2022, 9:04 AM
Hi guys, I'm fairly new to Prefect and I'm trying to send reports of the state of the flow to slack. The below is my code and when I run it from Prefect cloud, I get the message in slack about the status but not able to get the error message in the message section. I need to know the function or where to call for editing the message section. The
<http://logger.info|logger.info>(lines)
contains the error message. Any suggestions will be helpful, thanks.
k

Kevin Kho

05/26/2022, 2:12 PM
Hey @Shrikkanth, the
slack_notifier
doesn’t allow for customization. For a custom message, you need to use the
SlackTask
. You can make a state handler for the like this . Also, could you move the code to the thread to keep the main channel cleaner?
s

Shrikkanth

05/27/2022, 1:58 AM
Oh okay, Thanks for the tip, I will look into it.
3 Views