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
CVin 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.
Note:
A file filter looks at file names. To react to a new upload, use
When a record is updatedon the file field and addHas 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 adminof the workspace the database app is in and haveFull accessto every database the automation uses. App permissions alone aren't enough.
Add a filter on a file field
To filter a file field:
Open the database app and click the automations icon at the top right (
Create and view automations), then open an automation.Under
And if the following conditions are met, selectAdd filter.In the new row, select the field and choose the file field.
Select the option and choose how to compare (listed under Options for file fields).
Enter the part of the name, or the pattern. Options such as
Is emptydon't ask for a value.Select
Save changes.
Options for file fields
You can choose from these options:
ContainsandDoes not containcheck whether a file name includes the text.Starts withandEnds withcheck the beginning or the end of a file name, for example.pdf.Glob patternchecks the file name against a pattern, such as*.pdffor a PDF orinvoice-*for names that start withinvoice-. The*stands for any text. Use it on fields with a single file.Is emptyandIs not emptycheck whether any file is attached.Has changedchecks whether the files were changed in this update. It only appears when the trigger isWhen a record is updated. Learn more →Has been addedandHas been deletedcheck whether a file was added or removed in this update. They're available for multiple files and multiple images, and work withWhen 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:
Set the trigger to
When a record is updatedandDocumentshas changedinCandidates.Add the filter
WhereDocumentsHas changed.Select
Add filterand addWhereDocumentsContains.pdf.Select
Add action→Add a comment to the current record, then enter "New document from " and insert theNamefield.Select
Create automation.
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 patternisn't in the list, the filter may be used to search for records. UseContainsorDoes not containthere.If nothing matches, check the exact file name, including the extension.
Glob patternis case-sensitive, so*.pdfdoesn't matchReport.PDF.Contains,Starts with, andEnds withignore 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 openRuns. AManual rundoesn't change the record, soHas changedoptions 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?
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?
Can I check the content of a file?
No. File filters only check file names.
How do I check for a certain file type?
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?
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?
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?
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 →
