Par Jb-P - Jean-Baptiste Ronssin - @jbronssin
GitHub Repository: https://github.com/Jb-P-org/hubspot_tools
This is 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.
- Extract field names from a specific Hubspot object or all objects
- Extract data samples from a specific Hubspot object or all objects
- Delete records in bulk for any Hubspot object type
- User-friendly command-line interface with improved menu structure
- Error handling and logging
- Clone the repository
- Install the requirements by running
sh pythonstarter.shin your terminal (this will install all the necessary tools to run the script) - At the end of the installation, you'll be prompted to enter your Hubspot API key. You can find it in your Hubspot account under
Settings->Account Setup->Integrations->Private Apps. - Run the script by executing
python3 hubspot_tools.pyin your terminal
Note: You can interrupt the script at any time by pressing Ctrl+C.
The script now offers a more intuitive menu structure:
- Extract fields
- All objects
- Specific object (you can choose from a list)
- Extract data sample
- All objects
- Specific object (you can choose from a list)
- Delete records from a CSV file
- Exit
For options 1 and 2, you can further choose between recent or random data samples.
The script will create the following folders if they don't exist:
extract: Contains CSV files with extracted field information and data samplesdelete: Place CSV files containing record IDs to be deleted hereerrors: Contains error logs from deletion operations
When deleting records, name your CSV files according to the object type, e.g., contacts.csv, companies.csv, deals.csv, etc. The script will recognize both singular and plural forms (e.g., both contact.csv and contacts.csv will work for contacts).
Contributions are welcome! Feel free to add new features, fix bugs, or improve documentation. You can also contact me if you have any questions or suggestions.
This project is licensed under the MIT License - see the LICENSE file for details. This means you can use, modify, and distribute the code freely, but I'm not liable for any consequences of its use. If you create something cool with it, I'd love to hear about it! However, please don't use it for commercial purposes without permission.
Don't forget to star the project if you find it helpful!
