Automate HubSpot with TypeScript
Manage HubSpot contacts, companies, deals, tickets, activities, associations, owners, properties, and pipelines. Trigger automations from account-wide CRM lifecycle events.
import { automation } from "automate.ax"
import { hubspot } from "automate.ax/hubspot"
export default automation("Follow up on new HubSpot contacts", () => {
const contact = hubspot.onContactCreated()
hubspot.createTask({
timestamp: contact.occurredAt,
subject: "Qualify the new contact",
taskType: "TODO",
associations: [{
toRecordId: contact.objectId,
types: [{ associationCategory: "HUBSPOT_DEFINED", associationTypeId: 204 }],
}],
})
})What you can do
Actions
- List, search, create, update, and archive core CRM records
- Batch upsert contacts and manage record associations
- Log calls and emails, and create meetings, notes, and tasks
- Inspect owners, properties, pipelines, and association labels
Triggers
- Contact, company, deal, and ticket creation
- Property changes, deletion, merge, and restore events
- Association additions and removals
- Broad HubSpot CRM lifecycle events