Automate HubSpot → Salesforce Data Cloud Ingestion with Zapier

A practical guide to using Zapier and the Salesforce Data Ingestion API to push HubSpot leads into Salesforce Data Cloud in near real-time. Includes setup, schema, Zap configuration and testing tips.

Why this integration matters

Marketing teams often capture leads in HubSpot while sales teams work in Salesforce. Waiting for nightly syncs delays follow-up. By using Zapier with the Salesforce Data Ingestion API you can push HubSpot contacts into Salesforce Data Cloud immediately — improving response times and conversion rates.

Overview

This guide walks through:

  • Preparing Salesforce Data Cloud Ingestion API (connector, schema, data stream)
  • Creating a Salesforce connected app for authentication
  • Building a Zap in Zapier that obtains tokens and calls the Ingestion API
  • Testing and verifying data in the Data Cloud query builder

1. Set up Salesforce Data Cloud

1.1 Configure an Ingestion API connector

In Setup, go to Data Cloud → External Integrations → Ingestion API and create a new connection (for example, “Zapier Connector”). After creating it, the connector status will show schema required.

1.2 Upload an API schema

Create an API schema (YAML) that defines your incoming object — e.g. Lead_Data with fields such as leadId, firstName, lastName, email, phone, company, campaignSource, createdDate. Upload the YAML in the connector’s Schema section. After upload the connector status will change to Need Data Stream.

1.3 Create and deploy a Data Stream

From the Data Stream tab click New, choose Ingestion API as the source, select the Lead_Data object, set category/primary key/event time, choose the Data Space and click Deploy. This creates the Data Stream and Data Lake object.

2. Create a Salesforce Connected App

Create a connected app (Setup → External Client App → Settings or Setup → App Manager → New Connected App) and include these OAuth 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 the consumer key and secret — you will use them in Zapier.

3. Build the Zap (Zapier)

High-level Zap flow:

  • Trigger: New Contact in HubSpot
  • Action: Webhook POST to get Salesforce access token
  • Action: Webhook POST to convert to Data Cloud access token
  • Action: Webhook POST to the Ingestion API endpoint to send the payload
  • Action: Send notification email (Gmail)

3.1 Trigger: HubSpot — New Contact

Configure the HubSpot connection and test that a sample contact triggers the Zap.

3.2 Obtain Salesforce Org Access Token

Use a Zapier Webhook (Custom Request) with method POST to https://login.salesforce.com/services/oauth2/token. Send form data:

grant_type=password&username={username}&password={password}&client_id={consumer_key}&client_secret={consumer_secret}

3.3 Get Data Cloud Access Token

Use another Webhook POST to:

{{step__instance_url}}/services/a360/token

Form data:

grant_type=urn:salesforce:grant-type:external:cdp&subject_token={{step__access_token}}&subject_token_type=urn:ietf:params:oauth:token-type:access_token

3.4 Call the Ingestion API

POST JSON to the ingestion endpoint:

https://{{step__instance_url}}/api/v1/ingest/sources/Zapier_Connector/lead_data

Body (JSON):

{
  "data": [
    {
      "leadId": "{{hubspot__id}}",
      "firstName": "{{hubspot__firstname}}",
      "lastName": "{{hubspot__lastname}}",
      "email": "{{hubspot__email}}",
      "phone": "{{hubspot__phone}}",
      "company": "{{hubspot__company}}",
      "campaignSource": "Web",
      "createdDate": "2021-10-22T09:11:11.816319Z"
    }
  ]
}

Set header Content-Type: application/json and Authorization: Bearer {{data_cloud_access_token}}.

3.5 Send a notification email

Optionally add a Gmail (Send Email) action to notify stakeholders when ingestion succeeds or fails.

4. Test and verify

Create a new contact in HubSpot and confirm the Zap runs. In Data Cloud, use Query Builder (SQL) to validate that the Lead_Data record arrived in the data lake.

Best practices & troubleshooting

  • Use unique primary keys in your schema to prevent duplicate records.
  • Log webhook responses in Zapier to capture error messages from the API.
  • Watch token lifetimes and refresh tokens securely; prefer using connected app flows that avoid storing raw passwords.
  • Test with a staging Data Space before production deployment.

Why this matters

Near real-time ingestion of external lead data into Salesforce Data Cloud empowers sales and analytics teams with timely, unified customer data. For admins and developers, this approach reduces manual exports and custom ETL work, while enabling personalization and faster lead response.