GoogleDriveTrigger Automate

For Google Drive, this workflow automatically monitors a specified folder for new CSV files, identifies and removes personally identifiable information (PII) using OpenAI, and uploads the sanitized files back to the drive. It streamlines data privacy compliance by ensuring sensitive information is handled appropriately, enhancing data security and trust.

7/8/2025
10 nodes
Complex
manualcomplexgoogledrivetriggergoogle driveextractfromfilelangchainsplitoutsticky notefilesstorage
Categories:
Complex WorkflowManual TriggeredCloud Storage & File Management
Integrations:
GoogleDriveTriggerGoogle DriveExtractFromFileLangChainSplitOutSticky Note

Target Audience

This workflow is ideal for:
- Data Analysts who need to sanitize datasets by removing Personally Identifiable Information (PII) before sharing or processing.
- Compliance Officers ensuring that data handling complies with regulations like GDPR or HIPAA.
- Business Owners looking to automate data processing tasks to save time and reduce manual errors.
- Developers who want to integrate automated data processing into their applications or services.

Problem Solved

This workflow addresses the challenge of handling sensitive data in CSV files by:
- Automatically monitoring a specified Google Drive folder for new CSV files.
- Identifying and removing columns that contain PII, thus safeguarding personal information.
- Uploading the sanitized files back to Google Drive, ensuring that data privacy is maintained while still allowing access to necessary information.

Workflow Steps

  • Google Drive Trigger: The workflow starts by monitoring a specific Google Drive folder for new CSV files. It checks every minute for any new files added.
    2. Get Filename: Extracts the original filename of the newly created file for later use.
    3. Download File: Retrieves the content of the newly created file from Google Drive.
    4. Extract from File: Processes the downloaded file to prepare the data for analysis.
    5. OpenAI Integration: Sends the tabular data to OpenAI's model to analyze it and identify which columns contain PII.
    6. Merge Data: Combines the results from the OpenAI analysis with the filename for further processing.
    7. Remove PII Columns: Executes a custom JavaScript code to remove the identified PII columns from the dataset and convert the remaining data into CSV format.
    8. Upload to Drive: Saves the sanitized CSV file back to Google Drive with a modified filename indicating that PII has been removed.
  • Customization Guide

    Users can customize this workflow by:
    - Changing the monitored folder: Update the folderToWatch parameter in the Google Drive Trigger to monitor a different folder.
    - Modifying the OpenAI prompts: Adjust the messages sent to OpenAI for different analysis needs or to change the criteria for identifying PII.
    - Altering the file upload settings: Customize the folderId and name parameters in the Upload to Drive node to specify where to save the sanitized files and how to name them.
    - Adding additional processing steps: Insert new nodes between existing ones to perform more complex data manipulation or notifications, such as sending an email when a file is processed.