Bogdan Serban

01/10/2023, 12:03 PM
Hello Everyone! Thanks for this awesome repo! I am using
Prefect 2.7.0
and am trying to set up some hooks to do some stuff (db updates and sending queue messages) whenever the state of a flow changes. I have tried using prefect-alert, but unfortunately that does not trigger when I am running the flow from a deployment. I am thinking that I could try and create a custom notification block, but it is not very clear if it is possible and how I could do so. I would really appreciate any suggestions on that, or, any pointers to other mechanisms to define custom flow state update callbacks that I might have missed.

Jeff Hale

01/10/2023, 12:56 PM
Hi Bogdan. Check out automations in Prefect Cloud.

Bogdan Serban

01/10/2023, 2:25 PM
thanks for the info, but I am more interested in the options I have when I am running the prefect server myself. Will the automations be available for that scenario as well? Also, I need to execute some code when the state of the flow changes, so I need to be able to define these programatically in a way or another.