HubSpot
Manage contacts, deals, and CRM data through the HubSpot API from your Spala flows.
HubSpot
The HubSpot addon connects your Spala flows to the HubSpot CRM. Create and update contacts, manage deals, and sync customer data between your application and HubSpot.
Installation
1. Enable the HubSpot addon from the Addons panel 2. Create a private app in HubSpot (Settings > Integrations > Private Apps) 3. Enter the access token in the addon configuration
Configuration
Integrations > Private Apps.' },
Available Steps
Create Contact
Creates a new contact in HubSpot.
Update Contact
Updates an existing HubSpot contact.
Create Deal
Creates a new deal in the HubSpot sales pipeline.
Search Contacts
Searches for contacts matching specified criteria.
Example: Sync New Users to HubSpot
// Event trigger: "user.registered"
// Step 1: Create Contact (HubSpot addon)
// email: event.payload.email
// firstName: event.payload.firstName
// lastName: event.payload.lastName
// properties: {
// company: event.payload.company,
// signup_source: 'web_app',
// plan: 'free'
// }
// Output → vars.hubspotContact
// Step 2: Database Query - Store HubSpot ID // UPDATE users SET hubspot_contact_id = vars.hubspotContact.id // WHERE id = event.payload.userId
Example: Create Deal on Purchase
// Database trigger on insert for the "orders" table
// Step 1: Database Query - Get customer HubSpot ID // SELECT hubspot_contact_id FROM users WHERE id = trigger.newRow.user_id
// Step 2: Create Deal (HubSpot addon)
// dealName: 'Order #' + trigger.newRow.id
// amount: trigger.newRow.total
// stage: 'closedwon'
// properties: { order_id: trigger.newRow.id.toString() }
HubSpot private apps require specific scopes for different operations. Grant crm.objects.contacts.write for contact operations and crm.objects.deals.write for deal operations.
Private app access token from HubSpot. Found in Settings > Integrations > Private Apps. Contact email address. Contact first name. Contact last name. Additional contact properties as key-value pairs. The HubSpot contact ID. Properties to update as key-value pairs. Name of the deal. Deal amount. Pipeline stage (e.g., "qualifiedtobuy", "closedwon"). Additional deal properties. Search query string. Array of filter objects with property, operator, and value. Maximum results to return (default: 10). Addons Overview /addons Browse available addons Installing Addons /addons/installing Enable and configure addons in your project