How does Zapier know which boards to search first, when searching for a card?
Asked by ac:

Hi and thanks in advance for your help :) Our team has several boards, with all cards named FirstName LastName for the client. I would like Zapier to search for a card on a subset of 5 boards BEFORE it searches for a card on the sales board. So, I would like Zapier to search for "Charlie Brown" on (these 5 boards) before it searches for "Charlie Brown" on the sales board, so that if it finds the client anywhere on (these 5 boards) first, it will modify the card there, and not the one on the sales board.

Does anyone know of a way to do this? Thank you so much!


Answers:
author: Nick Simard
body: Hi [@ac](/t5/user/viewprofilepage/user-id/4248295)

I was browsing the Community here and saw your post. This one was trickier to solve than I'd like to admit, but I've come up with something that **should** work (based on my testing, at least).

**NOTE:** This will rely on you only ever finding that card on ONE of those first boards, and not multiple. And ideally, there always being a card on the Sales board if it's not in one of those first 5.

I'm planning on creating a detailed post in the Zapier Community but for now here's the gist of the workflow, in 2 Zaps:

++**Zap 1**++   
**Trigger:** Whatever you've got set up  
**Action:** Looping (an app we have in beta)  
*In the loop, you would specify the board IDs (I'll show you how to get those) to loop through.*   
**Loop Action #1:** Trello --- Find Card (using the boards you specify)  
**Loop Action #2:** Filter: Only continue if you find a card  
**Loop Action #3:** Storage: Set a value in our data storage app, with the key being the name of the card and the value being the ID of that card.

**What did we do in this Zap?**   
We're triggering the Zap and looping through the boards you specify, looking for a card with the name that comes through that trigger step and if found, we set a value in our Storage app (to be retrieved in Zap 2).

++**Zap 2**++ **Trigger:** The exact same as Zap 1  
**Action:** Delay for 1 minute (this gives the other Zap time to look for the card in the first 5 boards)  
**Action:** Storage --- Look for the value  
++**Paths:**++ We'll have 2 paths you can go down, based on conditions we set  
**Path #1:** Only continue if a value was found  
**Action:** Trello --- Update Card (using the card ID you added to Storage)

**Path #2:** Only continue if NO value was found  
**Action:** Trello --- Find Card (using info from this Zap's trigger step)  
**Action:** Trello --- Update Card (using the ID of the card you find)

**What did we do in this Zap?**   
We triggered on the same thing that runs Zap #1, waited 1 minute to prevent this Zap from running before all other boards were checked, then ran through 2 paths. One path used the value we set and updates the card, while the other searches that Sales board then updates the card that's found.

As promised, here's one pretty easy to find the board IDs you'll need:

![ac540fd50222c621fe7a01a257b94f54](https://community.atlassian.com/t5/image/serverpage/image-id/138362i9388FA3EEC2E416B/image-size/large?v=v2&px=999 "ac540fd50222c621fe7a01a257b94f54")

When you add .json to the end of your board's URL, on the page that is displayed you can see the ID as indicated above.

And in the Looping app you can choose Create Loop from Text and add your board IDs with a comma between them:

![8c6c60fa21fc5a3f95fcd0a88a60611e](https://community.atlassian.com/t5/image/serverpage/image-id/138363i3BE0B08757209CE3/image-size/large?v=v2&px=999 "8c6c60fa21fc5a3f95fcd0a88a60611e")

I'll update this post with a link to the Zapier Community post when it's available :)

comments: author: Nick Simard
body: **UPDATE:** Here's the [detailed post](https://zapiercommunity.link/trello-board-search) I created in the Zapier Community :)


Tags: search

sort

zapier