https://prefect.io logo
Title
c

Choenden Kyirong

05/18/2023, 8:41 PM
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

Deceivious

05/19/2023, 8:23 AM
With custom codes?
j

Jake Kaplan

05/19/2023, 12:32 PM
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

Choenden Kyirong

05/19/2023, 2:46 PM
Hey @Jake Kaplan , I’m not using prefect cloud- but thank you!
@Deceivious what do you mean?
d

Deceivious

05/19/2023, 2:47 PM
It's ok you can ignore me if you are using prefect cloud. :face_with_peeking_eye:
You can setup hooks on task states
c

Choenden Kyirong

05/19/2023, 2:47 PM
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

Deceivious

05/19/2023, 2:48 PM
Task definition has parameters where u can specify list of functions to trigger when state changes to completed crash or failed
🙌 1
c

Choenden Kyirong

05/19/2023, 2:49 PM
Ohh….now that’s interesting and sounds perfect for this use case! @Deceivious
d

Deceivious

05/19/2023, 2:49 PM
😒aluting_face:
c

Choenden Kyirong

05/19/2023, 2:49 PM
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

Deceivious

05/19/2023, 3:37 PM
yes
👍 1