Skip to main content

Filter automations by file fields

Let an automation continue only when a record has files, or when file names match a pattern such as *.pdf. See all options and how to react to uploads.

Written by Leo

You can filter file fields to let an automation continue only when a record has files, or when the file names match what you need. File filters check the names of attached files, not what is inside them.

You can use file filters for many things, including:

  • Continuing only when a candidate's record has a PDF with CV in the file name.

  • Reacting when someone attaches a file to a property record.

This page covers these field types: single file, multiple files, and multiple images.

A filter row on the file field Documents with the list of options open: Has changed, Has been added, Has been deleted, Contains, Does not contain, Starts with, Ends with, Glob pattern, Is empty, and Is not empty

Note:

  • A file filter looks at file names. To react to a new upload, use When a record is updated on the file field and add Has changed.

  • Glob pattern isn't available everywhere. It works in the filter under the trigger and in conditions inside actions, but not when a filter searches for records.

Who can use filters on file fields?

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

  • To create, edit, pause, or delete automations, you need to be a Workspace admin of the workspace the database app is in and have Full access to every database the automation uses. App permissions alone aren't enough.

Add a filter on a file field

To filter a file field:

  1. Open the database app and click the automations icon at the top right (Create and view automations), then open an automation.

  2. Under And if the following conditions are met, select Add filter.

  3. In the new row, select the field and choose the file field.

  4. Select the option and choose how to compare (listed under Options for file fields).

  5. Enter the part of the name, or the pattern. Options such as Is empty don't ask for a value.

  6. Select Save changes.

In a new automation for Candidates, selecting Add filter, choosing the file field Documents and the option Contains, and entering .pdf

Options for file fields

You can choose from these options:

  • Contains and Does not contain check whether a file name includes the text.

  • Starts with and Ends with check the beginning or the end of a file name, for example .pdf.

  • Glob pattern checks the file name against a pattern, such as *.pdf for a PDF or invoice-* for names that start with invoice-. The * stands for any text. Use it on fields with a single file.

  • Is empty and Is not empty check whether any file is attached.

  • Has changed checks whether the files were changed in this update. It only appears when the trigger is When a record is updated. Learn more →

  • Has been added and Has been deleted check whether a file was added or removed in this update. They're available for multiple files and multiple images, and work with When a record is updated.

With several files, Tape checks all file names together as one text, in the order of the files. Contains is met when any file name contains the text. Starts with checks the first file and Ends with the last one. To check whether any of several files is a PDF, use Contains with .pdf.

Let's look at an example

Let's say the HR team wants to know when a candidate attaches a PDF. Here's how:

  1. Set the trigger to When a record is updated and Documents has changed in Candidates.

  2. Add the filter Where Documents Has changed.

  3. Select Add filter and add Where Documents Contains .pdf.

  4. Select Add action → Add a comment to the current record, then enter "New document from " and insert the Name field.

  5. Select Create automation.

The automation Comment on new candidate PDFs: When a record is updated and Documents has changed in Candidates, the filter Where Documents Has changed and Documents Contains .pdf, and Add a comment to the current record with New document from @Candidate / Name

The next time someone changes a candidate's documents and a PDF is among them, you should see the comment on the record!

File filter errors

  • If an automation can't be saved while you're setting it up, the editor marks the part of the filter row that's missing or invalid. Complete or remove the row, then select Save changes.

  • If Glob pattern isn't in the list, the filter may be used to search for records. Use Contains or Does not contain there.

  • If nothing matches, check the exact file name, including the extension. Glob pattern is case-sensitive, so *.pdf doesn't match Report.PDF. Contains, Starts with, and Ends with ignore capital letters.

Test, pause, edit, or delete a filter

  • To test a filter, change a test record so it matches the condition, then select the runs button at the top of the automation (View all runs) to open Runs. A Manual run doesn't change the record, so Has changed options may not match.

  • To edit a filter, open the database app, click the automations icon in the top bar, then select the automation. Change the field, option, or value, then select Save changes.

  • To delete a filter, select the settings button at the end of the row or group, then select Remove.

Learn more

FAQs

How do I run an automation when someone uploads a file?

Yes! Set the trigger to When a record is updated, choose the file field, and add the filter Has changed on that field. Add Contains with the extension, such as .pdf, to react only to certain file types.

Can I check the content of a file?

No. File filters only check file names.

How do I check for a certain file type?

Use Contains and enter the extension, for example .pdf. With a single file, Ends with .pdf or Glob pattern *.pdf work too.

Can I check the size of a file?

No. File filters can't check the size or the number of files.

Where can I find all automation filter options?

In Automation filters →. It explains how to combine rows and groups and links to the options for each field type.

Are you a developer using the Tape API for automations?

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

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

Did this answer your question?