HubSpot Community Blog

SNigam
by:
Key Advisor

Solving a HubSpot Sandbox Sync Issue: A Step-by-Step Guide

Hey HubSpot Community,

 

While exploring HubSpot sandbox sync settings, I recently encountered an issue and wanted to share my experience and solution. This can help others who might face similar challenges.

 

## The Issue

 

While trying to sync a workflow from our production portal to the sandbox, I accidentally left the default settings, which led to syncing the workflow and all object definitions and properties. This resulted in our sandbox environment getting cluttered with properties that were not supposed to be there.

 

## The Challenge

 

Unfortunately, currently, HubSpot doesn’t have an option to revert such changes directly from the interface. I reached out to HubSpot support, but their also no success, and couldn't get a solution to undo the sync. 

 

## The Solution

 

After spending some time exploring potential workarounds, I discovered the "Property Insights" feature under data quality in HubSpot. Here’s how I managed to clean up the unwanted properties:

 

  1. Identify Unwanted Properties: I noticed that some properties in each object did not have an update date or source value. These were the ones that needed deletion.

   

  1. Bulk Deletion Limitation: The Property Insights feature does not support bulk deletion, which poses another challenge.

 

  1. Using HubSpot API: To overcome this, I decided to leverage the HubSpot API. Here’s a step-by-step outline of what I did:

   

  • Filter Properties by Creation Date and User ID: Since all synced properties were created by me during the sync because I was the one who set up a sync so that’s why HubSpot picked me as a creator, I filtered them using the creation date, and my user ID.
  • Archive Properties: I wrote a script using the HubSpot API to archive these properties.

 

## Steps to Implement the Solution

 

Here’s a basic outline of the steps I followed:

 

  1. Get API Key: Ensure you have your HubSpot API key.
  2. Identify Properties: Use Property Insights to find the unwanted properties.
  3. Write Script: Use the HubSpot API to write a script that filters and archives the properties.

 

You can find my detailed code and implementation on my GitHub repository

 

## Community Contribution

 

I have also submitted an idea to the HubSpot community to consider adding a feature that allows for bulk deletion of properties directly from Property Insights. You can support this request by voting for it here.

 

---

 

Sharing this will help anyone facing a similar situation. Feel free to reach out if you have any questions or need further assistance.

 

Happy HubSpotting!

 

Best,

Shubham Nigam

Indian HubSpot Expert

6 Comments