Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
Diagram showing real-time HubSpot Data Cloud integration flow using Zapier and APIs
Integration

Real-time HubSpot Data Cloud integration using Zapier

A connector that syncs once a day is too slow for a sales team working live leads. Here is how to use Zapier and the Ingestion API to get HubSpot contacts into Data Cloud the second they are created.

The short answer

This guide covers streaming HubSpot contacts into Salesforce Data Cloud in real time with Zapier and the Ingestion API. It walks through the YAML schema and Data Stream setup, the Connected App OAuth scopes, and the Data Cloud token exchange the ingestion call requires.

Key takeaways Upload a YAML schema to the Ingestion API connector before you create the Data Stream in Salesforce Data Cloud. Give the Salesforce Connected App the cdp_ingest_api, api, and refresh_token, offline_access scopes. Trade the standard Salesforce OAuth access token for a Data Cloud token at /services/a360/token before you send anything to the ingestion endpoint. Build the Zapier webhook payload as JSON that matches the field definitions and required attributes in your YAML schema.

If you're looking to build a real-time HubSpot Data Cloud integration, you've probably realized that waiting for a standard connector to sync once a day just doesn't cut it for a fast-moving sales team. I've seen plenty of marketing teams capture hot leads in HubSpot, only for those leads to sit in limbo because the sync schedule is too slow.

You don't have to wait. Zapier and the Salesforce Ingestion API will push those contacts into Data Cloud the second they're created. It's more technical than a "plug and play" connector, but the speed you get back is worth the extra setup. Here is how I get it running without losing my mind over API headers.

Why a HubSpot Data Cloud integration beats nightly syncs

Most teams rely on the out-of-the-box connectors. They work, but they lag. If your reps need to act on a lead while the customer is still thinking about your product, that lag is the whole problem.

A custom HubSpot Data Cloud integration also gives you far more control over your schema. You aren't stuck with whatever fields the standard connector decides to bring over. You define the YAML and the mapping, and you control when the data hits your Data Lake Objects.

Setting up the HubSpot Data Cloud integration foundation

Before we even touch Zapier, we have to prep the Salesforce side. This is where most people get stuck because the UI for Data Cloud isn't exactly intuitive if you're coming from a standard Sales Cloud background.

1. Create the Ingestion API connector

In Setup, head over to Data Cloud, then External Integrations, and find Ingestion API. Create a new one and call it something obvious like "Zapier_HubSpot_Lead_Ingest". Once you save it, it'll tell you a schema is required. That's the next step.

2. The schema upload

You need a YAML file that tells Salesforce what the incoming data looks like. Keep the field names simple. A basic Lead_Data schema looks like this:


# Example Schema
leadId: text
firstName: text
lastName: text
email: text
phone: text
company: text
createdDate: datetime

Upload that YAML in the connector's Schema section. Once that's done, the status will change to "Need Data Stream".

3. Deploy the Data Stream

Go to the Data Stream tab and hit New. Choose the Ingestion API as your source and pick the Lead_Data object you just defined. Set a primary key (usually the HubSpot Email or ID) and an event time. Hit deploy, and you've built the bucket where your data will land.

The Connected App and security

Now Zapier needs a way to talk to Salesforce, which means a Connected App. If you've ever done a Salesforce API integration before, this part will feel familiar, but the scopes here are specific.

When you create the app, include these three scopes:

  • Manage user data via APIs (api)
  • Perform requests at any time (refresh_token, offline_access)
  • Manage Data Cloud Ingestion API data (cdp_ingest_api)

Save your Consumer Key and Consumer Secret. You'll need them in about five minutes.

One thing that trips people up is the double-token dance. You can't just use a standard Salesforce access token to push data; you have to exchange it for a specific Data Cloud token. If you skip this, you'll just get 401 errors all day.

Building the Zapier flow

Now the HubSpot Data Cloud integration logic itself. We're using webhooks because they let us handle the token exchange I mentioned earlier.

The trigger

Set your trigger to "New Contact" in HubSpot. This is the easy part. Pull in a sample contact with all the fields filled out so you can map them later.

Step 1: Get the Salesforce access token

Use a "Webhooks by Zapier" action (Custom Request). Set the method to POST and use the standard Salesforce OAuth URL. You'll send your client_id, client_secret, username, and password as form data. Back comes your initial access token and your instance URL.

Step 2: Exchange for a Data Cloud token

Create another Webhook POST request. This time you're hitting your instance URL plus /services/a360/token. You're telling Salesforce you already have a regular token and you want a Data Cloud token in return.

Step 3: Push the data

Finally, you'll make one last POST to the ingestion endpoint. It looks something like this: https://YOUR_INSTANCE/api/v1/ingest/sources/Zapier_Connector/lead_data. The body needs to be JSON, and it has to match the schema you uploaded earlier.


{
  "data": [
    {
      "leadId": "12345",
      "firstName": "John",
      "lastName": "Doe",
      "email": "[email protected]",
      "company": "Acme Corp"
    }
  ]
}

Testing and verification

Once you turn the Zap on, go into HubSpot and create a dummy contact. Then jump back into Salesforce and open the Data Cloud Query Builder. If everything worked, your dummy contact will be sitting in the Data Lake Object within a minute or two.

If it isn't there, check the Zapier task history. Most of the time it's a typo in the JSON body or a field your YAML schema marked as required and the payload never sent. For more advanced uses of this data, there is this Data Cloud tutorial on grounding AI agents.

Key takeaways

  • Real-time ingestion beats the standard connector's lag every time.
  • The YAML schema must match your Zapier JSON payload exactly.
  • Don't forget the cdp_ingest_api scope in your Connected App.
  • Always exchange your Salesforce token for a Data Cloud token before the final POST.

Setting this up takes more legwork than a standard sync, but once it's running it holds up, and your team gets the data when they need it. Use this pattern whenever you have to move data from a third-party tool into Data Cloud without waiting for the next scheduled sync.

Frequently asked questions

How do you stream HubSpot contacts into Salesforce Data Cloud in real time?

Set up a Salesforce Ingestion API connector and Data Stream from a YAML schema, then build a Zapier webhook flow that fires on new HubSpot contacts. The Zap gets a Salesforce access token, trades it for a Data Cloud token, and posts the contact JSON straight to the Ingestion API endpoint.

What OAuth scopes are required for Salesforce Data Cloud Ingestion API?

The Connected App needs Manage user data via APIs (api), Perform requests at any time (refresh_token, offline_access), and Manage Data Cloud Ingestion API data (cdp_ingest_api).

Why does Salesforce Data Cloud Ingestion API return a 401 unauthorized error?

A 401 comes back when you call the Ingestion API with only a standard Salesforce access token. Trade that token for a dedicated Data Cloud token first by posting to /services/a360/token.

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment