Categorize Google Drive files with OpenAI and log results in Google Sheets
Ready for 3.0What this workflow does
This workflow has 59 nodes and runs on a schedule (every minute) (plus 2 other triggers). Along the way it connects Google Sheets, Google Drive and Slack. It also calls googleapis.com over HTTP.
How it runs
Trigger: On a schedule (every minute) (plus 2 other triggers).
- Set Configuration Variables (Edit Fields (Set)): sets 31 fields: SOURCE_FOLDER_ID, DESTINATION_ROOT_FOLDER_ID, LOG_SPREADSHEET_ID…
- E1 - Format Workflow Failure (Code): runs custom JavaScript code
- Read Logs from Sheets (Google Sheets): uses Google Sheets
- E2 - Send Failure Alert (Slack) (Slack): uses Slack
- If: checks a condition and branches into true / false
- D1 - Build Daily Summary (Code): runs custom JavaScript code
- Fetch Google Drive Files (HTTP Request): calls googleapis.com
- D2 - Send Daily Summary (Slack) (Slack): uses Slack
- Select Files for Processing (Code): runs custom JavaScript code
- D3 - Send Daily Summary (Email) (Send Email): sends an email over SMTP
…plus 45 more steps. See the full node list below.
Services it uses
Other Google Sheets + Slack templates (1,314) · Other Google Drive + Google Sheets templates (720) · Other Google Drive + Slack templates (222)
HTTP calls to: googleapis.com
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (15)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Google Drive
n8n-nodes-base.googleDrive - Switch
n8n-nodes-base.switch - Extract from File
n8n-nodes-base.extractFromFile - Compression
n8n-nodes-base.compression - No Operation, do nothing
n8n-nodes-base.noOp - Slack
n8n-nodes-base.slack - Send Email
n8n-nodes-base.emailSend - Error Trigger
n8n-nodes-base.errorTrigger
From the author
Quick overview This workflow polls a Google Drive “Incoming” folder, uses an OpenAI-compatible Chat Completions API to classify files into predefined categories, moves them into matching subfolders under an “Organized” root, and appends an audit log row to…