hubspot-known-pitfalls

Featured

Identify and avoid HubSpot API anti-patterns and common integration mistakes. Use when reviewing HubSpot code, onboarding developers to HubSpot integrations, or auditing existing CRM integrations for best practice violations. Trigger with phrases like "hubspot mistakes", "hubspot anti-patterns", "hubspot pitfalls", "hubspot code review", "hubspot gotchas".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# HubSpot Known Pitfalls ## Overview Ten real-world HubSpot API anti-patterns with correct alternatives, covering authentication, rate limits, search, associations, and data handling. ## Prerequisites - Access to HubSpot integration codebase - Understanding of HubSpot CRM v3 API ## Instructions ### Pitfall 1: Using Deprecated API Keys ```typescript // BAD: API keys were deprecated in 2022 and removed from SDK v10+ const client = new hubspot.Client({ apiKey: 'your-api-key' }); // REMOVED // GOOD: Use private app access token const client = new hubspot.Client({ accessToken: process.env.HUBSPOT_ACCESS_TOKEN!, // pat-na1-xxxxx numberOfApiCallRetries: 3, }); ``` --- ### Pitfall 2: Not Using Batch Operations ```typescript // BAD: N API calls to read N contacts (hits rate limit fast) for (const id of contactIds) { const contact = await client.crm.contacts.basicApi.getById(id, ['email']); // 100 contacts = 100 API calls } // GOOD: 1 API call for up to 100 contacts const batch = await client.crm.contacts.batchApi.read({ inputs: contactIds.map(id => ({ id })), properties: ['email', 'firstname'], propertiesWithHistory: [], }); // 100 contacts = 1 API call ``` --- ### Pitfall 3: Ignoring Search Limits ```typescript // BAD: Search API has a hard limit of 10,000 results total // You cannot page past this limit with `after` const allResults = []; let after = 0; do { const page = await client.crm.contacts.searchApi.doSearch({ filterGroups: [], properties: [...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category