hubspot-performance-tuning

Featured

Optimize HubSpot API performance with caching, batching, and search optimization. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for HubSpot CRM operations. Trigger with phrases like "hubspot performance", "optimize hubspot", "hubspot slow", "hubspot caching", "hubspot batch", "hubspot latency".

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 Performance Tuning ## Overview Optimize HubSpot API performance through batch operations, caching, search optimization, and request minimization. ## Prerequisites - `@hubspot/api-client` installed - Understanding of your access patterns (read-heavy vs write-heavy) - Optional: Redis for distributed caching ## Instructions ### Step 1: Use Batch APIs Everywhere The single biggest performance win: batch operations reduce API calls by up to 100x. ```typescript import * as hubspot from '@hubspot/api-client'; const client = new hubspot.Client({ accessToken: process.env.HUBSPOT_ACCESS_TOKEN!, numberOfApiCallRetries: 3, }); // BAD: 100 API calls for 100 contacts async function getContactsSlow(ids: string[]) { return Promise.all(ids.map(id => client.crm.contacts.basicApi.getById(id, ['email', 'firstname']) )); } // GOOD: 1 API call for 100 contacts async function getContactsFast(ids: string[], properties: string[]) { // POST /crm/v3/objects/contacts/batch/read const result = await client.crm.contacts.batchApi.read({ inputs: ids.map(id => ({ id })), properties, propertiesWithHistory: [], }); return result.results; } // For more than 100 records, chunk: async function getContactsChunked(ids: string[], properties: string[]) { const results = []; for (let i = 0; i < ids.length; i += 100) { const chunk = ids.slice(i, i + 100); const batch = await getContactsFast(chunk, properties); results.push(...batch); } return res...

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