s

    Shrikkanth

    4 months ago
    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.
    Kevin Kho

    Kevin Kho

    3 months ago
    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

    3 months ago
    Oh okay, Thanks for the tip, I will look into it.