08 Jul 2026 06:09 AM
Hi,
I would like creating a workflow to be triggered when the events that have been marked as ‘closed’ and have a specific tag. And in the first step following the trigger, set a condition so that the step is skipped if the trigger’s result is 0
For that, I've defined this event trigger:
And in the first step after event trigger, this:
I know this condition "{{ result("Event trigger") | length > 0}}" is not correct because the previous tasks is a trigger.
Does any know what would be the right condition?
Thanks in advance.
Regards,
Elena.
Solved! Go to Solution.
08 Jul 2026 08:13 AM - edited 08 Jul 2026 08:18 AM
I'm a bit confused. The event trigger should always produce a result; otherwise, the workflow wouldn't be triggered in the first place.
08 Jul 2026 08:21 AM
Hi Dylan,
As you can see, now, at the time I execute the querry, it returns 0.
I would like the event triggers when the result of the condition is > 0 or in the next steps, the steps was skipped if the result of the condition is 0.
Is it possible to do this?
Thanks,
Elena.
08 Jul 2026 08:27 AM
Okay, I think there's a misunderstanding here.
Query past events does not run or trigger your workflow. It's only used to verify that your event filter is working as expected.
In your case, there wasn't a single event in the past 7 days that matched your filter conditions.
So, let's say you created this workflow a week ago. It would never have started because no event matching your filter conditions would have occurred to trigger it. No need for {{ result("Event trigger") | length > 0}} as you would never even start your workflow.
08 Jul 2026 09:15 AM
Hi Dylan,
You are right. Putting the condition for which I want the workflow triggers it's enough. Now it's working as it's expected.
Thanks a lots for your help and also for your answer in this other post because it's helped me to complete the condition.
Regards,
Elena.
17 Jul 2026 08:33 AM
Hi erh_inetum!
What kind of events do you want your workflow to trigger on? For problem records, we have a dedicated problem trigger where you can configure it to only fire for the "closed" state, which might be a cleaner fit for your use case.
Curious to hear more about what you're trying to achieve!
You can find more on alerting and notifications in the documentation here: https://docs.dynatrace.com/docs/analyze-explore-automate/alerting-and-notifications.
Sonja
28 Jul 2026 10:05 AM
Hi Sonja,
We want to trigger an event when a problem is transitioning to closed. With the solution proposed for Dylan ( @dylan_taelemans ) we got it.
Let me know if it's clear or you need any additional explanation.
Thanks a lot for your interest.
Regards,
Elena.
29 Jul 2026 12:32 PM
Good to hear it's working now! If you ever want to simplify the logic, you can use the new "trigger only on close" option we just added to the problem trigger.
Sonja
Featured Posts