Skip to main content

Filter Document Attachments on Workflow Emails (CRM)

When a workflow sends an email, it can attach the documents stored on the record. Until now it attached every document, so an email meant to carry one consent form went out carrying everything on the file. You can now tell each email exactly which documents to attach — by the folder they are stored in, by part of their file name, or by both at once.

Contents

1. Before You Start

2. Open the Send Mail Action

3. Turn On the Attachment Filter

4. How the Two Options Work Together

5. Matching File Names

6. Check Your Rule Was Saved

7. What the Filter Does Not Change

8. Frequently Asked Questions

1. Before You Start

You will need:

  • Access to Settings → Automation → Workflows in the CRM.

  • A workflow that already sends an email, or permission to create one.

  • Documents already filed into folders on the records the workflow runs on. The folder list you choose from is your own instance's document folders.

Access requirements: the same permissions you already need to create or edit a workflow. There is no separate switch to turn on, no request to Dazos support, and nothing to install.

Nothing changes for the emails you already have. Every existing workflow email keeps attaching all documents exactly as before, until someone opens it and switches the filter on. You can adopt this one email at a time.

2. Open the Send Mail Action

From the CRM, navigate to Settings → Automation → Workflows, open the workflow you want to change, then open the Send Mail action you want to change. To create a new one, use Add Action and choose Send Mail.

The filter appears in the action's form, just below Email Templates.

Before the filter can do anything, the email itself has to be attaching documents. In the Add Field list, make sure the email body includes one of these:

Field

What it attaches

Documents uploaded to Opportunity

Documents filed on the Intake Opportunity

Documents uploaded to Account

Documents filed on the Account

Important: If the email does not include one of these two fields, there are no documents to filter and the setting has nothing to do.

3. Turn On the Attachment Filter

Switch Filter document attachments to ON. Two options appear underneath.

Field

Description

Example

Select folders

Only documents filed in the folders you pick will be attached. You can pick more than one.

Insurance

Cards

Filename

consists of

Only documents whose file name contains this text will be attached.

Consent

1. Pick one or more folders, or leave the box empty if you do not want to filter by folder.

2. Type the text the file name must contain, or leave it empty if you do not want to filter by name.

3. Click Save on the action, then save the workflow.

Tip: Each Send Mail action keeps its own rule. If a workflow sends three different emails, each one can attach a different set of documents — changing one never affects the others.

4. How the Two Options Work Together

What you set

What gets attached

Folders only

Any document filed in one of the folders you picked, whatever it is called.

File name only

Any document whose name contains your text, whatever folder it is in.

Both

Only documents that are in one of your folders and whose name contains your text. This is the most precise option.

Filter ON,

nothing set

Nothing is attached. Pick at least one folder or type some text.

Filter OFF

Every document on the record is attached — the original behaviour.

The grey note under the two options repeats this on screen, so you do not have to remember it.

5. Matching File Names

File name matching ignores capital letters, and the text can appear anywhere in the name. Hover the small information icon beside Filename consists of to see worked examples.

Typing insurance attaches a file called Insurance Card.pdf and one called 2024-insurance front.png , but not Consent Form.pdf . Typing Consent attaches Signed Consent.pdf and consent form-v2.pdf , but not Insurance Card.pdf .

Tip: Match on a distinctive word rather than a whole file name. Staff rarely name files identically, so Consent catches far more than Consent Form Signed 2024.pdf ever will.

6. Check Your Rule Was Saved

Open the action again after saving. The switch should still be on, your folders still selected, and your text still in the box.

If the options are empty when you reopen, the action did not save — check that the required fields at the top of the form (To and Subject) are filled in, then save again.

7. What the Filter Does Not Change

It does not change who receives the email. Recipients are still whoever the To, Cc and Bcc boxes name. The filter only decides which documents travel with the email.

It does not affect generated attachments. VOB, Pre-Assessment and Travel Itinerary attachments are produced from the record itself rather than taken from a document folder, so they are always sent as before.

It does not affect other workflows or other emails. The rule belongs to the one action you edited.

8. Frequently Asked Questions

Q: Will this change the emails my workflows send today? No. Every existing email keeps attaching all documents until someone opens that email's action and switches the filter on.

Q: What happens to documents staff upload after I set the rule? They are included automatically if they match. The rule is checked each time the email is sent, not when you save the workflow.

Q: I renamed a document folder. Do I need to fix my rules? No. Folders are remembered by the folder itself, not by its name, so renaming one does not change which documents your emails send.

Q: Does capitalisation matter in the file name box? No. insurance , Insurance and INSURANCE all behave the same.

Q: Can I pick more than one folder? Yes. A document filed in any one of the folders you pick qualifies.

Q: How do I turn the filter off again? Open the action and switch Filter document attachments to OFF. Your folder and file name choices stay filled in, so you can switch it back on later without setting them up again.

Q: I switched it on and now no documents are attached at all. That happens when the filter is on but neither a folder nor a file name is set. Pick at least one folder, or type some text, then save.

Q: Can two emails in the same workflow attach different documents? Yes — that is the point of the setting living on each email rather than on the workflow. Give each Send Mail action its own folders and

file name text.

Need Help?

If you run into issues:

1. Reopen the Send Mail action and confirm the switch is on and your folders and text are still there.

2. Confirm the email body still includes Documents uploaded to Opportunity or Documents uploaded to Account — without one of those, no documents are attached at all.

3. Check that the documents you expect are actually filed in the folder you picked, and that their file names contain your text.

4. Contact Dazos support with the workflow name, the email action name, and what you expected to be attached, referencing CRM-3717.

Did this answer your question?