Hi, sorry for the newbie question regarding webhoo...
# ask-community
j
Hi, sorry for the newbie question regarding webhooks & not using prefect cloud. Currently I have infrastructure on Azure, and I want to use prefect to add observability to my azure functions. I want to trigger a prefect flow when some item is created on my datalake, and I was thinking on using webhooks to do so. Is there a way to use webhooks or a similar logic on a non-prefect-cloud instance of prefect? Am I missing something?
j
if you only want observability you could use the webhook from the azure function and simply decorate teh entry point with
@flow
decorator
in this case the flow would not have a deployment attached, it would only trigger when someone triggers the azure function
c
Hi @João Vitor Bezerra, as of today, webhooks are a Prefect Cloud-only feature, but they would be a pretty ideal solution to your use case here. If that's not an option for you, if you have a private VPC route from your Azure functions to your Prefect server, you could have your flows
POST
to a specific deployment to initiate a flow. The prefect client's
create_flow_run_from_deployment
method would handle that for you if you have the deployment ID available, your Azure functions can talk to your Prefect server privately, and you have them configured the Azure functions configured with the correct
PREFECT_API_URL