Automations
All questions related to Workflow Automation, AutomationEngine, and EdgeConnect, as well as integrations with various tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting a condition that skip a step if the trigger returns 0

erh_inetum
Champion

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:

erh_inetum_0-1783487040794.png

And in the first step after event trigger, this:

erh_inetum_1-1783487135397.png

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.

4 REPLIES 4

I'm a bit confused. The event trigger should always produce a result; otherwise, the workflow wouldn't be triggered in the first place. 

Hi Dylan,

As you can see, now, at the time I execute the querry, it returns 0.

erh_inetum_0-1783495087876.png

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.

 

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.

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.

Featured Posts