How the filename filter works
The filename filter is a single regular expression. It’s matched case-insensitively, and it doesn’t need to match the whole file name — it just needs to match somewhere in it. There’s no separate “exclude” toggle or comma-separated list — both of those are done with regex, shown below.Example: match a simple string
To only allow files with a word somewhere in the name, e.g.invoice:
invoice.pdf, Invoice_2024.png, final-INVOICE-v2.docx, etc.
Example: match a specific file extension
To only allow PDFs, anchor the pattern to the end of the file name:\. matches a literal period and $ anchors to the end of the string, so this won’t accidentally match something like pdfnotes.txt.
Example: exclude a specific string
There’s no built-in “exclude” option, but a negative lookahead does the same thing. To allow everything except files withdraft in the name:
(?!.*draft) fails the match if draft appears anywhere in the name, so only non-matching (i.e. non-draft) file names pass the filter.
Example: match multiple values
Use| (alternation) to match any of several patterns. To allow PDFs, Word docs, or images:
If a pattern doesn’t compile as a valid regular expression, Flow Builder will show “Not a valid regular expression” and block saving. If you leave the field blank, no filename filtering is applied.