Prefect Automations are generally available! You can start observing any events in your data stack and react to them in real-time

Hi everyone!

Prefect Cloud Automations have been available in Beta in Prefect Cloud for a while now. Today, we are excited to announce the General Availability of Prefect Automations.

What are Automations?

Automations provide a flexible framework to define:

  • “if T happens, do A
  • “if T doesn’t happen at least n times within s number of seconds, do A

whereby T are Triggers, A are Actions, n is the number of received events, s is the number of seconds.

What’s included in this release?

:flags: For our flagship release, we’ve prioritized features to:

  • Configure Triggers based on:

    • Flow Run state changes,
    • Work Queue health,
    • or custom criteria via the API.
  • Execute Actions to:

    • run/cancel Flow Runs,
    • pause/resume schedules,
    • pause/resume Work Queues,
    • and send beefed-up context-aware notifications with support for Jinja templating.

:chart_with_upwards_trend: This feature set will be a springboard for a wealth of exciting enhancements to Prefect over the next year, so as always, let us know what you think.

Check the release blog post below for more information.

Happy Automating! :robot:

1 Like

Awesome! Was waiting for it to leave beta to start to use it.

Will there be a way to create automations with code?

I tried this today with an MS Teams webhook but it doesn’t work. The trigger fires, according to the logs, but no messages are received.

(Note that the webhook URL I am using in other automations outside prefect and it works as expected)

Clicking into the individual events returns a blank page

Running the notification on python returns an error 410

from prefect.blocks.notifications import MicrosoftTeamsWebhook
teams_webhook_block = MicrosoftTeamsWebhook.load("teams-notification")
teams_webhook_block.notify("Hello from Prefect!")

23:01:43.460 | WARNING | apprise - Failed to send MSTeams notification: error=410.

Hey @bobpeers - that 410 response code is suspicious, can you ensure the webhook hasn’t been deleted on the teams side?

Hi @Will_Raphaelson ,

I’m using the same webhook other places and they’ve been successful sending data all day so I’m 100% sure it’s not deleted.

Hmm, im at a bit of a loss here, i cant reproduce it on my side. Two other notes

  • Is it possible to try with a different, new teams webhook just to double check?
  • If this doesn’t work are you in the slack community, maybe we could get on a huddle and screen share to pair on it. Thanks!

I just created a new webhook and it seems to work fine. Strange that the existing one doesn’t work in Prefect but I can just use a new one instead.

Thanks for checking at your end and this is a great addition :muscle:

Are automations going to be available without Cloud / via Prefect Orion?