How to Create File Organization Rules with Workflows
A workflow is a set of standing instructions, written in plain English, that tells AI how to move and rename every incoming file based on its content. You write the rules once — "invoices go here, contracts go there" — and every file that arrives from email, Slack, Teams, connected cloud folders, or manual uploads is read, classified, and placed in the right folder automatically.
This is how workflows work in The Drive AI. You define the logic once, laid out as steps on a canvas. The workflow handles every file from that point forward.
This guide walks through the setup step by step, with real examples you can copy for your own workspace.
What file organization rules actually do
A file organization rule is an instruction that tells The Drive AI how to handle incoming files. Instead of you downloading an attachment, looking at it, deciding where it goes, and dragging it to the right folder — the workflow does all of that automatically.
A workflow reads like a sentence: WHEN a file arrives, IF it matches, THEN handle it. You describe in plain English how you want your files organized, and the AI follows your instructions. For organizing, the two steps that matter most are:
- Move — places the file into the correct folder based on its content
- Rename — gives the file a consistent, meaningful name
The AI reads the actual content of each file to decide where it belongs and what to call it. It does not rely on who sent the file or which channel it came from — it reads the document itself, understands what it is, and follows your rules.
Setting up your first rule
Step 1: Connect your sources
Before creating rules, connect the channels where your files arrive:
- Gmail — attachments from incoming emails
- Outlook — same for Microsoft email accounts
- Slack — files shared in channels and DMs
- Microsoft Teams — files shared in team channels
- Google Drive, OneDrive, SharePoint, Dropbox — new or changed files in a folder you choose (these are renamed and moved where they live)
- Manual uploads — files you drag into your workspace
Each source runs independently. You can connect one or all of them, and each becomes the "when" of a workflow. Workflows on files uploaded to The Drive AI work on every plan; connecting Gmail, Outlook, Slack, Teams or a cloud drive comes with the Max plan or any Team plan.
Step 2: Write your workflow instructions
Your rule is a plain English instruction that tells the AI how to organize files. The AI reads the content of every incoming file and uses your instructions to decide where to move it and what to name it. Here are real examples:
By document type:
Organize invoices into Finance/Invoices/[Year]/[Month], named [Vendor]-invoice-[Date].pdf
The AI reads each incoming file, determines if it is an invoice, extracts the vendor name and date from the content, creates the folder path, and renames the file. A scan of a plumber's invoice from March becomes Finance/Invoices/2026/March/ABC-Plumbing-invoice-2026-03-15.pdf.
By client:
Put all files related to client Acme Corp into Clients/Acme Corp/[Document Type]
The AI reads the document, identifies mentions of Acme Corp in the content — whether it is a contract, invoice, or report — and places it in the right subfolder under the client's name.
By project:
Move all files related to the Q3 Redesign project into Projects/Q3 Redesign/[File Type]
The AI reads the content of each file. A design mockup goes to Projects/Q3 Redesign/Designs. A requirements doc goes to Projects/Q3 Redesign/Specs.
Combined prompt example:
You can put all of this into a single workflow instruction:
Organize my files using these rules:
- Invoices go to Finance/Invoices/[Vendor]/[Year]-[Month], renamed to [Vendor]-invoice-[Date].pdf
- Contracts go to Clients/[Client Name]/Contracts, renamed to [Date]-[Contract Type].pdf
- Receipts go to Finance/Receipts/[Category]/[Year]
- Everything else goes to Documents/[File Type]/[Year]
The AI applies the entire instruction to every file, reading the content to determine which rule applies.
Step 3: Start with an approval step
Before letting a workflow move files on its own, add an "Ask a person to approve" step. The workflow proposes each move and rename, and nothing changes until you approve it. Every move is recorded, so you can see exactly what it did.
This review period is critical. It lets you refine your instructions before they run unattended on new files.
Step 4: Let it run
Once you are satisfied with how the workflow files things, set the approval to run "only when unsure" — the AI asks you only about files it cannot place confidently. From that point, every matching file — from email, Slack, Teams, cloud folders, or uploads — is handled automatically.
For a one-off cleanup of files already in your workspace, open a folder and use the ⌘K / Ctrl+K command "Organize this folder" — the AI files everything in the folder you are in.
Rule examples by profession
Accountants and bookkeepers
Rule 1: Organize tax documents by client name and tax year
→ Tax Documents/[Client Name]/[Tax Year]/[Document Type]
Rule 2: Sort invoices by vendor and month
→ Finance/Invoices/[Vendor]/[Year]-[Month]
Rule 3: File receipts by expense category
→ Receipts/[Category]/[Year]/[Month]
An email from a client containing a W-2 automatically goes to Tax Documents/Johnson Family/2025/W-2s. A receipt from Office Depot goes to Receipts/Office Supplies/2026/July.
Lawyers and legal teams
Rule 1: Organize case files by matter number and document type
→ Cases/[Matter Number]-[Client]/[Document Type]
Rule 2: File signed contracts by client and execution date
→ Contracts/Executed/[Client]/[Date]-[Contract Type]
Rule 3: Sort correspondence by case
→ Cases/[Matter Number]-[Client]/Correspondence/[Date]
A signed NDA from Acme Corp goes to Contracts/Executed/Acme Corp/2026-07-03-NDA.pdf. Court filings land in the right case folder automatically.
Real estate agents
Rule 1: Organize transaction files by property address
→ Transactions/[Property Address]/[Document Type]
Rule 2: Sort listing documents by status
→ Listings/[Active|Pending|Closed]/[Property Address]
Rule 3: File inspection reports with the property
→ Transactions/[Property Address]/Inspections/[Date]-[Inspector]
When a home inspector emails you a report, it goes straight to Transactions/123 Oak St/Inspections/2026-07-03-Smith-Inspection.pdf.
Marketing agencies
Rule 1: Organize client deliverables by client and campaign
→ Clients/[Client Name]/[Campaign Name]/[Asset Type]
Rule 2: Sort internal files by department
→ Internal/[Department]/[Year]/[Month]
Rule 3: File brand assets by client
→ Clients/[Client Name]/Brand Assets/[Asset Type]
A logo file emailed by a client lands in Clients/Acme Corp/Brand Assets/Logos. A campaign brief from Slack goes to Clients/Acme Corp/Summer Campaign/Briefs.
Freelancers and consultants
Rule 1: Organize everything by client, then by type
→ Clients/[Client Name]/[Contracts|Invoices|Deliverables|Communications]
Rule 2: Auto-file sent invoices
→ Clients/[Client Name]/Invoices/[Year]-[Month]-invoice
Rule 3: Sort project files by engagement
→ Clients/[Client Name]/Projects/[Project Name]/[File Type]
Advanced prompt patterns
Writing comprehensive prompts
Since a workflow's instructions are plain English, you can make them as detailed as you need. A good instruction covers your most common file types and includes both folder placement and naming conventions in one instruction:
Organize my files:
- Client invoices → Clients/[Client Name]/Invoices/[Date]-invoice.pdf
- Client contracts → Clients/[Client Name]/Contracts/[Date]-[Contract Type].pdf
- Tax documents → Tax/[Year]/[Document Type]
- Receipts → Finance/Receipts/[Category]/[Year]-[Month]
- Design files → Projects/[Project Name]/Design
- Everything else → Documents/[Year]/[File Type]
The "everything else" catch-all at the end ensures files that do not match a specific pattern still get organized instead of sitting loose.
Handling exceptions
Not every file fits neatly into a rule. Tell the workflow where those go — for example, "anything you cannot place goes to Unsorted" — or let an approval step set to "only when unsure" ask you about them. You can periodically review that folder and either:
- Manually move files where they belong
- Add a line to your instructions to handle the pattern you notice
Over time, your Unsorted folder shrinks as you refine your rules.
Dynamic folder creation
Rules can create new folders on the fly. If you set a rule to organize by client name and a new client sends you a file, the AI creates the client folder automatically. You do not need to pre-create every possible folder.
Date-based organization
Date patterns are particularly useful for recurring documents:
[Year]/[Month]creates2026/July[Year]/Q[Quarter]creates2026/Q3[Year]/[Week]creates2026/Week-27
The AI extracts dates from the document content, not just the upload timestamp. An invoice dated June 15 files under June even if you receive it in July.
Common mistakes to avoid
Making rules too specific. A rule that says "move PDFs named invoice*.pdf from john@acme.com" breaks the moment the sender or filename changes. Instead, use content-based rules: "organize invoices by vendor." The AI reads the content to classify — it does not rely on filenames or senders.
Creating too many rules at once. Start with 2-3 rules for your most common file types. Watch how they work for a week. Then add more. Trying to build a complete rule system on day one leads to conflicts and confusion.
Not reviewing first. Keep an approval step on a new workflow until you trust it. One poorly written rule can misfile dozens of documents before you notice.
Ignoring the Unsorted folder. Check it weekly. Patterns in your unsorted files tell you which rules to create next.
How this connects to email, Slack, and Teams
The real power of a workflow is that the same instructions can apply to every file regardless of where it came from. Whether a file arrived from Gmail, Slack, Teams, or a manual upload, the AI reads the content and follows your rules.
A contract arrives via Gmail — the AI reads it, identifies it as a contract for Acme Corp, and moves it to Clients/Acme Corp/Contracts.
The same client sends an updated version via Slack — the AI reads the content, recognizes it as the same type of document, and files it in the same place.
Their team member uploads a spec through a file request link — a workflow on the destination folder reads it and files it under the project folder.
You receive a signed copy back via email — the AI reads the signatures and moves it to executed contracts.
Four different channels, four different moments, one consistent organization. The instructions do not reference channels — they reference content. That is what makes it work.
For more on how email integration works specifically, see Gmail Integration: Auto-Save and Organize Every Email Attachment. For Slack, see How to Automatically Save and Organize Slack File Uploads.
Frequently Asked Questions
What is a workflow in The Drive AI?
A workflow is a set of plain English instructions, laid out as steps on a canvas, that tells the AI how to move and rename every incoming file. The AI reads the content of each file — not the filename or sender — and follows your instructions to place it in the correct folder with a consistent name.
How does the AI decide where a file goes?
The AI reads the actual content of the file. It identifies document type (invoice, contract, receipt, report), extracts key details (vendor name, client name, date, amount), and uses your instructions to determine the correct folder and filename.
Can I organize files from Gmail, Slack, and Teams with the same rules?
Yes. One workflow can watch several sources, and the same instructions apply to every file regardless of where it came from — the AI reads the content and follows your instructions the same way for every file. Connecting Gmail, Slack, Teams and cloud drives comes with the Max plan or any Team plan.
What happens to files that do not match my rules?
You decide. Tell the workflow where unplaced files go (for example, an Unsorted folder), or add an approval step set to "only when unsure" so the AI asks a person about files it cannot confidently classify. Review them periodically and refine your instructions to handle new patterns.
Can I review what a workflow does before it runs on its own?
Yes. Add an "Ask a person to approve" step and every proposed move and rename waits for your approval before anything changes. This lets you refine your instructions before the workflow runs unattended.
Do workflows rename files too?
Yes. Move and Rename are both workflow steps. You define both in your instructions — where the file should go and what it should be called.
Workflows on files uploaded to The Drive AI are available on every plan, free included; connecting email, chat and cloud drives comes with Max or any Team plan. Try The Drive AI free — no credit card required.
Share it with your network
