๐ฌ Normalize and validate customer data with Google Sheets highlights
โก 12 views ยท ๐ฌ Document Extraction & Analysis
Description
Quick overview
This workflow manually pulls raw customer records from Google Sheets, normalizes and scores key fields (name, phone, address, gender, dates), then routes results to either a normalized master sheet or a review queue and uses the Google Sheets API to highlight missing cells.
How it works
- Starts on a manual trigger and reads raw customer data from a Google Sheets sheet named
raw_input. - Maps incoming columns into a consistent internal structure (record ID, source, dates, and postal code) for downstream processing.
- Normalizes customer fields (name formatting, phone and postal-code digits, gender mapping, prefecture/address splitting, and date formatting) and computes a completeness score plus a review reason.
- Checks whether the record meets the quality threshold (completeness score 6 80) to determine if it is acceptable.
- Appends accepted records to the
normalized_mastersheet and sends a Google Sheets batchUpdate request to highlight any empty cells. - Appends records needing attention to the
review_queuesheet and sends a Google Sheets batchUpdate request to highlight empty cells for faster review.
Setup
- Create a Google Sheets OAuth2 credential in n8n and connect it to this workflow.
- Replace
YOUR_SPREADSHEET_IDin all Google Sheets and HTTP Request nodes with your target spreadsheet ID. - Ensure the spreadsheet contains sheets named
raw_input,normalized_master, andreview_queuewith columns that match the fields written by the workflow (for example: name, email, phone, prefecture, address, birth_date, status, completeness_score, and review_reason). - Verify the sheet tab IDs used for highlighting (1144211222 for
normalized_masterand 1278913705 forreview_queue) match your spreadsheet, and update them if they differ. - (Optional) Adjust the quality threshold (currently completeness score 6 80) and normalization rules in the code to match your data requirements.
๐ Nodes Used
Google Sheets, HTTP Request
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File