Scripts for automating data imports to HubSpot. Used by Hutson marketing team.
git clone https://github.com/hutsoninc/hubspot-import-automation.gitScripts for automating data imports to HubSpot. Used by Hutson marketing team.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/hutsoninc/hubspot-import-automationCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a Python script to automate importing customer data from a CSV file into HubSpot. The CSV contains [COLUMNS] and the HubSpot properties are [PROPERTIES]. The script should handle [ERROR_HANDLING] and log results to [LOG_FILE].
```python
import csv
import hubspot
from hubspot import HubSpot
import logging
# Configure logging
logging.basicConfig(filename='hubspot_import.log', level=logging.INFO)
# Initialize HubSpot client
client = HubSpot(api_key='your-api-key-here')
# Define CSV file path
csv_file = 'customer_data.csv'
# Define HubSpot property mappings
property_mappings = {
'first_name': 'firstname',
'last_name': 'lastname',
'email': 'email',
'company': 'company',
'phone': 'phone'
}
# Read CSV and import data
with open(csv_file, mode='r') as file:
csv_reader = csv.DictReader(file)
for row in csv_reader:
contact_data = {property_mappings[key]: value for key, value in row.items() if key in property_mappings}
try:
client.crm.contacts.create(contact_data)
logging.info(f'Successfully imported contact: {contact_data['email']}')
except Exception as e:
logging.error(f'Error importing contact {contact_data.get('email', 'unknown')}: {str(e)}')
print('Import process completed. Check hubspot_import.log for details.')
```Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan