Skip to main content

Clean & standardize CSV uploads for Google Sheets and Drive import

Workflow preview

Workflow preview
100%
Clean & standardize CSV uploads for Google Sheets and Drive import preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Auto Clean CSV Uploads Before Import This workflow automatically cleans, validates, and standardizes any CSV file you upload. Perfect for preparing customer lists, sales leads, product catalogs,...

Best for

  • Document Extraction automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.googledrive, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by David Olusola.

Original n8n.io source

1.1 Workflow description

Title
Clean & standardize CSV uploads for Google Sheets and Drive import
Workflow name
Clean & standardize CSV uploads for Google Sheets and Drive import

đź§ą Auto-Clean CSV Uploads Before Import

This workflow automatically cleans, validates, and standardizes any CSV file you upload. Perfect for preparing customer lists, sales leads, product catalogs, or any messy datasets before pushing them into Google Sheets, Google Drive, or other systems.


⚙️ How It Works

  1. CSV Upload (Webhook)

    • Upload your CSV via webhook (supports form-data, base64, or binary file upload).
    • Handles files up to ~10MB comfortably.
  2. Extract & Parse

    • Reads raw CSV content.
    • Validates file structure and headers.
    • Detects and normalizes column names (e.g. First Name → first_name).
  3. Clean & Standardize Data

    • Removes duplicate rows (based on email or all fields).
    • Deletes empty rows.
    • Standardizes fields:
      • Emails → lowercased, validated format.
      • Phone numbers → normalized (xxx) xxx-xxxx or +1 format.
      • Names → capitalized (John Smith).
      • Text → trims spaces & fixes inconsistent spacing.
    • Assigns each row a data quality score so you know how “clean” it is.
  4. Generate Cleaned CSV

    • Produces a cleaned CSV file with the same headers.
    • Saves to Google Drive (optional).
    • Ready for immediate import into Sheets or any app.
  5. Google Sheets Integration (Optional)

    • Clears out an existing sheet.
    • Re-imports the cleaned rows.
    • Perfect for always keeping your “master sheet” clean.
  6. Final Report

    • Logs processing summary:
      • Rows before & after cleaning.
      • Duplicates removed.
      • Low-quality rows removed.
      • Average data quality score.
    • Outputs a neat summary for auditing.

🛠️ Setup Steps

  1. Upload Method

    • Use the webhook endpoint generated by the CSV Upload Webhook node.
    • Send CSV via binary upload, base64 encoding, or JSON payload with csv_content.
  2. Google Drive (Optional)

    • Connect your Drive OAuth credentials.
    • Replace YOUR_DRIVE_FOLDER_ID with your target folder.
  3. Google Sheets (Optional)

    • Connect Google Sheets OAuth.
    • Replace YOUR_GOOGLE_SHEET_ID with your target sheet ID.
  4. Customize Cleaning Rules

    • Adjust the Clean & Standardize Data code node if you want different cleaning thresholds (default = 30% minimum data quality).

📊 Example Cleaning Report

Input file: raw_leads.csv

  • Rows before: 2,450
  • Rows after cleaning: 1,982
  • Duplicates removed: 210
  • Low-quality rows removed: 258
  • Avg. data quality: 87%

âś… Clean CSV saved to Drive
âś… Clean data imported into Google Sheets
âś… Full processing report generated


🎯 Why Use This?

  • Stop wasting time manually cleaning CSVs.
  • Ensure high-quality, import-ready data every time.
  • Works with any dataset: leads, contacts, e-commerce exports, logs, surveys.
  • Completely free — a must-have utility in your automation toolbox.

⚡ Upload dirty CSV → Get clean, validated, standardized data instantly!

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Setup Instructions

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - CSV Upload Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1

Block 3 - Extract CSV Content

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Parse CSV Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Clean & Standardize Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Generate Clean CSV

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Save to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - Clear Existing Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 9 - Prepare for Sheets

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Import to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

3. Summary Table

Workflow Clean & standardize CSV uploads for Google Sheets and Drive import
Complexity intermediate
Nodes 10
Categories Document Extraction
Author David Olusola
Published 30 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8054/8054.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Clean & standardize CSV uploads for Google Sheets and Drive import do?

Auto Clean CSV Uploads Before Import This workflow automatically cleans, validates, and standardizes any CSV file you upload. Perfect for preparing customer lists, sales leads, product catalogs,...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.