https://prefect.io logo
Title
j

Jaime Raldua Veuthey

04/20/2023, 9:12 AM
Hi, what is the easiest way to start a lambda function when a flow-run reaches a Completed state? I tried with Automations but it is not automatically built in. Optimally there would be a way to run a small python script after a flow run reaches a specific state. If that is possible, even with a workaround, it would be great
1
r

redsquare

04/20/2023, 9:19 AM
Cn you not use a custom trigger to spawn a notification using a webhook block
j

Jaime Raldua Veuthey

04/20/2023, 9:23 AM
@redsquare you mean with an Automation? I do not really need a custom trigger since "Flow run State" is already a Trigger. What I need a script to be run instead of a notification being sent. Or maybe I understood you wrong?
r

redsquare

04/20/2023, 9:25 AM
yeah you use the completed flow run state to send a webhook 'notification'
:thank-you: 1
that can hit a lambda
j

Jaime Raldua Veuthey

04/20/2023, 9:33 AM
Oh I see. I did not know there was a webhook Block. That should work thanks!
:thumbsup_all: 1
I will add the lambda use case thanks