A Copy Policy decides where an email is saved based on its content. Instead of one fixed storage file path, the policy checks conditions in order and sends each email to the folder for the first condition it meets (or to every matching folder), with a fallback folder for everything else. Use it, for example, to file email into a project folder when the subject has a project number and into a general folder otherwise.
Before you begin
- Create the variables the conditions will test, such as a project number. See Custom Variables.
- Know which storage provider the rules will use. A policy can be limited to one provider or left for any provider.
- Read Storage File Paths. Folders in a Copy Policy work the same way.
How a Copy Policy chooses folders
With On the first condition, the first matching condition wins. With On every condition, every matching condition adds a folder.
Create a Copy Policy
-
Open Auto Filling › Copy Policies and click Create.
Enter a Copy Policy name and, optionally, a Copy Policy description.
Under Choose cloud storage, choose a Cloud storage: Box, Google Drive, OneDrive, Egnyte or Dropbox for Teams. Choose None to use the policy with any provider.
-
In Select on which conditions to apply, choose:
- On the first condition (default): the email is saved only to the folder of the first condition that matches.
- On every condition: the email is saved to the folder of every condition that matches.
-
In #1 Policy Condition:
- In When these variables:, choose one or more variables.
- Choose All match, At least one match or No match.
- Under Save the email to this cloud storage:, choose where the path starts:
- Root: the top of the storage account.
- Select a variable: a folder whose ID a variable returns, for example from a synced dataset. See Use an existing folder by ID.
- Pick from storage: a folder you choose in the provider's folder browser.
- For OneDrive, when OneDrive for Organizations is connected, a SharePoint site can also be chosen.
- In Subfolder, enter the folders below that point. Type
{to insert variables, for exampleProjects/{Project Number}/Correspondence.
To add more cases, click Add Condition. Conditions are checked in the order shown.
-
Turn on Use a default condition and tick When to use it:. Each ticked option gets its own destination and Subfolder:
Option The default folder is used When there is no condition match when no condition matches When there is more than one condition match instead of the matched folders, when more than one condition matches Always for every email, in addition to any matched folders Click Save Policy.
Warning: If no condition matches and there is no default folder, the email isn't saved by the rule. Always set When there is no condition match.
Use the policy in a rule
- In the rule wizard, go to 4. Storage Filepath.
- Turn on Use a copy policy instead.
- In Select a copy policy, choose the policy. Policies for any provider show as All providers:
; others appear only when the rule uses their provider. - Click Confirm.
The policy replaces the rule's path. Turning the toggle off restores the previous path.
Use an existing folder by ID
Some organizations already have one folder per client or matter and want email filed into it, wherever it is. Combine Dataset Sync with Select a variable:
- Create a dataset that syncs the client folders with Use as key = the name and Use as value = the ID. See Datasets.
- Create a variable that finds the client name in the email and maps it through the dataset to return the folder ID.
- In the Copy Policy condition, choose Select a variable and pick that variable. Add a Subfolder such as
Email/{Received Date / yyyy}if needed.
Example: project correspondence
| Setting | Value |
|---|---|
| Select on which conditions to apply | On the first condition |
| #1 Policy Condition | Variable Project ID - 6 Digits, All match → Root, Subfolder Projects/{Project ID - 6 Digits}/Correspondence
|
| Default: When there is no condition match |
Root, Subfolder Unfiled/{From Address, domain part}
|
An email with Project 482913 in the subject is saved to Projects/482913/Correspondence; all other email goes to Unfiled/<sender domain>.
Edit and delete
Open Auto Filling › Copy Policies and click Edit or Delete. If a rule uses the policy, the dashboard lists the rules when you delete it; change those rules first.
Verify
- Send one test email for each condition, and one that matches none.
- Check that each was saved to the expected folder.
- If one is missing, open the message in Email Flow Logs and check the storage events.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The policy isn't in the rule's list | The policy is set to a different provider | Set Cloud storage to the rule's provider, or to None for any provider. |
| Email saved to two folders | On every condition, or the Always default, is set | Use On the first condition, or untick Always. |
| Some email not saved at all | No condition matched and there's no default | Add When there is no condition match. |
| Email went to the default folder unexpectedly | The variable didn't match | Test the variable with the email. See Custom Variables. |
Folder named EMPTY
|
A variable in the subfolder had no value | Give the variable a default value. |
Comments
0 comments
Please sign in to leave a comment.