2024-09-19 10:38:03 -06:00
|
|
|
=================
|
|
|
|
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.
|
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
Activities Export
|
|
|
|
-----------------
|
|
|
|
Activities appear to be emails and such sent to contacts.
|
|
|
|
These are not in the contacts export.
|
|
|
|
|
|
|
|
|
2024-09-19 10:38:03 -06:00
|
|
|
Hubspot API
|
|
|
|
===========
|
|
|
|
Some data in Hubspot cannot be exported, it needs to be retrieved via the API.
|
|
|
|
|
|
|
|
API reference:
|
|
|
|
|
|
|
|
`<https://developers.hubspot.com/beta-docs/reference/api>`_
|
|
|
|
|
|
|
|
API guide:
|
|
|
|
|
|
|
|
`<https://developers.hubspot.com/beta-docs/guides/api>`_
|
|
|
|
|
|
|
|
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."
|
|
|
|
|
|
|
|
`<https://developers.hubspot.com/beta-docs/guides/api/crm/engagements/engagement-details>`_
|
|
|
|
|
|
|
|
Python code for API:
|
|
|
|
|
|
|
|
`<https://github.com/HubSpot/hubspot-api-python>`_
|
|
|
|
|
|
|
|
`<https://pypi.org/project/hubspot-api-client/>`_
|
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
Hubspot Python Client
|
|
|
|
---------------------
|
|
|
|
|
2024-09-19 10:38:03 -06:00
|
|
|
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:
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
sudo apt install python3-venv python3-pip python-is-python3
|
2024-09-19 10:38:03 -06:00
|
|
|
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
|
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
Extract Clients
|
|
|
|
---------------
|
|
|
|
Create a hubspot-extract-clients.py script:
|
2024-09-19 10:38:03 -06:00
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
.. code-block:: sh
|
2024-09-19 10:38:03 -06:00
|
|
|
|
2024-09-19 10:44:48 -06:00
|
|
|
#!/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()
|
2024-09-19 10:38:03 -06:00
|
|
|
|
2024-09-19 11:22:48 -06:00
|
|
|
|
|
|
|
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."
|
|
|
|
|
|
|
|
`<https://github.com/withfriendsco/hubspot-exporter>`_
|
|
|
|
|
|
|
|
Maybe some code hints from here:
|
|
|
|
|
|
|
|
`<https://github.com/ideabosque/hubspot_connector>`_
|
|
|
|
|
|
|
|
"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."
|
|
|
|
|
|
|
|
`<https://github.com/Jb-P-org/hubspot_tools>`_
|
|
|
|
|
|
|
|
"This repository contains the properties and their descriptions of various
|
|
|
|
objects from HubSpot."
|
|
|
|
|
|
|
|
`<https://github.com/officialkrunalkumar/000-HubSpot-Properties>`_
|
|
|
|
|
|
|
|
"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?
|
|
|
|
|
|
|
|
`<https://github.com/degreed-data-engineering/tap-hubspot>`_
|
|
|
|
|
|
|
|
"This hubspot api is a handy wrapper on top of the existing hubspot python api."
|
|
|
|
|
|
|
|
`<https://github.com/mannum/hubspot-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."
|
|
|
|
|
|
|
|
`<https://github.com/Leenaguduru14/RevOps_Integration>`_
|
|
|
|
|
|
|
|
"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."
|
|
|
|
|
|
|
|
`<https://github.com/scalero-inc/hubspot-lists>`_
|
|
|
|
|
|
|
|
"The script will create a CSV of all companies in your Hubspot with a
|
|
|
|
column for name, full address, latitude, and longitude."
|
|
|
|
|
|
|
|
`<https://github.com/RobertDWhite/hubspot-company-gps-coordinates>`_
|
|
|
|
|
|
|
|
Finds duplicate Hubspot records.
|
|
|
|
|
|
|
|
`<https://github.com/HL3rd/HubSpot-Duplicate-Checker>`_
|
|
|
|
|
|
|
|
"A Python utility package for interacting with HubSpot's CMS API, providing
|
|
|
|
functionality to create, update, retrieve, and delete pages efficiently."
|
|
|
|
|
|
|
|
`<https://github.com/jenksed/hs_utils>`_
|
|
|
|
|
|
|
|
"Python library to interact with HubSpot's Private API."
|
|
|
|
|
|
|
|
`<https://github.com/Erol444/hubspot-api>`_
|
|
|
|
|
|
|
|
"This repo contains the HubSpot backend project files which
|
|
|
|
was implemented using Python."
|
|
|
|
|
|
|
|
`<https://github.com/seyed-ruzaik/HubSpot-Backend>`_
|
|
|
|
|
|
|
|
"A repo contains utility functions and scripts for interacting
|
|
|
|
with the HubSpot API."
|
|
|
|
|
|
|
|
`<https://github.com/jacktse0225/hubspot_api_utils>`_
|
|
|
|
|
|
|
|
"Tapioca wrapper for Hubspot API."
|
|
|
|
|
|
|
|
`<https://github.com/timsmithenject/tapioca_hubspot>`_
|