Ridhwan
12/01/2025, 4:59 PMMarvin
12/01/2025, 4:59 PMMarvin
12/01/2025, 5:04 PM{
"type": "event",
"posture": "Reactive",
"expect": [
"prefect.flow-run.Completed"
],
"match_related": {
"prefect.resource.id": [
"prefect.deployment.82bbcf62-4822-4403-9cd8-1daa8c1e31e5"
]
},
"threshold": 1,
"within": 60,
"actions": [
{
"type": "run-deployment",
"source": "selected",
"deployment_id": "UUID-OF-DEPLOYMENT-B"
}
]
}
What to change from your JSON:
- Remove the match block that points to the deployment. The main event resource is the flow run, so matching a deployment there will prevent the trigger from firing. Keep the deployment filter under match_related, as shown above.
- Add the actions array to actually run Deployment B.
Optional tweaks:
- If you prefer to match by name, you can use:
"match_related": { "prefect.resource.name": ["Deployment A"] }
- Set within to 0 for immediate reaction; 60 just means “1 completion within 60s”.
Docs for reference:
- Chaining deployments with events
- Automations concepts
- Events overview
Want to pass values from A to B (e.g., flow run name) as parameters? I can show a small example using templated parameters in the action.