Sync Google Sheets Contacts to SeaTable with Update-Insert Logic - n8n Workflow

Automate contact synchronization from Google Sheets to SeaTable using this powerful n8n workflow. Implement smart upsert logic (create or update) ensuring your contact database is always current.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Technical users needing reliable data synchronization between spreadsheet systems.
Sales operations teams managing contacts across multiple platforms.
Users looking for advanced examples of conditional logic (upsert pattern) within an n8n workflow.
Developers needing reusable n8n templates for contact management integration.

Overview

Maintaining contact lists across disparate systems can lead to data fragmentation and errors. This robust n8n workflow addresses this challenge by automating the synchronization of contacts stored in Google Sheets directly into a SeaTable base, utilizing a sophisticated upsert (Update or Insert) strategy.

The core value of this n8n automation is its ability to check for existing records before writing new data. For every contact read from Google Sheets, the n8n node performs a lookup in SeaTable using the email address. If the contact exists, the record is updated with the latest information; if it is new, a fresh record is created. This ensures data integrity and prevents duplication, making this one of the most practical n8n templates for CRM synchronization.

How it Works

This n8n workflow is designed to be executed manually using the initial n8n trigger node:


  1. Initialization: The n8n trigger starts the process. The settings n8n node defines the necessary Google Sheet ID parameter.

  2. Read Contacts: The Google Sheets n8n node named contacts fetches all contact records from the specified spreadsheet.

  3. Batch Processing: The Loop Over Items n8n node processes the incoming list of contacts sequentially, ensuring each contact is handled individually.

  4. SeaTable Lookup: For the current contact item, the seatablelookup n8n node queries the SeaTable base ('Table1') using the contact's email address to determine if the record already exists.

  5. Conditional Check (If n8n node): The If n8n node implements the core logic. It checks if the result of the seatablelookup n8n node is empty.

  6. Insert Logic (True Branch): If the lookup is empty (true), indicating a new contact, the flow proceeds to the Create a row n8n node, which inserts the contact data (email, firstname, lastname, company) into SeaTable.

  7. Update Logic (False Branch): If the lookup returns data (false), indicating an existing contact, the flow proceeds to the Update a row n8n node. This n8n node uses the retrieved SeaTable row ID (_id) to update the existing contact fields with the latest data from the Google Sheet.

Installation Guide

To deploy and use this n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON code and import it into your n8n instance via the Workflow menu.

  2. Configure Credentials:

Set up your Google Sheets API credentials to allow the n8n node to access your sheet documents.
Set up your SeaTable API credentials required for the lookup, creation, and update operations.

  1. Define Google Sheet ID: In the settings n8n node, replace with the actual ID of your source Google Sheet. Ensure your sheet columns match the structure expected (email, firstname, lastname, company).

  2. Configure SeaTable Structure: Ensure your target SeaTable base contains a table named "Table1" with the necessary columns (email, firstname, lastname, company). If you need to set up the table structure programmatically, refer to the documentation in the auxiliary n8n nodes (like Edit Fields and associated HTTP Request) which provide the necessary SeaTable API setup details.

  3. Execution: Click the "Execute workflow" button in the Manual n8n trigger node to start the synchronization process.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger n8n trigger):
Function: Manually initiates the entire data synchronization process, acting as the starting n8n trigger for the run.
Key Configuration: Simple manual execution.
settings (Set n8n node):
Function: Stores the critical googlesheetid parameter used later in the workflow.
Key Configuration: Stores a string value for googlesheetid.
contacts (Google Sheets n8n node):
Function: Reads the contact data from the source Google Sheet document based on the googlesheetid provided by the preceding n8n node.
Key Configuration: Reads from a specific sheet named 'contacts'.
Loop Over Items (Split In Batches n8n node):
Function: Iterates over the list of contacts retrieved from Google Sheets one item at a time. This is essential for per-record processing logic (lookup and upsert).
Key Configuration: Processes items individually.
seatablelookup (SeaTable n8n node):
Function: Performs a lookup operation in SeaTable 'Table1' to check for existing contact records.
Key Configuration: Operation set to search. Searches the email column using the email value of the current contact item.
If (If n8n node):
Function: Implements the core upsert logic for this n8n workflow. Checks if the data returned by the seatablelookup n8n node is empty.
Key Configuration: Condition checks if {{ $json.isEmpty() }} is true.
Create a row (SeaTable n8n node):
Function: Inserts a new row (contact) into SeaTable 'Table1'. This n8n node is executed if the contact is new.
Key Configuration: Maps Google Sheet inputs (email, firstname, lastname, company) to SeaTable columns.
Update a row (SeaTable n8n node):
Function: Updates an existing row (contact) in SeaTable 'Table1'. This n8n node is executed if the contact is found.
Key Configuration: Uses the dynamic row ID {{ $json._id }} retrieved from the lookup result and updates the mapped columns.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Data Sommelier | Sales Architect | Advisor | GTM

Featured*