https://prefect.io logo
Title
s

Samuel Hinton

03/05/2023, 11:21 PM
Hi team! Is there currently a way to create notifications programatically? Either using cli, or the python interface? We’re trying to have everything as infrastructure-as-code as much as possible.
l

Lee Mendelowitz

03/05/2023, 11:24 PM
What kind of notifications? You can use
prefect-slack
to send Slack notifications from flows: https://prefecthq.github.io/prefect-slack/
s

Samuel Hinton

03/05/2023, 11:25 PM
Yeah just prefect slack notifications. Interesting, I didnt realise there was a separate repo to set up the blocks, Ive just been reading over https://docs.prefect.io/ui/notifications/, I’ll check this out, thanks!
Hmm looks very useful on a flow by flow basis, but not as a replacement for a generic notification setup like you can do in the Prefect2 notifications tab
l

Lee Mendelowitz

03/05/2023, 11:28 PM
Ah I see. The Prefect REST API may enable you to create and manage these notifications. It looks like it can’t be done from the CLI. https://app.prefect.cloud/api/docs
s

Samuel Hinton

03/05/2023, 11:29 PM
Ill see if I can find something in there, cheers