Question

How do I handle Asana task status and create paths based on status name?


Userlevel 1
Badge +1

Hi,

 

I might be missing something super easy but I’m currently stuck with this.

I have a Updated task in project in Asana as a trigger. What I want to do is that I want to check what is the name of the status and then proceed accordingly. I have a Paths setup that tries to read the status, setup is currently like this: 

Data output is this: 

If I have two statuses in Asana I face into a problem that both of the paths run since they both match the status name: 

And:

 

Does looping the data work in this situation or?


13 replies

Userlevel 7
Badge +14

Hi @Santeri 

Good question.

The value from Asana looks to be an array. (CP and CP Bangle)

 

The Filter condition is checking each array option.

That is why both Path Filters evaluated to TRUE.

Userlevel 1
Badge +1

Hi @Santeri 

Good question.

The value from Asana looks to be an array. (CP and CP Bangle)

 

The Filter condition is checking each array option.

That is why both Path Filters evaluated to TRUE.

So I should use filter instead?

Userlevel 7
Badge +14

@Santeri 

The first step in each Path is a Filter.

Userlevel 1
Badge +1

@Santeri

The first step in each Path is a Filter.

How can I filter an array so the Paths doesn’t return both of them as True?

Userlevel 7
Badge +14

@Santeri 

Zap Runs will proceed down all Paths where Filter conditions match.

 

In this example, what were you expecting to happen for the Zap Run results?

 

Userlevel 1
Badge +1

@Santeri

Zap Runs will proceed down all Paths where Filter conditions match.

 

In this example, what were you expecting to happen for the Zap Run results?

 

Status in Asana changed to CP Bangle. The thing is that since it had the CP status already it runs both the CP and CP Bangle paths. The next step is to add a line-item into quickbooks. Now it adds the CP into it first when I add it as a status, and now again when adding CP Bangle.

I think what I need is to loop those items and get the last item. The bad side is that my Asana trigger will trigger when any changes are made to a task. If it will do the loop for every trigger It will generate a lot of tasks for nothing which I don't like.

Userlevel 7
Badge +14

@Santeri 

Issue may be with how the Asana field is configured.

Looks like the Asana field that is being used can have multiple values (e.g. multi-select) instead of perhaps just a single value (single select dropdown).

 

Userlevel 1
Badge +1

@Santeri

Issue may be with how the Asana field is configured.

Looks like the Asana field that is being used can have multiple values (e.g. multi-select) instead of perhaps just a single value (single select dropdown).

 

It needs to be multi-select. In production, there will be over 100 different fields.

Userlevel 7
Badge +14

@Santeri 

With multiselect fields, there’s a chance the most recent option added may not be the last option returned in the DATA OUT from a Zap step.

e.g. If CP, then selected CP Bangle, there’s a chance the data out could be “CP Bangle, CP”.

So if you were trying to get the “last” option, the Zap logic may not behave as expected.

Userlevel 1
Badge +1

@Santeri

With multiselect fields, there’s a chance the most recent option added may not be the last option returned in the DATA OUT from a Zap step.

e.g. If CP, then selected CP Bangle, there’s a chance the data out could be “CP Bangle, CP”.

So if you were trying to get the “last” option, the Zap logic may not behave as expected.

Do you have something in mind that would make this work?

Userlevel 7
Badge +14

@Santeri 

We’d need a better understanding of the Asana field that is being used. (screenshots from Asana)

If the Asana field can have multiple values, then you may need to use Asana Rules to help properly trigger the Zap.

 

https://asana.com/guide/help/premium/rules#gl-create-rule

There are two ways to create a rule for your project, selecting one from the rules gallery in your project or creating your own custom rule. The custom rule builder is available for all Asana Business and Enterprise customers.

Userlevel 1
Badge +1

@Santeri

We’d need a better understanding of the Asana field that is being used. (screenshots from Asana)

If the Asana field can have multiple values, then you may need to use Asana Rules to help properly trigger the Zap.

 

https://asana.com/guide/help/premium/rules#gl-create-rule

There are two ways to create a rule for your project, selecting one from the rules gallery in your project or creating your own custom rule. The custom rule builder is available for all Asana Business and Enterprise customers.

There really isn’t any rules in Asana that helps me to achieve this.

Userlevel 7
Badge +11

Hi@Santeri! 👋

Hope you don’t mind me jumping in here to see if I can help. I’m not sure if Asana reorders the selected options for that multi-select field or if it just adds the latest option that is selected to the end of the list. 

If it just adds it to the end then you could use a Formatter action to select the last item from an array of line items. You’d need to use a Formatter (Utilities > Pick from list) action and set the Operation to be Choose Last. For example:
 a43543cb3aca5647352081d5208809fa.png

For the above example, the value of “Second Item” would be output by the Formatter action. Then you’d update the relevant paths or filters in the Zap to check the Output field from the Formatter action.

If it doesn’t add the latest selected option to the end of the list, then I wonder if you could try using tags instead?

For example, if you were to assign the option by tagging the task with a certain tag, then you could use the Tag Added to Task (Asana) trigger. That trigger would check for a specific tag though, which would mean that you’d need to create Zaps for each tag you wanted to check for. But once you’ve set up one Zap, you could use the Duplicate option to copy it and pick a different tag for the copied Zap. So at least you wouldn’t need to make each from scratch. Plus, you could likely then get rid of the paths so you may end up saving some tasks with this route.

Do you think either of those approaches could work?

Reply