João Vitor Bezerra
03/09/2024, 2:02 AMNate
03/09/2024, 4:11 AMPOST /create_flow_run_from_deployment
from within an azure function that you have setup to trigger when a file lands (im more familiar personally with SNS -> lambda personally, but should be roughly the same idea in azure)
but stay tuned for an update in the relatively near future that will make this easierJoão Vitor Bezerra
03/09/2024, 4:29 AMPOST /create_flow_run_from_deployment
My objective is to trigger a simple flow by an http request from an external service
Many thanks once again!João Vitor Bezerra
03/09/2024, 4:34 AMNate
03/09/2024, 4:55 PM/create_flow_run_from_deployment
with some http client like curl / requests / httpx
in your case you should be able to build your parameters
/ call your existing deployments from within the azure function based on the features of the event you get from azure's Bus Service
, and see your flow runs in the UI after
(Events and Automations are currently cloud-only services - but in case it's ever useful)
in cloud, when you curl a prefect webhook you're creating an Event
that an Automation
can listen for, observe, and/or take action
in response to (if a trigger
is activated)
you could create a webhook with a jinja template to render the JSON your flow run needs for its parameters
then point anything at that (e.g. GitHub API can send you github repo events)
a trigger
defines when to execute the action
in terms of:
• which types of Event
you to expect
to see with certain features (e.g. my.webhook.called
with some label)
• how many instances of those events we should see before doing something (threshold
)
an action
is what do actually do when a trigger
is activated / executed:
• Run a Deployment
is a common action
so ultimately in cloud we also POST
json serializable parameters
to /create_flow_run_from_deployment
but via the Events
system insteadJoão Vitor Bezerra
03/09/2024, 4:56 PM