name: hubspot-companies description: > Sync HubSpot companies into Hissuno. Runs incrementally; cursor advances by hs_lastmodifieddate. OAuth refresh is handled by the credential resolver before this skill runs, so the access token in env is always fresh. version: "1.0" license: MIT metadata: author: hissuno triggers: manual: {} scheduled: { cron: '0 */12 * * *' } capabilities: sandbox: true requires: plugins: [hubspot] timeoutMs: 1800000
HubSpot Companies Sync
Pulls HubSpot companies into Hissuno's companies resource.
What this skill does
- Loads cursor (
lastModifiedSince) fromautomation_skill_state. - Searches CRM companies via HubSpot's search API filtered by
hs_lastmodifieddate >= cursor. - POSTs each as
/api/companieswithexternal_id(HubSpot id) +external_source = 'hubspot'. Batches via{ items: [...] }. - Saves max
hs_lastmodifieddateback as the new cursor.
tsx scripts/sync.ts