Skip to main content

Hello.

I’m experiencing the same issue as this topic: 

But the go around is a little over my head.  Using the same Typeform triggers, I have removed the default Find User step and added a step for Code (Run Javascript -> in Input Data, I entered “EMAIL” with the dynamic insert data from the Typeform, and the API_KEY works fine, too -> I copied and pasted the Code from the original post).

let API_KEY = inputData.API_KEY;
let EMAIL = inputData.EMAIL;

let response = await fetch(`https://app.asana.com/api/1.0/users/${EMAIL}`, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Accept': 'application/json'
}
});

let result = "";
let match = "";
if (!response.ok) {
result = "ERROR: NOT FOUND";
match = false;
}
if (response.ok) {
result = await response.json();
match = true;
}

output = {EMAIL, API_KEY, match, result}];

I added the Filter step -> I put Continue if Match contains “false” OR Continue if Match contains “true”. 

From here, I’m a little lost.

Is there a way to have the single Zap filter for both responses?  Or do I have to make two separate Zaps for one where it succeeds and returns the user ID and another where fails and therefore doesn’t return the user ID?

I’m a novice in many ways and I feel like I’m close, but not quite there.  Please help. Be gentle.

Hello there @Crossing Church, welcome to the Community! 👋

You’re super close on this! It’s not possible to run two different actions when using a filter. The way to handle both outcomes (e.g. If false then do X and if true then do Y) would be to use Paths by Zapier (available on Professional or higher plans). It allows you to add that type of “branching logic” to a Zap to let it carry out different actions based on certain conditions. You can learn more about using paths here: Add branching logic to Zaps with paths

That said, there is indeed a way to accomplish the same branching logic using filters. As you rightly suspected, it would involve having two Zaps with opposing filter conditions set up. You can find out more about that approach here: Add branching logic to Zaps with filters

Keen to ensure you’re all set so please do keep us updated on how you’re getting on with this - happy to help further! 🙂


I ended up going the cheaper (albeit more work) route and made two different zaps with filters (one for true and one for false).  It kind of works, though I wish I could copy and paste steps without having to Duplicate an entire Zap.

Sure wish there was a basic Paths feature branching option for us Starter users, especially when it comes to this kind of use-case. Oh well.  Thank you for helping!  Learning to love this stuff when it works!


YAY!!! I’m so glad to hear you were able to solve it using filters @Crossing Church😁🎉

Totally agree with you on that, it would be super useful to folks to have some sort of basic paths functionality for folks on a Starter plan so I’ve submitted your idea internally so that the relevant teams are made aware of this need. I can’t make any promises on that front but please know that it will definitely be reviewed and taken into consideration. 

Please do reach out in the Community again if we can assist with anything else in the meantime. Until then, happy Zapping! ⚡️


Reply