
Module 7 Lesson 3: Google Drive Automation
The digital archive. Learn how to upload, download, share, and organize files and folders in Google Drive, bridging the gap between your local server and the cloud.
Module 7 Lesson 3: Google Drive Automation
Google Drive is the bridge between your various apps. It stores your reports from Sheets, your images from Gmail, and your backups from n8n itself.
1. Uploading Files
To upload a file, you need the Binary Data (Module 1, Lesson 3) from a previous node.
- Input: The PDF from Gmail.
- Node: Google Drive -> Upload.
- Setting: Folder ID (Where should it go?).
2. Searching for Files
Don't assume you know the ID of every file.
- You can search by Name (
name = 'Invoice-123.pdf'). - The node returns the File ID, which you can then pass to the "Download" or "Share" operation.
3. Sharing & Permissions
You can automate the "Collaboration."
- "Upload the Client Report."
- "Give 'Editor' access to client@email.com."
- "Send the link to the client via Slack."
4. The "File Lifecycle" (Delete/Trash)
Don't let your cloud storage fill up with garbage.
- Build a workflow that searches for files older than 30 days and moves them to the Trash automatically.
Exercise: The Cloud Custodian
- Upload a simple text file to Google Drive.
- Search for that file by name.
- Generate a "Public Share Link" for that file.
- Why is using a Folder ID safer than just uploading to "My Drive"?
- Research: What is "Google Workspace Shared Drives" and how does n8n handle them?
- Search: How do you "Create a New Folder" if it doesn't already exist? (Hint: See the "Create" operation).
Summary
Google Drive automation is the "Glue" of your digital workspace. By mastering the ability to move, share, and organize files in the cloud, you create a seamless and professional environment for your team and your clients.
Next Lesson: Synchronized schedules: Google Calendar: Scheduling and Syncing.