HubSpot + Salesforce

Connect HubSpot and Salesforce to Unify Your Revenue Stack

Keep marketing and sales in sync by automating data flows between HubSpot and Salesforce in real time.

Why integrate HubSpot and Salesforce?

HubSpot and Salesforce are the two most widely adopted platforms in the modern revenue stack — HubSpot handles marketing automation, lead nurturing, and inbound campaigns, while Salesforce runs enterprise sales pipelines, opportunity management, and customer data. But when these two platforms operate in silos, revenue teams end up with duplicate records, missed handoffs, and conflicting data that erodes trust between marketing and sales. Integrating HubSpot with Salesforce on tray.ai closes those gaps with a bi-directional data bridge that keeps both platforms accurate and authoritative.

Automate & integrate HubSpot & Salesforce

Use case

Bi-Directional Contact and Lead Synchronization

When a lead is created or updated in HubSpot — through a form fill, a campaign enrollment, or a manual import — tray.ai creates or updates the corresponding record in Salesforce, and vice versa. Field mappings are fully customizable, so lifecycle stage, lead source, and custom properties stay consistent across both platforms. Duplicate detection logic keeps data clean in both directions without creating redundant records.

Use case

Automated Lead Handoff from Marketing to Sales

When a HubSpot contact reaches a defined Marketing Qualified Lead threshold — based on lead score, form submission, or workflow enrollment — tray.ai creates a new Lead or Contact record in Salesforce and assigns it to the right sales rep based on territory, round-robin rules, or account ownership. The Salesforce record is enriched with HubSpot engagement history, including email opens, page views, and content downloads, so reps can personalize their outreach right away.

Use case

Salesforce Opportunity Updates Flowing Back to HubSpot

When a sales rep advances, closes, or loses an opportunity in Salesforce, tray.ai pushes that deal stage change back to the associated HubSpot contact or deal record in real time. Marketing teams can use this to trigger re-engagement campaigns for lost deals, suppress closed-won contacts from prospecting sequences, or update lifecycle stages to reflect accurate funnel positions.

Use case

Account and Company Record Synchronization

For B2B teams, keeping Account records in Salesforce aligned with Company records in HubSpot matters for account-based marketing strategies. tray.ai syncs firmographic data, account ownership, and custom fields between both platforms, so ABM campaigns in HubSpot are always targeting the right accounts and Salesforce reflects the latest engagement signals from HubSpot's company-level tracking.

Use case

HubSpot Marketing Activity Logged to Salesforce Records

Sales reps need visibility into every marketing touchpoint their prospects have had, but switching between platforms to gather that context wastes real selling time. With tray.ai, email opens, link clicks, webinar registrations, and content downloads logged in HubSpot are automatically written as activity records or notes on the corresponding Salesforce Lead, Contact, or Account — giving reps a complete engagement timeline without leaving their CRM.

Use case

Salesforce-Triggered HubSpot Campaign Enrollment

Business logic stored in Salesforce — such as contract renewal dates, customer health scores, or deal stage movements — can trigger targeted HubSpot campaign enrollments automatically. When tray.ai detects a qualifying field change in Salesforce, it enrolls the associated contact into the relevant HubSpot workflow, so nurture sequences, upsell campaigns, and customer success outreach go out on time without anyone having to kick them off manually.

Use case

Unified Revenue Reporting Across Both Platforms

Marketing and sales leaders often work from different data sets — HubSpot reports on pipeline influence and campaign performance, while Salesforce tracks quota attainment and opportunity value. tray.ai can aggregate metrics from both platforms into a shared data warehouse, BI tool, or reporting dashboard, giving leadership a single view of revenue performance from first touch through closed-won.

Get started with HubSpot & Salesforce integration today

HubSpot & Salesforce Challenges

What challenges are there when working with HubSpot & Salesforce and how will using Tray.ai help?

Challenge

Avoiding Duplicate Records Across Both Platforms

HubSpot and Salesforce can each create contacts independently — through form fills, manual entry, or data imports — so integrating them without deduplication logic quickly produces duplicate records that corrupt reporting and create conflicting data owned by different teams.

How Tray.ai Can Help:

tray.ai's workflow logic supports email-based record matching, fuzzy deduplication checks, and conditional branching that determines whether to create a new record or update an existing one before writing any data to either platform. Custom rules let you define which system is the master of record for different record types or teams.

Challenge

Managing Field Mapping Complexity Between Different Data Models

HubSpot and Salesforce use fundamentally different data models — HubSpot has Contacts and Companies, Salesforce has Leads, Contacts, and Accounts — and each platform supports extensive custom field configurations that rarely align out of the box between organizations.

How Tray.ai Can Help:

tray.ai's visual workflow builder lets teams define precise field mappings, apply data transformation logic, concatenate or split field values, and handle null or mismatched data gracefully. These mappings are fully versionable and adjustable without engineering support as schemas evolve.

Challenge

Preventing Infinite Sync Loops Between Bi-Directional Workflows

When both HubSpot and Salesforce are configured to push updates to each other, a change in Platform A triggers a write to Platform B, which then triggers a write back to Platform A — an infinite loop that floods both systems with redundant API calls and corrupted timestamps.

How Tray.ai Can Help:

tray.ai prevents loops through sync timestamp comparisons, source tagging on records, and conditional logic that only fires outbound writes when the originating update came from the correct source system. Bi-directional flows stay stable without requiring each platform to know about the other's internal state.

Challenge

Handling Salesforce's Complex Object Hierarchy for Lead Conversion

Salesforce's Lead conversion process — where a Lead becomes a Contact, Account, and Opportunity simultaneously — produces a multi-record event that's difficult to map back to HubSpot's simpler Contact and Deal model, often causing data loss or misaligned lifecycle stages during handoffs.

How Tray.ai Can Help:

tray.ai handles Salesforce Lead conversion events by detecting the conversion, fetching all three resulting records, and applying conditional logic to update or create the appropriate HubSpot records. Lifecycle stages, deal properties, and company associations in HubSpot are updated together to accurately reflect the converted state.

Challenge

Keeping Custom Properties and Schema Changes in Sync Over Time

As both HubSpot and Salesforce schemas evolve — new custom fields added by admins, properties renamed, or data types changed — integrations built on rigid field mappings break silently, causing data to stop flowing without any obvious error signals visible to business users.

How Tray.ai Can Help:

tray.ai workflows include built-in error handling, alerting, and notification steps that surface field mapping failures immediately to the responsible team. Workflow versioning and the visual editor make it straightforward for admins to update field mappings when schemas change without rebuilding integrations from scratch.

Start using our pre-built HubSpot & Salesforce templates today

Start from scratch or use one of our pre-built HubSpot & Salesforce templates to quickly solve your most common use cases.

HubSpot & Salesforce Templates

Find pre-built HubSpot & Salesforce solutions for common use cases

Browse all templates

Template

HubSpot MQL to Salesforce Lead — Automated Handoff

Monitors HubSpot contacts for Marketing Qualified Lead status and automatically creates a new Lead record in Salesforce with full engagement history, assigns it based on routing rules, and notifies the assigned rep via email or Slack.

Steps:

  • Trigger: HubSpot contact property change detects MQL lifecycle stage or lead score threshold reached
  • Lookup: Check Salesforce for existing Lead or Contact record to prevent duplicates
  • Action: Create or update Salesforce Lead with HubSpot contact fields and engagement summary
  • Route: Apply territory or round-robin assignment logic to set Lead Owner in Salesforce
  • Notify: Send Slack or email alert to assigned rep with lead context and HubSpot activity link

Connectors Used: HubSpot, Salesforce

Template

Bi-Directional Contact Sync Between HubSpot and Salesforce

Maintains real-time contact data parity between HubSpot and Salesforce by listening for create and update events in either platform and syncing mapped fields to the other, with built-in deduplication and conflict resolution.

Steps:

  • Trigger: Webhook or polling detects a new or updated Contact in HubSpot or Lead/Contact in Salesforce
  • Deduplicate: Match records by email address to identify existing counterparts in the target system
  • Map: Transform field values according to custom field mapping configuration for each platform
  • Sync: Create or update the record in the target platform with conflict resolution logic
  • Log: Write sync status and timestamp to an audit log for monitoring and reconciliation

Connectors Used: HubSpot, Salesforce

Template

Salesforce Opportunity Closed-Won to HubSpot Lifecycle Update

Automatically updates the associated HubSpot contact and deal record when a Salesforce opportunity reaches Closed-Won, triggering lifecycle stage changes, suppressing the contact from prospecting sequences, and enrolling them in a customer onboarding workflow.

Steps:

  • Trigger: Salesforce opportunity stage change detected as Closed-Won via webhook
  • Lookup: Find the associated HubSpot contact by matching Salesforce Contact or Lead email
  • Update: Set HubSpot lifecycle stage to Customer and update associated deal properties
  • Suppress: Remove contact from any active prospecting or nurture sequences in HubSpot
  • Enroll: Add the contact to a HubSpot onboarding or customer success workflow

Connectors Used: Salesforce, HubSpot

Template

HubSpot Form Submission to Salesforce Campaign Member

When a HubSpot form is submitted for a specific campaign, tray.ai creates or updates the Salesforce Lead and adds them as a Campaign Member with the appropriate status, enabling accurate campaign attribution and ROI reporting inside Salesforce.

Steps:

  • Trigger: HubSpot form submission event fires with form ID and contact data
  • Map: Identify the corresponding Salesforce Campaign based on the HubSpot form or campaign ID
  • Upsert: Create or update the Salesforce Lead/Contact record with submitted field values
  • Enroll: Add the record as a Salesforce Campaign Member with Responded status
  • Confirm: Update HubSpot contact with Salesforce Campaign Member ID for cross-platform tracking

Connectors Used: HubSpot, Salesforce

Template

Salesforce Account Changes Triggering HubSpot ABM Campaign Enrollment

Listens for qualifying changes on Salesforce Account records — such as tier upgrades, renewal dates approaching, or new contract values — and automatically enrolls associated HubSpot contacts into targeted ABM or lifecycle campaigns.

Steps:

  • Trigger: Salesforce Account field update detected matching defined criteria
  • Fetch: Retrieve all Contacts associated with the Salesforce Account
  • Lookup: Match each Salesforce Contact to the corresponding HubSpot contact by email
  • Enroll: Add matched HubSpot contacts to the relevant workflow or list for the campaign
  • Log: Record enrollment details back to the Salesforce Account as a note or activity

Connectors Used: Salesforce, HubSpot

Template

HubSpot Engagement Activity Sync to Salesforce Activity Timeline

Automatically logs HubSpot engagement events — email opens, link clicks, meeting bookings, and content downloads — as tasks or activity records on the corresponding Salesforce Lead or Contact, keeping sales reps informed without leaving their CRM.

Steps:

  • Trigger: HubSpot engagement event webhook fires for email, click, meeting, or document activity
  • Lookup: Identify the matching Salesforce Lead or Contact record by email address
  • Transform: Format the HubSpot engagement payload into a Salesforce Task or Event structure
  • Create: Write the activity record to the Salesforce timeline under the matched record
  • Filter: Apply activity type filters to log only high-intent signals and avoid timeline noise

Connectors Used: HubSpot, Salesforce