- Google Sheets
- Microsoft Excel
Understanding Upserts in HubSpot
What is an Upsert? An upsert operation allows you to both insert new records and update existing ones in a single action.Why can’t we use HubSpot Record IDs? HubSpot’s native Record IDs are read-only fields. This means:- ✅ You can use them to update existing records
- ❌ You cannot use them to insert new records (because new records don’t have Record IDs yet)
Part 1: Setup in HubSpot
Click Settings in HubSpot
Settings button that’s on the navigation bar.
Navigate to Properties
Properties
Create a new property
Create property
Fill in property details

Set field type to Number
Number as the field type.
Make the field unique
Create button on the top right.
Part 2: Setup and Upsert in Superjoin
Create the unique identifier field in Google Sheets

Populate the field with unique values
For existing records
For new records

Choose Update action
Update action and click Next.
Map fields including custom ID
Save and then click Export.
Select entire sheet to update
Entire Sheet option, then click Next and update the data.
Validation complete
Update action can’t insert new data).Your custom field is now validated and ready for upserts! ✅
Choose Upsert action
Upsert action and click Next.
Map fields for upsert
- ✅ Do include: Your custom unique identifier field and all data fields you want to sync
- ❌ Don’t include: HubSpot
Record IDfield or any Superjoin-generated metadata fields (like sync timestamps)
Save and then click Export.
Select rows to upsert
Next and run the upsert.
Upsert complete!
- Existing records (matched by your custom unique ID) were updated
- New records were inserted into HubSpot
- All in one seamless operation!

Below are the steps to automate this process.
Automate the process
Automatic Exports. Click on the Create Schedule button.
Create a schedule

Summary
You’ve successfully set up upserts from Google Sheets to HubSpot! Here’s what you accomplished:- ✅ Created a custom unique identifier field in HubSpot (since Record IDs are read-only)
- ✅ Populated your Google Sheets with unique values
- ✅ Validated the field with an initial update
- ✅ Enabled seamless upserts that can insert new records and update existing ones
Frequently Asked Questions
Can I use multiple primary keys for upserts (e.g., Record ID and my custom unique ID)?
Can I use multiple primary keys for upserts (e.g., Record ID and my custom unique ID)?
- How upserts work: When you perform an upsert, HubSpot looks at the unique identifier field to determine if a record already exists. If it finds a match, it updates that record; if not, it creates a new one.
- Why only one: Having multiple primary keys would create ambiguity. For example, if Record ID matches but your custom ID doesn’t, HubSpot wouldn’t know whether to update the existing record or create a new one.
- Record ID limitation: Remember that HubSpot Record IDs cannot be used as the primary key for upserts because they are read-only and don’t exist for new records yet.
I get an error "Requires Unique ID to upsert" - how do I fix this?
I get an error "Requires Unique ID to upsert" - how do I fix this?
- Create a custom unique field in HubSpot:
- Go to Settings → Properties in HubSpot
- Create a new Number field with the “Unique value” option enabled
- Add the field to Google Sheets:
- Create a column with the same name as your HubSpot field
- Fill it with unique values (use Record IDs for existing records, unique numbers for new records)
- Validate the field:
- Run a one-time Update operation (not upsert) to push the unique values to HubSpot
- This validates the field and populates existing records with your custom IDs
- Now try upsert again:
- Select the Upsert action
- Map your custom unique identifier field
- Your upserts will now work!
Why can't I use HubSpot's Record ID for upserts?
Why can't I use HubSpot's Record ID for upserts?
- ✅ Record IDs work perfectly for updates
- Every existing record already has a Record ID assigned by HubSpot
- ❌ Record IDs don’t exist yet - they’re only assigned after a record is created
- You can’t provide a Record ID when inserting a new record
- This makes Record IDs incompatible with the “insert” part of “upsert”
- An upsert combines insert (create new records) + update (modify existing records) in one operation
- It needs a unique identifier that works for both scenarios
- Create a custom unique identifier field that you control
- For existing records: populate it with Record IDs or other unique values
- For new records: assign unique numbers (e.g., 10001, 10002, etc.)
- This field works for both inserts and updates, enabling true upsert functionality
What if I don't have Record IDs to fill the unique field with?
What if I don't have Record IDs to fill the unique field with?
- Import your HubSpot data:
- Use Superjoin’s import feature to pull data from HubSpot
- Make sure to include the Record ID field in your import
- This will create a sheet with all your existing records and their HubSpot Record IDs
- Populate your custom unique field:
- Copy the Record IDs from the imported data
- Paste them into your custom unique identifier field
- For any new records you want to add, use unique numbers (e.g., 10001, 10002, etc.)
- Continue with the upsert process:
- Follow the validation and upsert steps from this guide
- Your existing records will be matched using the Record IDs you imported
- Existing records: Need their original HubSpot Record IDs so the system can match and update them correctly
- New records: Can use any unique numbers since they don’t exist in HubSpot yet
- Without Record IDs: You risk creating duplicate records instead of updating existing ones