Automate Multi-CSV Import, Cleanse, And Sync To Google Sheets
detail.loadingPreview
This n8n workflow streamlines the process of importing multiple CSV files into a Google Sheet. It automatically reads data from a specified directory, cleanses it by removing duplicates and filtering for specific criteria, then sorts and uploads the consolidated data to your Google Sheet, ensuring your data is always organized and up-to-date.
About This Workflow
Effortlessly manage your data by automating the often-tedious task of importing multiple CSV files. This powerful n8n workflow is designed to read all CSVs from a designated folder, process each one, and then perform critical data transformations. It intelligently identifies and removes duplicate entries based on a specified field (e.g., user_name), filters records to retain only those meeting your criteria (like subscribed: TRUE), and sorts the final dataset by a key metric (date_subscribed). The cleaned and structured data is then seamlessly appended or updated in your chosen Google Sheet, perfect for maintaining up-to-date subscriber lists, sales leads, or inventory records without manual intervention.
Key Features
- Multi-File CSV Ingestion: Automatically reads and processes all CSV files found in a specified local directory (e.g.,
./.n8n/*.csv). - Intelligent Data Cleansing: Removes duplicate records based on a configurable field (e.g.,
user_name) to maintain data integrity. - Conditional Data Filtering: Keeps only relevant data points by filtering based on specific conditions, such as
subscribed: TRUE. - Dynamic Data Sorting: Organizes your final dataset by a chosen field (e.g.,
date_subscribed) for easy analysis. - Seamless Google Sheets Integration: Appends or updates processed data directly into your Google Sheet, supporting matching columns for robust record management.
How To Use
- Prepare CSV Files: Place all your
.csvfiles into the./.n8n/directory on your n8n instance where the workflow will run. - Configure
Read Binary Files: Ensure thefileSelectorparameter is correctly set to target your CSV files (e.g.,./.n8n/*.csv). - Adjust
Remove duplicates: Update thefieldsToCompareparameter to the column name you want to use for identifying duplicates (e.g.,user_name). - Customize
Keep only subscribers: Modify theconditionsto match your specific filtering needs. For example, changesubscribedandTRUEto other field names and values. - Set
Sort by date: Adjust thefieldNameinsortFieldsUito the column by which you want to sort your data (e.g.,date_subscribed). - Connect
Google Sheets:- Create or select a
Google Sheetscredential. - Specify the
documentId(Google Sheet URL) andsheetName(sheet number or name) where data should be uploaded. - Verify the
matchingColumns(e.g.,user_name) and ensure other column mappings are correct for theappendOrUpdateoperation.
- Create or select a
- Execute Workflow: Click "Execute Workflow" to run it manually, or activate it to run on a schedule.
Apps Used
Workflow JSON
{
"id": "79415e85-041e-4f89-b1b8-6669d7f235a7",
"name": "Automate Multi-CSV Import, Cleanse, And Sync To Google Sheets",
"nodes": 11,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 79415e85-041e...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.