A data migration tool that downloads data from HubSpot and converts it into CSV files ready to import into Salesforce Free CRM.
- Downloads Companies, Contacts, and Deals from HubSpot
- Converts HubSpot data to Salesforce format keeping the associations between objects
- Generates two CSV files in the
output/directory:accounts_contacts.csv- HubSpot Companies → Salesforce Accounts; HubSpot Contacts → Salesforce Contactsopportunities.csv- HubSpot Deals → Salesforce Opportunities
- Skips invalid records and logs them into the following CSV files:
errors_accounts_contacts.csverrors_opportunities.csv
The tool can migrate up to 50,000 records per CSV file.
Accounts & Contacts:
- Open Accounts → Import → Data Import Wizard
- Select "Accounts and Contacts" - "Add new records"
- Match Contact by Name, Match Account by Name & Site
- Choose CSV with Character Code option set to Unicode (UTF-8)
- Upload
accounts_contacts.csvby pressing the Browse button and follow the wizard
Opportunities:
- Open Sales → Opportunities → Import
- Select "Import From File"
- Upload
opportunities.csvand follow the wizard - When import has finished, perform the association step described below
The tool persists Account name in the Next Step field of the Opportunity. To complete the association create and run the Flow automation in Salesforce as shown in the following video:
Create a legacy private app in your HubSpot account:
- Go to Settings → Integrations → Private Apps
- Create a new app with read scopes for: Companies, Contacts, Deals
- Copy the access token
- Set the access token as
HUBSPOT_TOKENenvironment variable within.envfile
-
Clone the repository
git clone https://github.com/IvanRublev/hb2sffree cd hs2sffreeOr download as a zip archive by pressing the Code -> Download ZIP.
-
Install Python and uv
macOS:
# Using asdf asdf install # Or using Homebrew brew install [email protected] brew install uv
Windows:
- Download Python 3.12+ from python.org and run the installer
- Download and install uv from astral.sh/uv
-
Install dependencies
uv sync
-
Run the tool
python main.py
This project is licensed under the MIT License.
