Jean Paul Azzopardi
06/06/2024, 12:58 PMprefect.flow-run.Completed
in 30 hours).
I'm trying to set up an action so that it sends a slack notification with the triggered deployment name, but the properties i define in the message body using jinja don't return anything. Any idea how to fix this?Jean Paul Azzopardi
06/06/2024, 12:58 PM{
"type": "compound",
"triggers": [
{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {
"prefect.resource.id": [
"prefect.tag.fifteen-minutes"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 10
},
{
"type": "event",
"match": {},
"match_related": {
"prefect.resource.id": [
"prefect.tag.daily"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 108000
},
{
"type": "event",
"match": {},
"match_related": {
"prefect.resource.id": [
"prefect.tag.hourly"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 10800
},
{
"type": "event",
"match": {},
"match_related": {
"prefect.resource.id": [
"prefect.tag.six-hours"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 32400
},
{
"type": "event",
"match": {},
"match_related": {
"prefect.resource.id": [
"prefect.tag.minute"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 600
},
{
"type": "event",
"match": {},
"match_related": {
"prefect.resource.id": [
"prefect.tag.weekly"
],
"prefect.resource.role": "tag"
},
"after": [
"prefect.flow-run.Running"
],
"expect": [
"prefect.flow-run.Completed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 756000
}
],
"require": "any",
"within": 0
}
Nate
06/07/2024, 5:22 PMparameters
from the triggering event
{
"name": "My Automation Name",
"trigger": { ... that whole compound trigger ... },
"actions": [
{
"type": "run-deployment",
"source": "selected",
"deployment_id": "...the uuid of the deployment..."
"parameters": {"some_kwarg": "{{ event.resource.id }}"} # other labels here under resource
}
]
}
Nate
06/07/2024, 8:42 PMNate
06/07/2024, 8:45 PMwithin: null
(or omit that key) for the outermost (compound) trigger since I'm not sure what within: 0
would actually meanJean Paul Azzopardi
06/11/2024, 9:54 AMNate
06/11/2024, 2:01 PMui
?