Skip to main content

Search for records action

Find records in any database app while an automation runs. Add filters to narrow the results, limit how many you collect, and use them in later actions.

Written by Leo

Search for records is an action that collects the records of a database app that match your filters (the trigger decides when the automation runs, and the action decides what happens). It's meant to help you look things up, like existing customers or duplicates, without leaving the automation.

You can use this action for many things, including:

  • Checking whether a new lead already exists before you create a task for it.

  • Collecting every open invoice of a customer to send one reminder.

The action Search for records in Expenses with the Add filter button

Note:

  • The action only collects records. It doesn't change anything. Use the collected records in later actions, like Update collected, Comment on collected, Send email to collected, or Loop actions.

  • A search collects up to 1,000 records. If more match, the result is cut at 1,000, and no error appears. Learn more about limits →

Who can use the Search for records action?

  • Automations are available on the Free, Plus, and Premium plans. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.

  • To add or change this action, you need to be a workspace admin of the workspace the database app is in. You also need full access to every database the automation uses.

Add the Search for records action

To search for records from an automation:

  1. Open the database app and click the automations icon at the top right (Create and view automations).

  2. Open an automation, or select New automation and choose a trigger.

  3. Select Add action → Search for records.

  4. Open the app dropdown after in and select the database you want to search.

  5. Select Add filter to narrow the results.

  6. Add actions below that use the collected records.

  7. Select Create automation for a new automation, or Save changes for an existing one.

Adding Search for records in an Expenses automation: Add action, selecting Search for records, choosing Expenses in the app list after in, and selecting Add filter, which adds the filter Where Expense Contains

Search for records settings

  • App: the database app that is searched. It can be any database app, not only the database of the automation. The dropdown lists the database apps of every workspace where you're a workspace admin and have full access to the app.

  • Filter: each row has Where, a field, an operator, and a Value. For example, Where Expense Contains a word. Select Add filter for more rows. Without a filter, the search collects all records of the database, up to the limit. All filters must match. To find records that match one of several conditions, use several searches or Filter collected.

  • Limit results: in the ••• menu of the action. It sets the maximum number of records to collect. Without Limit results, the action collects every matching record, up to 1,000. When you switch on Limit results, the action reads and limit results to, followed by the number. It starts at 1.

  • Continue on error: keeps the run going if the search fails.

Filters follow the same rules as in other places of an automation. The operators depend on the type of field. Learn more about filters →

You can use record values in the Value box, for example the Email of the record that started the automation, to find records with the same email.

You can filter on most field types, including text, number, category, status, people, relation, date, email, phone, link, location, file, image, and calculation fields, and on who created or last changed a record and when.

To leave out the record that started the automation, add a filter Where App Record ID ≠ and type @ to insert the current record's App Record ID.

Use the collected records

The records you find are called collected records. They stay available for the rest of the run, and these actions work with them:

  • Loop actions runs actions for each collected record.

  • Update collected, Comment on collected, and Send email to collected do the same thing for all of them.

  • Filter collected, Sort collected, and Clear collected refine or empty the list.

  • Get related for collected follows relation fields to more records.

Let's look at an example

Let's say your sales team wants to avoid duplicate leads. Here's how:

  1. Set the trigger to When a record is created in the Leads database app.

  2. Select Add action → Search for records and choose the Leads database.

  3. Select Add filter: Where Email Contains the Email of the new lead. For email fields, use Contains; text fields also offer Is.

  4. Select Add action → Conditional actions and run the next actions only if more than one record was found (the search finds the new lead too). To get the number, add Rollup collected with Count all after the search, then check the result in Conditional actions, for example > 1.

  5. Inside the condition, add Add comment with "Possible duplicate".

  6. Select Create automation.

The next time a lead is created with an email that already exists, the record gets a comment like "Possible duplicate".

Search for records errors

  • If the search finds nothing, check the filter and the database app you chose. A filter row without a value makes the search return no records.

  • If the search finds fewer records than you expect, the limit may be applied. Check Limit results.

  • If the step fails, the run shows the step and its message. Open the automation and click ▷ (View all runs) at the top, or use cmd/ctrl + 1. Each run shows its status, for example Success; select a run to see every step. For all automations, open Runs in the Automation Center and filter by App, Automation, or Status.

  • If you search the same database twice, the second search adds its records to the same list. Use Clear collected before it if you only want the new results.

Test, pause, or edit the Search for records action

  • Manual run runs the automation once. Under Run on, select the records, then select Start run, or Save and start run if you have unsaved changes. The search is only a read, but later actions can change real records.

  • To stop only this action, select ••• → Deactivate.

  • To change the search, open the automation, select the step, make your changes, then select Save changes.

Learn more

FAQs

Can I search in a different database app than the trigger's?

Yes! Open the app dropdown after in and select another database app. The dropdown lists the database apps of every workspace where you're a workspace admin and have full access to the app.

How many records can a search find?

Up to 1,000. If more records match, the result is cut at 1,000 and you don't see an error. Narrow the filter, or work in batches.

Can I search for a word anywhere in a record?

No. It searches only in the fields you choose in the filters.

Can I find duplicates with this action?

Yes! Search for records with the same value, then add a comment, a task, or an email instead of deleting. Learn more about finding duplicates →

Can I choose the order of the results?

Yes, with Sort collected after the search. Learn more about sorting collected records →

Are there other actions I can use?

Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →

Are you a developer using the Tape API for automations?

The automation API has its own documentation for developers. Full reference: collect_app_records in the developer docs →

Still have questions? Find answers and get help from community experts in the Tape community →

Did this answer your question?