hey folks! I currently have the slack webhooks in...
# ask-community
c
hey folks! I currently have the slack webhooks integrated which is great for notifying statuses about flow runs/states. I’m wondering if there is a way to send a request elsewhere when the flow is running/stopped/completed…etc? For example, is it possible to ping a server that the flow has completed?
1
d
With custom codes?
j
Hey, if you're using prefect cloud you can setup an Automation to do just that. You'd want to trigger on Flow Run state and select Call Webhook as your action
c
Hey @Jake Kaplan , I’m not using prefect cloud- but thank you!
@Deceivious what do you mean?
d
It's ok you can ignore me if you are using prefect cloud. 🫣
You can setup hooks on task states
c
I would pretty much like to send the data that slack gets from prefect but elsewhere. Is that a possibility? (Not using prefect cloud)
d
Task definition has parameters where u can specify list of functions to trigger when state changes to completed crash or failed
🙌 1
c
Ohh….now that’s interesting and sounds perfect for this use case! @Deceivious
d
🫡
c
I will look into that right away. Thanks!!
@Deceivious are you referring to
on_failure
,
on_completion
,
on_crashed
- that can be used in either the task or flow decorators ?
d
yes
👍 1