Mindket

PII columns removed from Google Drive CSV files by AI

Newversion 1 · updated

Overview

An n8n workflow that removes personal data columns from CSV files. It watches a Google Drive folder, has an OpenAI model name the columns that hold personal data and saves a cleaned copy in a second folder.

PII columns removed from Google Drive CSV files by AI is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps
  • Other storage: swap the Drive nodes for another storage node
  • Another model: change the model in OpenAI

Platform

Connects 2 apps

How it works

Trigger

New file in Google Drive

It starts when a file appears in the Drive folder you watch, with:

  • The file’s name
  • The CSV file, downloaded as binary data

Actions

  1. The CSV file is downloaded and read into one item for each row
  2. OpenAI gets the column names and the first row, and names the columns that hold personal data
  3. The answer, the file name and the rows are put into one list
  4. The named columns are dropped from every row, and a new CSV is built
  5. The cleaned file is saved in the second Drive folder with `_PII_removed` added to its name

Result

A cleaned copy of the CSV file in the second Drive folder, without the columns the model named

Integrations

What you need before you start.

Google Drive

File storage

Detects each new CSV file, downloads it and saves the cleaned copy.

NeedsA Google account and two Drive folders

OpenAI

Language model

Names the columns that hold personal data from the column names and the first row.

NeedsAn OpenAI API key

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
9 steps, starting on a Google Drive event
AI
1 step calls an AI model: OpenAI
Sign-ins
Signs in to: Google Drive and Google service account
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 7 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow cleans CSV files of personal data. It watches a Google Drive folder, and each new CSV file is read into rows. An OpenAI model looks at the column names and the first row, and names the columns that hold personal data. A Code node drops those columns, and the cleaned file goes to a second Drive folder. Nine nodes do the work, beside one sticky note.

Who it suits

Analysts, marketers and support teams who share exports and want names, emails or phone numbers out first. The model judges from one row, so it can miss a column or flag a harmless one. Review the output before you share it, and keep the original file private.

Who uses it, and how
IndustryWho uses itHow they use itExample
MarketingAnalystsShare a campaign export without contact detailsAn analyst drops a signup list in the folder and shares the cleaned copy with an agency.
SupportSupport leadsSend ticket data to a vendor with the customer columns removedA lead removes the name and email columns of a ticket export before the file leaves the team.
ResearchData teamsPrepare a survey file for wider useA team cleans a survey export before it goes into a shared workspace.
OperationsOffice managersTidy a file before an outside requestA manager removes the personal columns of a customer list before a partner sees it.

You need some n8n skill: import a file, add two accounts and choose two Drive folders. Nothing in the file states a setup time.

Where to use it

Any n8n that can reach Google Drive and OpenAI will run it.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps
  • Other storage: swap the Drive nodes for another storage node
  • Another model: change the model in OpenAI

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Make the two Drive folders first.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
GoogleA Google account and two Drive folders, one to watch and one for the cleaned files
OpenAIAn API key
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Google Drive credential and select it in Google Drive Trigger, Google Drive and Upload to Drive.
  3. In Google Drive Trigger, choose the folder to watch. It must not be the folder that Upload to Drive writes to.
  4. In Upload to Drive, choose the folder for the cleaned files.
  5. Add an OpenAI credential and select it in OpenAI.
  6. Publish the workflow and drop a CSV file into the watched folder.

How to use it

Publish the workflow and drop one CSV file at a time into the watched folder. The trigger checks the folder every minute. The cleaned copy, named with _PII_removed before the extension, lands in the second folder. Open it and check the columns.

What to change for a different result
To changeWhere
The two foldersGoogle Drive Trigger and Upload to Drive
What counts as personal dataThe system message in OpenAI
The modelOpenAI
The name of the cleaned fileThe code of Remove PII columns

Example

You drop customers.csv, with the columns name, email, city and plan, into the folder.

First Google Drive Trigger sees the file, Google Drive downloads it and Extract from File turns its rows into items. Then OpenAI reads the column names and the first row, and answers with name, email. After that Merge puts the answer, the file name and the rows into one list. At the end Remove PII columns drops the two columns, and Upload to Drive saves customers_PII_removed.csv in the second folder.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A CSV file is a text table, with one row in each line and the column names in the first line. PII means personal data, such as a name, an email address or a phone number.

For experts. The Code node counts on the order of the merged list, so keep the three inputs where they are.

Where to look closer
NodeWhat it doesWhat to know
Get filenameA Split Out node that copies name into originalFilename, set to run onceIt reads only the first file of a poll
OpenAIAn OpenAI node 1.7 on gpt-6-luna with JSON output, set to run onceIt gets the column names and the values of the first row, and answers in the key content
MergeA Merge node 3 with three inputs, in its default mode, AppendThe list is the column answer, then the file name, then every row
Remove PII columnsA Code node that drops the named columns and builds the CSV againIt strips commas from values, and it stops with an error when the model names no column
Upload to DriveA Google Drive node that creates a file from textThe name is the original name with _PII_removed added

Good to know

One row of your data goes to OpenAI, and the model only guesses.

  • One row leaves: the column names and the first row of values go to OpenAI, so one row of personal data is sent. The rest of the file stays in Drive and n8n
  • A guess from one row: the model can miss a column or flag a harmless one, so check the cleaned file
  • One file at a time: the two nodes set to run once read only the first item of a poll, so drop one file and wait for the run
  • Only CSV: a file of another kind makes Extract from File fail
  • Two folders: if the watched folder and the output folder are the same, the workflow reads its own output and loops
  • Plain output: commas inside values are removed so the CSV does not break, and the quoting of the original is not kept
  • No columns found: the Code node stops with an error when the model names no column
  • Repairs: the code wrote row[header] || '', so a cell with the number 0 came out empty. Mindket’s copy uses ??. The folder ids are placeholders. The model gpt-4o-mini, which OpenAI’s deprecations page says is shut down on 14 January 2027, is now gpt-6-luna
  • Mindket did not run it, and it did not test JSON output on gpt-6-luna. It read OpenAI’s and n8n’s documentation and n8n’s source

README and files

README

PII columns removed from Google Drive CSV files by AI

An n8n workflow that removes personal data columns from CSV files. It watches a Google Drive folder. For each new CSV file, an OpenAI model names the columns that hold personal data, and a Code node drops them. The cleaned file goes to a second Drive folder.

What is inside

  • workflow.json: the workflow as n8n exports it, 9 nodes beside 1 sticky note. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The model gpt-4o-mini is shut down on 14 January 2027, says OpenAI’s deprecations page, read on 12 November 2026. It names gpt-6-luna as the replacement, and Mindket’s copy uses it. The step has no tools, so a note about tools on that model does not apply.
  • The Code node wrote row[header] || '', which turns a cell with the number 0 into an empty cell. Mindket’s copy writes row[header] ?? ''.
  • The two Drive folders were the original author’s own. They are placeholders now.
  • The sticky note is reworded.
  • No credential is inside.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • A Google account and two Drive folders: one to watch and one for the cleaned files.
  • An OpenAI API key.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Google Drive credential and select it in Google Drive Trigger, Google Drive and Upload to Drive.
  3. In Google Drive Trigger, choose the folder to watch. It must not be the folder that Upload to Drive writes to.
  4. In Upload to Drive, choose the folder for the cleaned files.
  5. Add an OpenAI credential and select it in OpenAI.
  6. Publish the workflow and drop a CSV file into the watched folder.

How a run goes

  1. Google Drive Trigger checks the folder every minute and starts a run for a new file. Get filename keeps the name of the file in originalFilename, and Google Drive downloads the file.
  2. Extract from File reads the CSV, in its default operation, and returns one item for each row.
  3. OpenAI gets the column names and the first row. It answers in JSON with the key content, a list of column names separated by commas. Get result copies that text into data.
  4. Merge puts three inputs into one list, in this order: the answer, the file name and every row.
  5. Remove PII columns reads the column names from the first item and the file name from the second. It drops those columns from the rows, strips commas from the values and builds a new CSV.
  6. Upload to Drive saves the new file, named with _PII_removed before the extension, in the second folder.

Change the look

  • The two folders: Google Drive Trigger and Upload to Drive.
  • What counts as personal data: the system message in OpenAI.
  • The model: OpenAI.
  • The name of the cleaned file: the code of Remove PII columns.

Good to know

  • The column names and the first row of values go to OpenAI, so one row of personal data is sent. The rest of the file stays in Drive and n8n.
  • The model only sees one row. It can miss a column or flag a harmless one, so check the cleaned file.
  • Get filename and OpenAI are set to run once. They read only the first item of a poll, so drop one file and wait for the run.
  • A file that is not a CSV makes Extract from File fail.
  • If the watched folder and the output folder are the same, the workflow reads its own output and loops.
  • Commas inside values are removed so the CSV does not break, and the quoting of the original is not kept.
  • The Code node stops with an error when the model names no column.
  • Mindket did not run this workflow, and it did not test JSON output on gpt-6-luna. It read OpenAI’s and n8n’s documentation and n8n’s source.
  • The JSON holds no credential.
Files
NOTICE.md  702 B
README.md  4 KB
workflow.json  9 KB

3 files, 13 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Business

See all in Business

pplx-decider-v1.1-27b

perplexity-ai · Kit

Picks the best option for a decision from text and images, such as which team should handle a request, with a probability for each choice, for developers who b…

New

NuExtract3

numind · Kit

Reads documents as text or images and fills a JSON template with the fields you ask for, or converts the pages to Markdown. A 4B model for teams that process s…

New

Drex DLM

nace-ai · Kit

Scores yes or no, multiple choice and rating questions about a document in one pass, with a probability for every option. An 8B decision model from Nace.AI tha…

New