---
title: How to Pull HubSpot Data Directly Into Excel Without a Third-Party Integration
description: Learn how to pull HubSpot data directly into Excel using an API script, eliminating the need for third-party integrations. Automate and simplify your data processes.
image: https://www.whimpact.co/hubfs/2025.04.03_whinsight.png
---

[Skip to content](https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration#main-content)

[![whimpact logo](https://www.whimpact.co/hs-fs/hubfs/whimpact%20logo.png?width=333&height=250&name=whimpact%20logo.png)](https://www.whimpact.co)

- [About WHI](https://www.whimpact.co/about)
- [Learn - WHInsights](https://www.whimpact.co/wh1nsights)

Open main navigation

Close main navigation

- [About WHI](https://www.whimpact.co/about)
- [Learn - WHInsights](https://www.whimpact.co/wh1nsights)
- [Start Your Assessment](https://www.whimpact.co/whintensive)

[Start Your Assessment](https://www.whimpact.co/whintensive)

 Apr 3, 2025 6:29:35 PM

# How to Pull HubSpot Data Directly Into Excel Without a Third-Party Integration

![Picture of Ryan Schweighart](https://www.whimpact.co/hs-fs/hubfs/Chat_photo-1.jpg?width=50&name=Chat_photo-1.jpg) [Ryan Schweighart](https://www.whimpact.co/wh1nsights/author/ryan-schweighart)

Be a hero and share this WHInsight: [Share this page via Email](mailto:?body=https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration) [facebook-f icon](http://www.facebook.com/share.php?u=https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration) [Share this page on LinkedIn](http://www.linkedin.com/shareArticle?mini=true&url=https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration) [Share this page on Twitter](https://twitter.com/intent/tweet?url=https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration)

If you want to pull HubSpot company data directly into Excel—without using a third-party tool—this guide will show you how.

### Why Do This?

One of my clients needed to regularly compare HubSpot company records with another data source. Instead of manually exporting and formatting data every month, we automated the process using Excel and a HubSpot API script—no third-party integrations required.

 

### Step 1: Create a Private App in HubSpot

1. Go to **Settings** in HubSpot.
2. Under **Integrations**, select **Private Apps**.
3. Click **Create a private app**.
4. Give it a name and description.
5. Under **Scopes**, add:
   
     - `crm.objects.companies.read`
     - `crm.schemas.companies.read`
6. Save the app and copy your **access token** (you’ll need it later).

### Step 2: Set Up Excel to Pull HubSpot Data

1. Open a new or existing Excel workbook.
2. Go to the **Data** tab > **Get Data** > **From Other Sources** > **Blank Query**.
3. Open the **Advanced Editor** (found in the Home tab).
4. Paste in the custom Power Query script (available below).
5. Replace the placeholder token with your **HubSpot private app token**.
6. Define which properties you want to retrieve from the API using the `properties` list in the script.
7. Click **Done** > **Close & Load**.

The script handles pagination, so it will pull more than 100 records if needed.

### Step 3: Customize the Data

To pull additional HubSpot properties (like country or region):

1. Find the **internal name** of the property in HubSpot (not the label).
2. Add the internal name to the `properties` list in the script.
3. Refresh the Excel query to see the new data appear.

### Refresh and Update

After setup, updating your HubSpot data in Excel is as easy as clicking **Refresh** in the workbook. Any new records or updates in HubSpot will be reflected in Excel.

### Use Cases

This method works for more than just company data. You can adapt it to pull contacts, deals, or other objects by modifying the endpoint and properties in the script.

### Final Thoughts

This method eliminates unnecessary tools and gives you direct control over your data. It’s simple, secure, and flexible for various HubSpot reporting needs.

### Power Query Script

`let`  
`    // ===============================`  
`    // 1) Replace with your Token`  
`    // ===============================`  
`    AccessToken = "{your_access_token}",`

`    // ------------------------------------------------------------------------------`  
`    // 2) Base URL and pagination settings`  
`    // ------------------------------------------------------------------------------`  
`    baseUrl = "https://api.hubapi.com/crm/v3/objects/companies",`  
`    pageSize = 100, // maximum is 100`

`    // ------------------------------------------------------------------------------`  
`    // 3) Define the list of properties we want returned`  
`    //    (These are appended as multiple &properties=XYZ in the query string)`  
`    // ------------------------------------------------------------------------------`  
`    PropertiesList = {`  
`        "name",`  
`        "address",`  
`        "address2",`  
`        "city",`  
`        "state",`  
`        "zip",`  
`        "phone",`  
`        "fax",`  
`        "email",`  
`        "country",`  
`        "hs_country_code",`  
`        "createdate"`  
`    },`

`    // ------------------------------------------------------------------------------`  
`    // 4) Generate the query segment for the properties`  
`    //`  
`    //    This will produce something like:`  
`    //    "properties=owner_number___ogsys&properties=name&properties=active&..."`  
`    // ------------------------------------------------------------------------------`  
`    PropertiesQueryString = Text.Combine(`  
`        List.Transform(PropertiesList, each "properties=" & _),`  
`        "&"`  
`    ),`

`    // ------------------------------------------------------------------------------`  
`    // 5) Recursive function to get pages`  
`    // ------------------------------------------------------------------------------`  
`    GetPage = (after as text) =>`  
`        let`  
`            // If no 'after' (i.e. first page), don't include it in the query.`  
`            url = `  
`                if after = "" then`  
`                    baseUrl `  
`                    & "?" `  
`                    & PropertiesQueryString `  
`                    & "&limit=" `  
`                    & Number.ToText(pageSize)`  
`                else`  
`                    baseUrl `  
`                    & "?" `  
`                    & PropertiesQueryString `  
`                    & "&limit=" `  
`                    & Number.ToText(pageSize) `  
`                    & "&after=" `  
`                    & after,`

`            // Make the API call`  
`            Source = Json.Document(`  
`                Web.Contents(`  
`                    url,`  
`                    [`  
`                        Headers = [`  
`                            Authorization = "Bearer " & AccessToken,`  
`                            #"Content-Type" = "application/json"`  
`                        ]`  
`                    ]`  
`                )`  
`            ),`

`            // 'results' is the array of company objects`  
`            results = if Record.HasFields(Source, "results") `  
`                      then Source[results] `  
`                      else {},`

`            // 'paging' is the record that may contain 'next' info`  
`            paging = if Record.HasFields(Source, "paging") `  
`                     then Source[paging]`  
`                     else null,`

`            // If 'paging.next.after' exists, store that. Otherwise it's null.`  
`            nextAfter = `  
`                if paging <> null `  
`                   and Record.HasFields(paging, "next") `  
`                   and Record.HasFields(paging[next], "after") `  
`                then paging[next][after] `  
`                else null,`

`            // Recursively combine results with next pages if nextAfter is present`  
`            combined = `  
`                if nextAfter <> null then`  
`                    List.Combine({results, @GetPage(Text.From(nextAfter))})`  
`                else`  
`                    results`  
`        in`  
`            combined,`

`    // ------------------------------------------------------------------------------`  
`    // 6) Retrieve all data by calling GetPage() starting with an empty 'after'`  
`    // ------------------------------------------------------------------------------`  
`    data = GetPage(""),`

`    // ------------------------------------------------------------------------------`  
`    // 7) Convert the list of records into a table`  
`    // ------------------------------------------------------------------------------`  
`    #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),`

`    // ------------------------------------------------------------------------------`  
`    // 8) Expand the top-level record columns (id, properties, etc.)`  
`    // ------------------------------------------------------------------------------`  
`    #"Expanded Record" = Table.ExpandRecordColumn(`  
`        #"Converted to Table", `  
`        "Column1", `  
`        {"id", "properties"}, `  
`        {"id", "properties"}`  
`    ),`

`    // ------------------------------------------------------------------------------`  
`    // 9) Expand the requested properties into columns`  
`    // ------------------------------------------------------------------------------`  
`    #"Expanded properties" = Table.ExpandRecordColumn(`  
`        #"Expanded Record",`  
`        "properties",`  
`        PropertiesList,`  
`        PropertiesList`  
`    )`  
`    in`  
`    #"Expanded properties"`

[Systemize Your Busyness](https://www.whimpact.co/wh1nsights/tag/systemize-your-busyness)

## Related posts

[![](https://www.whimpact.co/hs-fs/hubfs/2025.10.16_whinsight.png?height=200&name=2025.10.16_whinsight.png)](https://www.whimpact.co/wh1nsights/how-to-merge-property-dropdown-options-in-hubspot)

[Systemize Your Busyness](https://www.whimpact.co/wh1nsights/tag/systemize-your-busyness)

## [How to Merge Property Dropdown Options in HubSpot](https://www.whimpact.co/wh1nsights/how-to-merge-property-dropdown-options-in-hubspot)

![Picture of Ryan Schweighart](https://www.whimpact.co/hs-fs/hubfs/Chat_photo-1.jpg?width=50&name=Chat_photo-1.jpg) [Ryan Schweighart](https://www.whimpact.co/wh1nsights/author/ryan-schweighart) 

 Oct 16, 2025 5:34:52 PM

Have you ever needed to combine dropdown options in a HubSpot property — especially a multi-select...

[Read more](https://www.whimpact.co/wh1nsights/how-to-merge-property-dropdown-options-in-hubspot)

[![](https://www.whimpact.co/hs-fs/hubfs/image-png.png?height=200&name=image-png.png)](https://www.whimpact.co/wh1nsights/how-to-refresh-a-data-source-in-google-data-studio)

[Systemize Your Busyness](https://www.whimpact.co/wh1nsights/tag/systemize-your-busyness)

## [How to Refresh a Data Source in Google Data Studio](https://www.whimpact.co/wh1nsights/how-to-refresh-a-data-source-in-google-data-studio)

![Picture of Ryan Schweighart](https://www.whimpact.co/hs-fs/hubfs/Chat_photo-1.jpg?width=50&name=Chat_photo-1.jpg) [Ryan Schweighart](https://www.whimpact.co/wh1nsights/author/ryan-schweighart) 

 Oct 5, 2022 5:35:50 PM

The reason I am making this is because it took me longer than I'd care to admit on figuring out how...

[Read more](https://www.whimpact.co/wh1nsights/how-to-refresh-a-data-source-in-google-data-studio)

[![](https://www.whimpact.co/hs-fs/hubfs/2024.06.19%20whinsight%20thumbnail.png?height=200&name=2024.06.19%20whinsight%20thumbnail.png)](https://www.whimpact.co/wh1nsights/how-i-restored-deleted-records-in-hubspot)

[Systemize Your Busyness](https://www.whimpact.co/wh1nsights/tag/systemize-your-busyness)

## [How I Restored Deleted Records in HubSpot](https://www.whimpact.co/wh1nsights/how-i-restored-deleted-records-in-hubspot)

![Picture of Ryan Schweighart](https://www.whimpact.co/hs-fs/hubfs/Chat_photo-1.jpg?width=50&name=Chat_photo-1.jpg) [Ryan Schweighart](https://www.whimpact.co/wh1nsights/author/ryan-schweighart) 

 Jun 19, 2024 10:59:21 AM

Have you accidentally deleted contacts in HubSpot and want to recover them in bulk? Here’s how I...

[Read more](https://www.whimpact.co/wh1nsights/how-i-restored-deleted-records-in-hubspot)

---

[![Whole Hart Impact Logo 43-2](https://www.whimpact.co/hs-fs/hubfs/Whole%20Hart%20Impact%20Logo%2043-2.png?width=266&height=200&name=Whole%20Hart%20Impact%20Logo%2043-2.png "Whole Hart Impact Logo 43-2")](https://www.whimpact.co)

[![SolutionPartnerTierBadges_FINAL_PARTNER_ORANGE](https://www.whimpact.co/hs-fs/hubfs/SolutionPartnerTierBadges_FINAL_PARTNER_ORANGE.png?width=200&height=200&name=SolutionPartnerTierBadges_FINAL_PARTNER_ORANGE.png "SolutionPartnerTierBadges_FINAL_PARTNER_ORANGE")](https://app.hubspot.com/marketplace/20619232/solutions/whole-hart-impact)

[![hubspot community champions logo](https://www.whimpact.co/hs-fs/hubfs/logos/hubspot%20community%20champions%20logo.png?width=170&height=170&name=hubspot%20community%20champions%20logo.png "hubspot community champions logo")](https://community.hubspot.com/u/rschweighart/summary)

- [About WHI](https://www.whimpact.co/about)
- [Get $500, Give $1,000 - WHIntroductions](https://www.whimpact.co/whintroductions)
- [Pricing - WHImplementation](https://www.whimpact.co/whimplementation)
- [Grow - WHIntensive](https://www.whimpact.co/whintensive)
- [Learn - WHInsights](https://www.whimpact.co/wh1nsights)
- [Careers - WHImpacters](https://www.whimpact.co/careers)

### I want to hear from you!

[ryan@whimpact.co](mailto:ryan@whimpact.co)

+1 (405) 972-6809

Located in Carlsbad, CA -- Available worldwide

---

Copyright © 2026, Whole Hart Impact

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Ryan Schweighart",
    "url" : "https://www.whimpact.co/wh1nsights/author/ryan-schweighart"
  },
  "dateModified" : "2025-04-03T23:29:35.066Z",
  "datePublished" : "2025-04-03T23:29:35.000Z",
  "headline" : "How to Pull HubSpot Data Directly Into Excel Without a Third-Party Integration",
  "image" : [ "https://www.whimpact.co/hubfs/2025.04.03_whinsight.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.whimpact.co/wh1nsights/how-to-pull-hubspot-data-directly-into-excel-without-a-third-party-integration",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.whimpact.co/hubfs/Whole%20Hart%20Impact%20Logo%2043-1.png"
    },
    "name" : "Whole Hart Impact, LLC"
  }
}
```