/hubspot-pack:hubspot-hello-worldfrom hubspot-pack
Creates, reads, updates, and deletes HubSpot CRM records (contacts, companies, deals) using the HubSpot API and SDK. Useful for starting a new integration or testing API setup.
Ships in hubspot-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create, read, update, and delete CRM records using the HubSpot API. Covers contacts, companies, and deals with real endpoints and SDK methods.
hubspot-install-auth setupcrm.objects.contacts.read, crm.objects.contacts.write@hubspot/api-client installedimport * as hubspot from '@hubspot/api-client';
const client = new hubspot.Client({
accessToken: process.env.HUBSPOT_ACCESS_TOKEN!,
});
// POST /crm/v3/objects/contacts
const contactResponse = await client.crm.contacts.basicApi.create({
properties: {
firstname: 'Jane',
lastname: 'Doe',
email: '[email protected]',
phone: '(555) 123-4567',
company: 'Acme Corp',
lifecyclestage: 'lead',
},
associations: [],
});
console.log(`Created contact: ${contactResponse.id}`);
// Output: Created contact: 12345
// GET /crm/v3/objects/contacts/{contactId}
const contact = await client.crm.contacts.basicApi.getById(
contactResponse.id,
['firstname', 'lastname', 'email', 'phone', 'lifecyclestage'],
undefined, // propertiesWithHistory
['companies'] // associations to include
);
console.log(`${contact.properties.firstname} ${contact.properties.lastname}`);
console.log(`Email: ${contact.properties.email}`);
console.log(`Stage: ${contact.properties.lifecyclestage}`);
// PATCH /crm/v3/objects/contacts/{contactId}
const updated = await client.crm.contacts.basicApi.update(
contactResponse.id,
{
properties: {
lifecyclestage: 'marketingqualifiedlead',
phone: '(555) 987-6543',
},
}
);
console.log(`Updated at: ${updated.updatedAt}`);
// POST /crm/v3/objects/companies
const company = await client.crm.companies.basicApi.create({
properties: {
name: 'Acme Corp',
domain: 'acme.com',
industry: 'TECHNOLOGY',
numberofemployees: '150',
annualrevenue: '5000000',
},
associations: [],
});
// Associate contact with company
// PUT /crm/v4/objects/contacts/{contactId}/associations/companies/{companyId}
await client.crm.associations.v4.basicApi.create(
'contacts',
contactResponse.id,
'companies',
company.id,
[{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 1 }]
);
console.log(`Associated contact ${contactResponse.id} with company ${company.id}`);
// POST /crm/v3/objects/deals
const deal = await client.crm.deals.basicApi.create({
properties: {
dealname: 'Acme Enterprise License',
amount: '50000',
dealstage: 'appointmentscheduled', // default pipeline stage ID
pipeline: 'default',
closedate: '2026-06-30T00:00:00.000Z',
hubspot_owner_id: '12345', // owner user ID
},
associations: [
{
to: { id: company.id },
types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 5 }],
},
{
to: { id: contactResponse.id },
types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 3 }],
},
],
});
console.log(`Created deal: ${deal.properties.dealname} ($${deal.properties.amount})`);
| Error | Code | Cause | Solution |
|---|---|---|---|
409 Conflict | 409 | Contact with email already exists | Use crm.contacts.basicApi.getById or search first |
400 Bad Request | 400 | Invalid property name or value | Check property names in Settings > Properties |
404 Not Found | 404 | Record ID doesn't exist | Verify ID or check if archived |
PROPERTY_DOESNT_EXIST | 400 | Custom property not created | Create in Settings > Properties first |
// POST /crm/v3/objects/contacts/search
const searchResults = await client.crm.contacts.searchApi.doSearch({
filterGroups: [
{
filters: [
{
propertyName: 'email',
operator: 'EQ',
value: '[email protected]',
},
],
},
],
properties: ['firstname', 'lastname', 'email'],
limit: 10,
after: 0,
sorts: [{ propertyName: 'createdate', direction: 'DESCENDING' }],
});
console.log(`Found ${searchResults.total} contact(s)`);
// DELETE /crm/v3/objects/contacts/{contactId}
await client.crm.contacts.basicApi.archive(contactResponse.id);
console.log('Contact archived');
Proceed to hubspot-local-dev-loop for development workflow setup.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flight505/skill-forge --plugin hubspot-pack30 skills in this plugin
/hubspot-advanced-troubleshootingDebug complex HubSpot API issues with systematic isolation and evidence collection.
Use when standard troubleshooting fails, investigating intermittent CRM errors,
or preparing evidence bundles for HubSpot support escalation.
Trigger with phrases like "hubspot hard bug", "hubspot mystery error",
"hubspot intermittent failure", "hubspot deep debug", "hubspot support ticket".
/hubspot-architecture-variantsChoose and implement HubSpot integration architecture for different scales.
Use when designing new HubSpot integrations, choosing between embedded/service/gateway
patterns, or planning architecture for HubSpot CRM applications.
Trigger with phrases like "hubspot architecture", "hubspot design pattern",
"how to structure hubspot", "hubspot integration pattern", "hubspot microservice".
/hubspot-ci-integrationConfigure CI/CD pipelines for HubSpot integrations with GitHub Actions.
Use when setting up automated testing, configuring CI with HubSpot secrets,
or integrating HubSpot API tests into your build process.
Trigger with phrases like "hubspot CI", "hubspot GitHub Actions",
"hubspot automated tests", "CI hubspot", "hubspot pipeline test".
Other plugins' skills for the same job