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_apiscope 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.
Leave a Comment