Hubspot Migration
HOWTO migrate data from Hubspot.
Hubspot Export
Documentation on migrating from Hubspot to CiviCRM.
Data to migrate:
Contacts.
Contacts Export
Hubspot can export contacts in these formats, all of which should export identical data.
CSV.
XLS.
XLSX.
Go to CRM –> Contacts and click the “Export” button on the right side.
For “Customize” export, it has options:
Include all email addresses.
Properties options.
Associations.
Use these options for the most complete export:
Include all email addresses: Checked.
All properties and all associations on records: Selected.
Include all associated record in each association column: Selected.
Click “Export” and it will present a link to an “Import and Export” page, where it will show the progress of the export. It will take approximately 1 minute per 1,000 records to export. The unzipped export will be approximately 2.5 megs per 1,000 records. The export will have over 500 columns.
Companies Export
Companies can be exported.
Go to CRM –> Companies and click the “Export” button on the right side.
Use these options for the most complete export:
File format: CSV
Include all company domains: Checked.
All properties and associations on records: Selected.
Include all association records in each association column.
Deals Export
Go to CRM –> Deals and click the “Export” button on the right side.
File format: CSV
Include all company domains: Checked.
All properties and associations on records: Selected.
Include all association records in each association column.
Tickets Export
Go to CRM –> Tickets and click the “Export” button on the right side.
Lists Export
Various mailing lists.
Go to CRM –> Lists and click the “Actions” button on the right side, then select “Export”.
Name: All lists.
Format: CSV.
Choose what you’d like to export: All available list dashboard data.
Inbox Export
HOWTO export?
Calls Export
Go to CRM –> Calls and click the “Export” button on the right side.
File format: CSV.
Language of column headers: English.
All properties and associations on records: Selected.
Include all association records in each association column.
Tasks Export
Uncheck “Assignee” to view all tasks.
HOWTO export?
Marketing Email
Go to Marketing –> Email and click the “Export emails” button on the right side.
Export: Dashboard Emails.
File Format: CSV.
Send to: Email address of logged in Hubspot user.
Columns: All available columns.
Date: All time.
Advanced options, Include advanced delivery data: checked.
Note, this export will not appear in the “Import and Export” page, unlike most other exports.
Marketing Forms
Go to Marketing –> Forms and click the “Actions” button on the right side, then select “Export forms”.
Name: All forms.
Format: CSV.
Send to: Email address of logged in Hubspot user.
Choose what you’d like to export: All available form dashboard data.
Marketing CTAs (legacy)
Go to Marketing –> CTAs (legacy) and click “Export Data”.
File format: CSV.
Send to: Email address of logged in Hubspot user.
Note, this export will not appear in the “Import and Export” page, unlike most other exports.
Commerce Products
Go to Commerce –> Products and click on the “Export” button.
File format: CSV.
Language of column headers: English.
All properties and all associations on records: Selected.
Include all associated record in each association column: Selected.
Automations Workflows
Go to Automations –> Workflows, click the “Actions” button, then “Export workflows”.
Name: All workflows.
Format: CSV.
Send to: Email address of logged in Hubspot user.
Choose what you’d like to export: All available workflow dashboard data.
Activities Export
Activities appear to be emails and such sent to contacts. These are not in the contacts export.
Hubspot API
Some data in Hubspot cannot be exported, it needs to be retrieved via the API.
API reference:
API guide:
Per Hubspot docs:
“Activities on records, such as notes or emails, cannot be exported. To retrieve activities, you can export certain activity reports or use the engagements API.”
Python code for API:
Hubspot Python Client
The best way to use the Hubspot API appears to be to set up a read-only “Private App”.
Set up a Python client thusly:
sudo apt install python3-venv python3-pip python-is-python3
mkdir hubspot-client
cd hubspot-client/
python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install hubspot-api-client
Extract Clients
Create a hubspot-extract-clients.py script:
#!/usr/bin/env python
from hubspot import HubSpot
api_client = HubSpot()
api_client.access_token = 'access_token'
all_contacts = api_client.crm.contacts.get_all()
Hubspot Python Code
Third party source repos with Python code for working with Hubspot.
“A Python script for exporting data from HubSpot CRM to a local SQLite database and CSV files. This tool fetches companies, contacts, notes, tasks, calls, and their associations from HubSpot’s API, stores them in a SQLite database, and exports the data to CSV files.”
Maybe some code hints from here:
“A versatile script designed to assist Hubspot administrators, consultants, and power users in managing their Hubspot data. It provides various functionalities including field extraction, data sampling, and bulk record deletion.”
“This repository contains the properties and their descriptions of various objects from HubSpot.”
“This repository contains a Meltano tap extractor designed to pull data from hubspot.com. It leverages the Meltano SDK to facilitate its functionality.” XXX Meltano is libre?
“This hubspot api is a handy wrapper on top of the existing hubspot python api.”
“This project integrates Hubspot data sources into a unified data warehouse for reporting and analysis. It includes scripts for data extraction, transformation, and loading , as well as SQL views for reporting.”
“This project contains a simple script that extracts a list of contacts from Hubspot, adds it to a pandas DataFrame and finally saves it to a CSV file.”
“The script will create a CSV of all companies in your Hubspot with a column for name, full address, latitude, and longitude.”
Finds duplicate Hubspot records.
“A Python utility package for interacting with HubSpot’s CMS API, providing functionality to create, update, retrieve, and delete pages efficiently.”
“Python library to interact with HubSpot’s Private API.”
“This repo contains the HubSpot backend project files which was implemented using Python.”
“A repo contains utility functions and scripts for interacting with the HubSpot API.”
“Tapioca wrapper for Hubspot API.”
“HubSpot tap class.”
“Hubspot tap for Conversations inbox and messages APIs.”
“Hubspot CRM python API wrapper.”
“Script to extract all deal history.”