File Google Drive inbox documents into dated folders with a Google Sheets audit log
Ready for 3.0What this workflow does
This workflow has 15 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive and Google Sheets.
How it runs
Trigger: On Google Drive events (file created).
- Plan Destination From Rules (Code): runs custom JavaScript code
- Route By Document Type (Switch): routes items into 4 branches
- Log Filing Failure (Google Sheets): append (sheet)
- Find Year Folder (Google Drive): search (file folder)
- Year Folder Exists? (If): checks a condition and branches into true / false
- Find Month Folder (Google Drive): search (file folder)
- Create Year Folder (Google Drive): create (folder)
- Month Folder Exists? (If): checks a condition and branches into true / false
- Find Type Folder (Google Drive): search (file folder)
- Create Month Folder (Google Drive): create (folder)
…plus 4 more steps. See the full node list below.
Services it uses
Other Google Drive + Google Sheets templates (720)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow monitors a Google Drive inbox folder for new files, classifies them by filename regex rules, files them into a Year/Month/Type folder structure in Google Drive, and logs each success or failure to a Google Sheets audit log. How it…