New File Added

Definition


The New File Added trigger initiates a flow whenever a new file is added to a specified Google Drive folder. This enables automated processes to respond immediately to file uploads, such as processing documents, notifying teams, or updating systems. Key capabilities include real-time monitoring of folder activity, seamless integration with Google Drive, and access to detailed file metadata for enhanced flow customization.


Example use cases:


1. Automated Document ProcessingAutomatically start a flow to convert, archive, or analyze newly uploaded documents as soon as they appear in a project folder.

2. Team NotificationsNotify relevant team members via email or messaging apps whenever new files are added to shared folders, keeping everyone updated in real time.

3. File BackupTrigger a backup process that copies new files to another storage system or cloud service immediately after they are added.

4. Conditional Run: Process Only Certain File TypesRun the flow only if the new file’s MIME type matches specific document formats (e.g., PDFs or spreadsheets), skipping other files.

5. Conditional Run: Skip Files Larger Than a Certain SizeSet the flow to execute only for files below a certain size threshold, preventing heavy processing on very large files.

6. Conditional Run: Ignore Files Added by Specific UsersConfigure the flow to skip processing if the file owner matches a certain email address, useful for filtering out test uploads or admin files.



Configuration

The configuration for the New File Added trigger is divided into two main sections: Settings and Conditional Run.



Settings

1. Google Drive ConnectionThis is where you connect your Google Drive account to enable the trigger to monitor your files. The connection authorizes the flow to access your Drive and listen for new files added to specified folders.

2. Folder ID to MonitorInstead of manually typing the folder ID, you select the folder directly from your Google Drive via a pop-up selector (triggered by clicking the Google Drive icon). This ensures accuracy and ease of use. The flow will monitor this specific folder and activate whenever a new file is added.


Conditional Run

The Conditional Run feature enables you to specify precise criteria that must be met for the flow to proceed when a new file is added to the monitored Google Drive folder. If the trigger event occurs but the conditions are not satisfied, the flow will be skipped.

This is particularly useful to control flow execution based on file attributes — for example, processing files only if they are of a certain type, size, or uploaded by a specific owner.

How Conditional Run Works for New File Added Trigger

When enabled, you define one or more conditions combined with AND/OR logic. Each condition includes:

  • Condition Type

    • When: The flow runs only if this condition evaluates to true.
    • Except When: The flow does not run if this condition is true.
  • Value to EvaluateSelect a value from the trigger outputs such as File Name, MIME Type, File Size, Owners, or any other output property generated when the file is added and also you Vaults.

    Vaults – secure, static values such as API keys, secret tokens, or organizational parameters.

    🔐

    Vaults are managed from your workspace under Settings → Vaults.Vault values are encrypted and cannot be viewed or modified inside the flow — they are only used securely during runtime.

  • OperatorChoose how to compare values, such as Equals, Not Equals, Greater Than, Less Than, Between, Is Null, or Is Not Null.

  • Comparison ValueThe value to compare against, which can be a fixed manual value or taken dynamically from other trigger outputs or vault values.

Example Use Cases for Conditional Run with This Trigger:

  • Run the flow only when the MIME Type equals application/pdf, to process PDF files exclusively.
  • Skip the flow except when the file size is less than 10 MB, avoiding oversized file processing.
  • Run the flow when the file owner’s email matches a specific user or domain.
  • Skip the flow except when the file name contains certain keywords or extensions.

By leveraging outputs such as File Extension, Size, Owners, and Created Time in your conditional logic, you can finely tune when the flow reacts to newly added files, ensuring it only activates for relevant files that meet your automation requirements.



Outputs


When the New File Added trigger activates, it generates detailed information about the newly added file. These outputs can be accessed throughout your flow via the token picker and can also be used within the Conditional Run section to control whether the flow should continue based on specific file attributes.

1. IdThe unique identifier assigned to the file by Google Drive. This ID can be used in subsequent actions to reference or manipulate the file directly.

2. File NameThe name of the file as it appears in Google Drive, useful for display or logging purposes.

3. MIME TypeThe file’s MIME type indicates the format of the file (e.g., application/pdf for PDFs), helping you determine how to handle the file within your flow.

4. VersionIndicates the current version number of the file, useful for tracking updates or changes over time.

5. View LinkA URL that opens the file in the appropriate Google editor or viewer in a web browser, allowing users to quickly access the file.

6. Original File NameIf available, this is the original name of the uploaded file. This is especially relevant for files uploaded as binary content.

7. File ExtensionExtracted from the file name, this shows the full extension, which can include multiple parts (e.g., .tar.gz). This helps in filtering or processing files based on their type.

8. Download LinkA direct link to download the file content via a browser, enabling automated processes or users to retrieve the file easily.

9. SizeThe size of the file in bytes, which can be useful for validations or conditional logic based on file size.

10. TrashedIndicates whether the file has been moved to the trash, either directly or because its parent folder was trashed. This helps avoid processing deleted files.

11. Modified TimeThe timestamp of the last modification made to the file, useful for version control or auditing.

12. Created TimeThe timestamp when the file was originally created in Google Drive, helping track the file lifecycle.

13. OwnersDetails about the file owners including their display names and email addresses. This can assist with permissions management or notifications.

14. ParentsThe ID(s) of the folder(s) that contain the file, useful if you need to reference or check folder hierarchy.

15. File ContentsThe actual content of the file, accessible for further processing, such as reading, parsing, or transferring data.



Example Scenario: Automated Processing for Small Image Files


Imagine you want to automate the handling of newly added files in a Google Drive folder, but only for images in JPEG or PNG format. Moreover, you want to exclude files that are too large to process efficiently — say, any file larger than 5 megabytes.

With the New File Added trigger, you set up your flow to start whenever a file is uploaded to the target folder. Using the Conditional Run feature, you configure conditions to:

  • Run the flow only when the file extension is .jpg or .png, ensuring only image files trigger the automation.
  • Except when the file size exceeds 5,000,000 bytes (5 MB), so very large files are skipped automatically.

This setup ensures your flow processes only small image files, optimizing resource usage and avoiding unnecessary handling of large files.