Make.com Google Drive Automation File Management

How to Delete Google Drive Files Automatically: Two Methods

Learn two methods for automatically deleting old Google Drive files using Make to free up storage space

Illustration showing automated Google Drive file deletion process

Method 1: Automatically delete old Google Drive files

This straightforward approach uses Make to identify and permanently delete Google Drive files that meet your specified criteria, such as files not modified within a certain timeframe. It's ideal when you're certain about the files you want to remove and don't need a recovery option.

The process involves creating a simple two-module scenario in Make that first searches for qualifying files, then deletes them immediately. This method helps maintain your Google Drive storage efficiently without manual intervention.

Google Drive module configuration in Make
Configuring the Google Drive search module in Make

1. Set up the Make scenario and the first Google Drive module

Begin by creating a new scenario in Make and adding the Google Drive "Search for Files/Folders" module. Connect it to your Google account and configure the settings to identify files based on your criteria. For this tutorial, we're targeting files not modified in the last six months.

Key configuration settings include selecting your target Drive and folder, setting the search query to look for files modified before your cutoff date, and specifying whether to include subfolders in the search. The query uses Google Drive's search syntax with Make's date functions to calculate the timeframe dynamically.

2. Delete your old Google Drive files

Add the Google Drive "Delete a File/Folder" module as the second step in your scenario. Connect it to the same Google account and configure it to receive file IDs from the search module. This creates a direct pipeline where files identified by the search are immediately deleted.

The module requires minimal configuration since it inherits the file selection from the previous step. Importantly, it will delete both files and folders that match your search criteria, despite the "File" setting name, so ensure your search parameters are accurate.

Google Drive delete module configuration
Setting up the deletion module in Make

3. Test and activate your scenario

Before running your scenario on all qualifying files, test it carefully on a single, non-essential file. Use the "Run this module only" feature on the search module to verify it identifies the correct files, then add that specific file to your query for a targeted test run.

After confirming the scenario works correctly, remove the single-file restriction and schedule regular runs. Make allows setting the frequency that matches your needs, whether daily, weekly, or monthly maintenance. Consider starting with less frequent runs until you're confident in the results.

Pro tip: Always test automation scenarios that delete data on a single, non-critical file first. This prevents accidental mass deletion of important files during setup.

Method 2: Automatically send old Google Drive files to Trash

This alternative approach provides a safety net by moving files to Trash instead of deleting them permanently. Files remain recoverable for 30 days, giving you time to restore anything deleted accidentally. We'll enhance this method with notifications about moved files.

The scenario follows a similar structure to Method 1 but replaces the deletion module with a "Move to Trash" function and adds components to track and notify about the affected files. This method is ideal when you want oversight before permanent deletion.

1. Create a new Make scenario and add the first Google Drive module

Start by creating a new scenario with the same Google Drive "Search for Files/Folders" module configured identically to Method 1. The same search parameters apply since we're targeting the same files, just handling them differently in the next steps.

This consistency between methods makes it easy to switch approaches if you change your mind later. You can even create both scenarios and run them alternately, comparing results before committing to one method.

Google Drive search module setup
Initial module setup for Trash method

2. Add the second module to move your old Google Drive files to Trash

Replace the deletion module with Google Drive's "Move a File/Folder to Trash" module. Configure it similarly by connecting to your Google account and mapping the file IDs from the search module. This creates the same automated workflow but with the safety of the Trash buffer.

The module configuration is nearly identical to the deletion version, maintaining simplicity while changing the destructive action to a reversible one. This demonstrates how small changes in automation can significantly impact risk management.

3. Compile a list of the Google Drive files that have been moved to Trash

Add a Text Aggregator module to create a readable list of all files moved to Trash. Configure it to receive file names from the move operation and format them clearly with separators between items. This list becomes valuable for tracking and verification purposes.

The aggregator helps transform raw data into human-readable information. You can customize the formatting to match your preferences, such as bullet points or numbered lists, making the output easier to review at a glance.

Text aggregator module configuration
Setting up the text aggregator for file tracking

4. Add a filter in between the two Google Drive modules

Insert a filter between the search and move modules to prevent errors when no files are found. Configure it to check for the existence of file IDs before proceeding, ensuring the scenario only continues when there's actual work to do.

This quality-of-life improvement makes the scenario more robust by handling empty results gracefully. It's particularly useful for scheduled runs where you might not always have files meeting your criteria.

5. Send yourself the list of the Google Drive files that have been moved to Trash

Complete the scenario by adding a notification module (like Slack or email) that sends you the aggregated list of moved files. This creates an audit trail and allows you to review what was moved to Trash after each run.

The notification serves both as a verification mechanism and a safety feature. If you spot any files that shouldn't have been moved, you have 30 days to restore them from Trash before permanent deletion.

Pro tip: Combine both methods by running the Trash method regularly (e.g., weekly) and the deletion method monthly to clear files that have been in Trash for 30 days. This creates a balanced approach to automated file management.

Frequently Asked Questions

Common questions about automated Google Drive file management

Automating Google Drive file deletion helps maintain storage space efficiently without manual effort. It ensures your Google Drive stays organized by removing outdated files automatically, preventing storage limit issues and keeping only relevant documents accessible.

Manual file management becomes impractical as your Drive grows. Automation handles this maintenance consistently, even when you're busy with other tasks. It's particularly valuable for teams where multiple people contribute files without coordinated cleanup.

Make connects to Google Drive and allows you to create workflows that automatically identify and delete files based on criteria like modification date. It provides a visual interface to build these automations without coding knowledge.

The platform offers pre-built modules for Google Drive operations combined with powerful filtering options. You can create sophisticated rules that would be difficult to implement through Google's native interface, such as combining multiple conditions for precise file targeting.

Permanent deletion removes files immediately with no recovery option, while moving to Trash keeps files for 30 days before deletion. The second method provides a safety net in case you need to restore accidentally deleted files.

The Trash approach is recommended when first implementing automation or when dealing with files that might have residual value. Permanent deletion is appropriate for temporary files or when you're completely confident in your filtering criteria.

Yes, Make allows setting specific criteria like file age, type, location, or name patterns. You can create precise filters to ensure only intended files are deleted while preserving important documents.

Advanced filtering options include combining multiple conditions, using regular expressions for pattern matching, and excluding certain folders or file types. These controls help prevent accidental deletion of valuable files while targeting exactly what you want to remove.

When properly configured with thorough testing, automated deletion is safe. We recommend starting with the Trash method, implementing notifications, and testing on non-critical files before full deployment.

Safety measures include maintaining backups outside Google Drive, using the 30-day Trash buffer period, and reviewing notification logs regularly. These precautions minimize risk while enjoying the benefits of automation.

Frequency depends on your storage needs. Monthly is common for general maintenance, while businesses with high file turnover may run weekly. Adjust based on your Google Drive usage patterns and available storage.

Consider your storage growth rate and how quickly files become obsolete. More frequent runs prevent accumulation but increase the chance of deleting files prematurely. Find the balance that keeps your Drive lean without being overly aggressive.

Yes, GrowwStacks specializes in building tailored automation solutions for Google Drive and other cloud storage systems. We can create custom workflows that match your specific file management requirements.

Our team handles complex scenarios including multi-user environments, compliance requirements, and integration with other business systems. We ensure your automation aligns perfectly with your operational needs while maintaining data security.

  • Custom filtering logic
  • Multi-step approval workflows
  • Integration with backup systems

Need Custom Automation Help?

This guide is a starting point. Our team builds fully tailored automation systems for your specific workflow needs.