Automated PII Removal from CSV Files in Google Drive

somdn_product_page

This n8n workflow automates the process of monitoring a specific Google Drive folder for new CSV files, analyzing their contents, and removing personally identifiable information (PII) before uploading the sanitized files back to Google Drive. It is particularly useful for data privacy compliance and secure data handling without manual intervention.

The workflow begins with a Google Drive trigger that listens for new files created in a designated folder. When a new CSV file appears, it downloads the file and extracts its filename and content. Next, it splits out the filename details for processing.

The core step involves using OpenAI’s GPT-4 model to analyze the tabular data and identify columns containing PII, based on a prompt asking for column names only. The list of identified PII columns is then passed to a custom code node, which removes these columns from the dataset. The sanitized data is converted back into CSV format with an updated filename indicating PII removal.

Finally, the cleaned CSV file is uploaded to a different folder within Google Drive, completing the automation cycle. This workflow streamlines data sanitization, making data safer for sharing or storage compliance, especially in environments handling sensitive personal data.

Ideal use cases include GDPR or CCPA compliance, data anonymization before analysis or sharing, and automating routine data cleanup tasks within Google Drive.

Node Count

6 – 10 Nodes

Nodes Used

@n8n/n8n-nodes-langchain.openAi, code, extractFromFile, googleDrive, googleDriveTrigger, merge, splitOut, stickyNote

Reviews

There are no reviews yet.

Be the first to review “Automated PII Removal from CSV Files in Google Drive”

Your email address will not be published. Required fields are marked *