happybara-io / WorkflowBuddy

The missing pieces of Slack Workflow Builder.
GNU Affero General Public License v3.0
27 stars 4 forks source link

General: Notify on failure #34

Open I-Dont-Remember opened 1 year ago

I-Dont-Remember commented 1 year ago

Currently Workflows fail silently, with information about the error appearing in the Analytics tab. Slack will hopefully come out with native reporting, but how might Workflow Buddy improve the situation in the meantime?

It would be quite easy to wrap any calls to fail() with a attempt_notify_then_fail() function, but the open question is - who do we notify?

During execution, the workflow_step_execute event doesn't have an obvious default conversation to notify. Nothing the Bolt request context args seems viable either. Wish this could work out of the box, but I guess we'll need to look at other options.

Potential approaches:

jphorn commented 1 year ago

Is notifying via Slackbot programmatically possible?

I-Dont-Remember commented 1 year ago
  1. Which person should receive the Slackbot message though?
    • Ideally it would go to the person who created the Workflow, but as far as I can find, we don't have access to that information from within the execution of a step, or from the Slack Web API.
  2. To my knowledge, you can only message from your app, whereas Slackbot is reserved for messages directly from Slack.
jphorn commented 1 year ago
  1. I would say both -- the initiator to alert them somethings off and the responsible person is going to have a look asap. And the workflow admin to alert them with all the debugging info. But apparently that info is not available :-(

My Slack API knowledge unfortunately is quite limited. Any possibilities via Workflow Buddy's own BuddyBot as sender?

I-Dont-Remember commented 1 year ago

Workflow Buddy is able to send a message, so long as it has a destination.

Thinking through potential MVP (definitely not perfect, but hopefully is better than nothing):

For now, we're a bit dead in the water, but I'll keep this stewing in the back of my mind.