Skip to content
Integrations

Send scraped leads to HubSpot

Create or update contacts or companies from the results of each successful run.

Creates or updates HubSpot contacts or companies from the dataset items of each successful run. You connect your HubSpot account once, then choose which result fields go into which HubSpot properties. Common lead sources are the Google Maps scrapers for local businesses and the LinkedIn scrapers for company data.

Connect HubSpot

  1. In the dashboard, open Settings → Connections and click Connect account next to HubSpot (or Connect HubSpot in the automation form).
  2. Sign in to HubSpot, pick the HubSpot account to connect, and click Connect app.

Scrape.ly can create and update contacts and companies, and read their property list for the field mapping. It doesn't read or change anything else in your HubSpot account. You stay connected: the sign-in renews itself. Disconnect removes the connection, and HubSpot automations stop until you connect again. Uninstalling the Scrape.ly app in HubSpot does the same.

Send results to HubSpot

  1. Click New automation and pick Send results to HubSpot (on an Actor's Automations tab the Actor is already chosen).
  2. Under Send results as, pick Contacts or Companies.
  3. Under Field mapping, add a row for each result field you want in HubSpot: type the field's name on the left and pick the HubSpot property on the right. Nested fields are named with dots, such as address.city. The property list comes from your HubSpot account, custom properties included.
  4. Save and send a test. The test checks the connection and that every mapped property exists and can be written; it doesn't create anything in HubSpot.

Matching: records are matched so a re-run updates them instead of adding duplicates. One result field must be mapped to the match property:

  • Contacts are matched by email. A contact with the same email is updated; otherwise a new one is created.
  • Companies are matched by domain. A website such as https://www.acme.com/about is stored as acme.com. A company with the same domain is updated; otherwise a new one is created.

Results without a valid email or domain in that field are skipped. Only the mapped properties are written; other properties of an existing record keep their values. When two results in the same batch have the same email or domain, the later one wins.

When it writes: only for succeeded runs, and only when the run returned items. Max records per run (1 to 10,000, default 1,000) caps how many items are sent.

Limits: HubSpot takes 100 records per request, so 1,000 records take a few seconds. Each HubSpot automation of this kind writes at most 30 times an hour, and an account at most 500 exports a day (Google Sheets, S3, GitHub, Airtable, HubSpot, Notion, and Dropbox together). If HubSpot isn't connected, a property can't be written, or HubSpot refuses a value (for example a number property given text), the delivery history on the automation's page says so; records HubSpot accepted are still written.

API

A webhook with a hubspot notification. Only ACTOR.RUN.SUCCEEDED is allowed, and HubSpot must be connected in the dashboard first.

.bash
curl -X POST https://api.scrape.ly/v2/webhooks \
  -H "Authorization: Bearer $SCRAPELY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "eventTypes": ["ACTOR.RUN.SUCCEEDED"],
    "condition": { "actorId": "YOUR_ACTOR_ID" },
    "description": "Leads to HubSpot",
    "notification": {
      "channel": "hubspot",
      "objectType": "contacts",
      "mapping": [
        { "field": "email", "property": "email" },
        { "field": "firstName", "property": "firstname" },
        { "field": "company.name", "property": "company" }
      ],
      "maxRows": 1000
    }
  }'

objectType is contacts or companies; mapping has 1 to 50 rows, each property at most once, and must map a field to email (contacts) or domain (companies). property is the property's internal name. GET /v2/integrations/hubspot/properties?objectType=contacts lists the properties of your connected account that can be written. Responses carry notification.hubspotSettings with objectType, mapping, and maxRows, and connected says whether HubSpot is still connected. In an automation, use a delivery with "channel": "hubspot" and the same objectType, mapping, and maxRows fields.

FAQ

Will re-running a scraper create duplicate HubSpot contacts?

No. Contacts are matched by email and companies by domain: a record with the same email or domain is updated, and a new one is created only when there is no match. Results without a valid email or domain are skipped.

Which HubSpot properties can scraped fields go into?

Any contact or company property of your HubSpot account that can be written, custom properties included. Map up to 50 fields, each property at most once, and only the mapped properties are written.

What can Scrape.ly access in my HubSpot account?

It can create and update contacts and companies, and read their property list for the field mapping. It doesn't read or change anything else in your HubSpot account.