Florent VanDeMoortele
07/15/2024, 2:55 PMMarvin
07/15/2024, 2:56 PM{
"event": "model-update",
"resource": {
"prefect.resource.id": "product.models.{{ body.model_id }}",
"prefect.resource.name": "{{ body.friendly_name }}",
"run_count": "{{body.run_count}}"
}
}
You can trigger this webhook using a curl
command:
curl -X POST <https://api.prefect.cloud/hooks/34iV2SFke3mVa6y5Y-YUoA> -d "model_id=adhoc" -d "run_count=10" -d "friendly_name=test-user-input"
2. Configure Automations: You can then use the Prefect UI or YAML configuration to create an automation that reacts to these webhook events. Here's a simple YAML trigger configuration:
yaml
triggers:
- event: "model-update"
action: "run_deployment"
deployment_id: "your_deployment_id"
parameters:
run_count: "{{ body.run_count }}"
model_id: "{{ body.model_id }}"
This configuration ensures that when the webhook event model-update
is received, it will trigger the specified deployment with the provided parameters.
You can find more details and examples in the Prefect documentation:
Prefect Automations Guide
For additional support or specific issues, you can also review relevant GitHub issues like passing results of a completed Flow Run to a Deployment Run:
GitHub Issue #11718
Let me know if you need further assistance!