Voir les catégories

Comment connecter HubSpot à Excel - Interroger les données CRM avec SQL

Connexion · HubSpot à Excel

Récupérer des données à partir de HubSpot dans Excel

Importez en temps réel les données de votre compte HubSpot dans Excel et actualisez-les à votre guise. Aucun pilote ODBC, aucune exportation, aucune macro. Une dizaine de minutes suffisent la première fois ; le forfait gratuit l'inclut.

Environ 10 minutes Aucun codage nécessaire Vos identifiants vous suivent. Exceller partout, même sur le web
Vous êtes bloqué à un moment donné ? N'hésitez pas à nous demander. Ouvrir Soutien Dans la section « Flux de requêtes » (menu en haut à droite → Assistance), envoyez-nous un message. De vraies personnes le liront, et « Je ne comprends pas ce que cet écran demande » est une question tout à fait légitime.

Ce que vous obtiendrez

Logo HubSpotUne feuille de calcul affichant les résultats en direct d'une requête SQL sur votre compte HubSpot, avec un bouton permettant d'afficher les dernières lignes dès que les données changent. Par exemple :

HubSpot stocke vos données via son API. Pour les importer dans Excel, il faut généralement exporter un fichier CSV depuis le tableau de bord HubSpot à chaque fois que vous avez besoin de données actualisées. Query Streams simplifie cette étape : un petit programme auxiliaire, appelé Agent, exécute la requête à l'emplacement de vos données, et un complément Excel lui demande les lignes souhaitées. Seuls les résultats sont transférés, via une connexion chiffrée, et Excel peut être ouvert n'importe où : sur votre ordinateur portable à la maison, sur celui d'un collègue à l'autre bout du pays, ou encore via Excel sur le web.

OÙ COURT L'AGENTtout ordinateur ou serveur toujours allumé avec une connexion internetVotre HubSpotcompteLes clés restent iciAgent de flux de requêtesdétient les qualificationsFlux de requêteslien cryptésur Internet · résultats uniquementOÙ QUE VOUS SOYEZvotre ordinateur portable, un autre bureau, un hôtel, votre téléphoneExcelWindows, Mac ou Excel sur le web
L'Agent est intégré à vos données. Excel, lui, n'en a pas besoin. Ouvrez la feuille n'importe où et les lignes s'affichent.

Ce dont vous aurez besoin

Un compte Query Streams

Le forfait gratuit suffit pour ce guide. Inscrivez-vous sur mon.querystreams.com.

L'agent sur n'importe quel ordinateur toujours allumé

Un petit programme qui s'exécute en arrière-plan et appelle HubSpot lorsqu'Excel le demande. Il nécessite simplement une connexion internet.

Votre identifiant HubSpot

Vous vous connecterez à HubSpot une seule fois et autoriserez l'accès en lecture. Aucun mot de passe n'est saisi dans les flux de requêtes.

Quel ordinateur reçoit l'agent ? Toute machine toujours allumée qui peut déjà accéder à votre compte HubSpot. Excel peut être partout, y compris Excel sur le Web.

Connectez-le en cinq étapes

  1. Créez votre compte

    Aller à mon.querystreams.com et inscrivez-vous. Choisissez le Gratuit Ce forfait est définitif et non une version d'essai. Il comprend la connexion de votre compte HubSpot et l'exécution de requêtes depuis Excel.

  2. Installez l'agent sur n'importe quel ordinateur toujours allumé.

    Connectez-vous, ouvrez TéléchargerInstallez ensuite l'agent sur n'importe quel ordinateur ou serveur toujours allumé et disposant d'un accès Internet. L'installation ne prend qu'une minute et l'agent s'exécute ensuite automatiquement.

    Pourquoi un petit programme plutôt qu'un pilote ? L'agent s'installe en une seule étape sur Windows, Mac ou Linux (environ 85 Mo sous Windows, un peu plus de 100 Mo sous Mac et Linux) et fonctionne discrètement en arrière-plan. Il établit une connexion sortante chiffrée avec Query Streams, comme le ferait un navigateur ; vous n'avez donc pas besoin d'ouvrir de port dans votre pare-feu ni de configurer de VPN. Vos clés restent sur votre machine et les données sont transmises où que vous soyez, via Internet si nécessaire. Seul le module complémentaire est requis de votre côté.

    La page de téléchargement affiche Votre clé d'accèsCollez-le dans l'Agent lorsqu'il vous le demande, et attendez que le badge affiche Connecté aux flux de requêtesC'est la seule chose que vous devez faire sur l'Agent lui-même.

    Des guides complets sont disponibles si vous le souhaitez : Fenêtres, Mac, Linux.

  3. Indiquez-lui l'adresse de votre compte HubSpot.

    De retour dans votre navigateur, ouvrez Agents de données (sous Données (dans le menu du haut). Votre agent y est répertorié. Cliquez Ajouter un connecteur et choisissez HubSpot. Need your HubSpot credentials first? Open the walkthrough, then fill in:

    Create your HubSpot credentials (about 5 minutes)

    Follow this with HubSpot open in another tab. Query Streams keeps what you create here so your Agent can use it, and only ever reads from HubSpot.

    Who can do this
    Super admin, or a user with the Developer tools access permission (service keys). Legacy private apps need a Super admin.
    Recommandé
    Service key with read-only scopes (Development → Keys → Service Keys). HubSpot recommends service keys for scheduled data syncs to BI tools and warehouses, and is removing the option to create new legacy private apps.

    Avant de commencer

    • A HubSpot login that is a Super admin or has the Developer tools access permission. A service key can only be given scopes your own HubSpot user already has.
    • Know which HubSpot account you want to query. A key only reads the account it was created in, so create it in that account, not in a test or sandbox account.
    • Decide which HubSpot tables you want. Contacts, Companies, Deals, Owners, Pipelines, Pipeline Stages and Properties are on by default; every extra table needs its own read scope (see Permissions).
    • The Query Streams Agent installed and online on an always-on computer, and the Query Streams portal open in another tab: Data Agents → Add connector → HubSpot.

    Steps

    1. Sign in to HubSpot

      Open HubSpot in a new tab and sign in as a Super admin, or as a user with the Developer tools access permission.

      If you belong to more than one HubSpot account, switch to the one whose data you want before you continue. The key only works for the account it is created in.

    2. Open Development

      In the left main navigation, near the bottom, click Development (the </> icon). The Development page opens with its own sidebar: Overview, Projects, Legacy Apps, Monitoring, Keys and more.

      No Development item? Your HubSpot user is not a Super admin and lacks Developer tools access. Ask a Super admin to create the key, or to give you that permission.

    3. Open Service Keys

      In the Development sidebar, click Keys to expand it, then click Service Keys (it has a Beta badge). The Service Keys page opens; if you have none yet it says No Service Keys Created.

      Do not use Personal Access Key or Developer API Key, which sit just above Service Keys in the same menu. They are developer-tool keys and will not connect. Some accounts also reach this page from Settings (gear icon) → Integrations → Service Keys.

    4. Click Create service key

      In the top right of the Service Keys page, click Create service key. The Create Service Key page opens with a Name box and a Scopes section.

    5. Name the key

      In Name, type a name you will recognise later, for example Query Streams read-only. HubSpot shows this name in its logs.

      The name must be unique in your HubSpot account.

    6. Open the scope picker

      Next to Selected scopes, click + Add new scope. A panel opens on the right with a Find a scope search box and a checkbox for each scope.

    7. Tick the four required scopes

      Type each name into Find a scope and tick its checkbox: crm.objects.contacts.read, crm.objects.companies.read, crm.objects.deals.read, crm.objects.owners.read. These four cover every table Query Streams syncs by default.

      Tick only scopes that end in .read. Query Streams only reads from HubSpot; it never needs a .write scope.

    8. Tick scopes for any extra tables

      For each extra table you want, tick its scope from the Permissions list below. For example: crm.objects.tickets.read for Tickets; crm.objects.line_items.read for Line Items, Taxes, Discounts and Fees; crm.lists.read for Lists. Skip this step if the default tables are enough.

      You can add scopes later without making a new key (open the key, then Edit).

    9. Click Update

      Click Update in the right panel. The panel closes and your scopes are listed under Selected scopes.

    10. Check the scope list

      Read through Selected scopes. If anything ends in .write, click Delete next to it. Expand Summary of selected scopes if you want a plain-language list of what the key can see.

    11. Create the key

      Click Create in the top right, then confirm in the dialog box that opens.

    12. Open your new key

      Go to Development → Keys → Service Keys and click the name of the key you just created. Its details page opens with a Service Key box.

    13. Show and copy the key

      In the Service Key box the value is partly hidden and starts with pat- (for example pat-na1-…). Click Show under it, then click Copy.

      Use Copy rather than selecting the text by hand: a missing character, a trailing space or the hidden dots will fail the test. HubSpot does not show the key only once; you can come back and click Show again. Treat it like a password.

    14. Paste it into Query Streams and test

      In the Query Streams portal open Data Agents, click Add connector and choose HubSpot. Paste the key into App Access Token, type a Connection name, then click Test connection. The result reads Connected.

      Query Streams stores the key for your Agent and only ever reads your HubSpot data.

    15. Match the tables to your scopes

      On the Sync step that follows, leave on only the HubSpot tables whose scopes you ticked in steps 7 and 8, then finish the wizard.

      A table switched on without its scope fails to sync with a Forbidden error. Add the scope to the key (step 8) or switch the table off.

    Alternatives

    Use a legacy private app token

    Your account already has a legacy private app you want to reuse. HubSpot is removing the option to create new ones: accounts created on or after 28 September 2026 already cannot, and older accounts lose it on 26 October 2026. Existing private apps and their tokens keep working.

    Who can do this: Super admin

    1. Open Legacy Apps

      In HubSpot click Development in the left main navigation, then Legacy Apps in the Development sidebar.

      Older HubSpot navigation called this Settings → Integrations → Private Apps.

    2. Open your private app, or start a new one

      If the app is listed, click its name and go to step 6 (or step 5 to add scopes). If not, and the button is still there, click Create legacy app in the top right and choose Private in the dialog box.

      No Create legacy app button means creation is already switched off for your account. Use a service key (main steps) instead.

    3. Name the new app

      On the Basic Info tab, enter a name such as Query Streams read-only. The logo and description are optional.

    4. Add the read scopes

      Click the Scopes tab, click Add new scope, tick the same scopes as in main steps 7 and 8, then click Update. Then click Create app in the top right, read the access-token message in the dialog box and click Continue creating.

    5. Add scopes to an existing app (only if needed)

      On the app’s page click Edit app in the top right, open the Scopes tab, add the missing read scopes and save. The token string does not change when you change scopes.

    6. Show and copy the token

      On the app’s page click the Auth tab. Under Access token click Show token, then click Copy. The token starts with pat-. Paste it into App Access Token as in main step 14.

      If the HubSpot user who created the app is removed from HubSpot, some calls fail with USER_DOES_NOT_HAVE_PERMISSIONS. Rotate the token (Rotate next to it) and paste the new one, or move to a service key.

    Use a developer-platform app’s static auth token

    Your team has already built a HubSpot app on the new developer platform with the HubSpot CLI, configured with static auth and private distribution. Building one needs the CLI; if you don’t have one, use a service key.

    Who can do this: Super admin, or a user with a developer seat, to view the token; Super admin or the HubSpot Marketplace access permission to install the app

    1. Open the project

      In HubSpot click Development, then Projects in the sidebar, then the name of the project that holds your app.

    2. Open the app

      On the project’s Overview tab, under Project Components, click the app’s name.

    3. Open the Distribution tab

      Click the Distribution tab.

    4. Install the app if it isn’t yet

      Under Manage distribution your current HubSpot account is listed. Click Install now, check that the access requested matches the read scopes you configured, then click Connect app.

      A static-token app can be installed in only one standard HubSpot account at a time.

    5. Show and copy the token

      Once installed, the Distribution tab shows an access token. Click Show to reveal it, copy it, and paste it into App Access Token as in main step 14.

      If you change the app’s scopes later, reinstall it with the Reinstall URL on the Distribution tab, or the new scopes won’t apply.

    Permissions to grant

    ResourceAccèsUsed for
    crm.objets.contacts.lireLireRequired. hubspot.contacts, plus the activity tables hubspot.calls, hubspot.emails, hubspot.meetings, hubspot.notes, hubspot.tasks and hubspot.communications (HubSpot’s activity APIs use this scope), and contact fields in hubspot.properties and hubspot.associations.
    crm.objets.entreprises.lireLireRequired. hubspot.companies, and company fields in hubspot.properties and hubspot.associations.
    crm.objets.transactions.lectureLireRequired. hubspot.deals, the deal pipelines in hubspot.pipelines and hubspot.pipeline_stages, and deal fields in hubspot.properties and hubspot.associations.
    crm.objets.propriétaires.lectureLireRequired. hubspot.owners, the HubSpot users who own records, so deals and contacts can be joined to a rep’s name.
    crm.objects.tickets.readLireOnly if you sync Tickets: hubspot.tickets and the ticket pipelines in hubspot.pipelines and hubspot.pipeline_stages. Older apps may show the legacy tickets scope instead, which also allows changes.
    crm.objects.products.readLireOnly if you sync Products: hubspot.products. Search the picker for products; HubSpot’s products API accepts this scope, although HubSpot’s scope reference page does not list it yet.
    crm.objects.line_items.readLireOnly if you sync Line Items, Taxes, Discounts or Fees: hubspot.line_items, hubspot.taxes, hubspot.discounts, hubspot.fees.
    crm.objects.quotes.readLireOnly if you sync Quotes: hubspot.quotes.
    crm.objects.invoices.readLireOnly if you sync Invoices: hubspot.invoices.
    crm.objects.subscriptions.readLireOnly if you sync Subscriptions: hubspot.subscriptions (HubSpot commerce subscriptions).
    crm.objects.commercepayments.readLireOnly if you sync Payments: hubspot.payments (HubSpot commerce payments).
    crm.objects.marketing_events.readLireOnly if you sync Marketing Events: hubspot.marketing_events.
    formsRead and write (HubSpot has no read-only forms scope)Only if you sync Forms or Form Submissions: hubspot.forms and hubspot.form_submissions. Query Streams only reads them.
    crm.objects.feedback_submissions.readLireOnly if you sync Feedback: hubspot.feedback_submissions. Service Hub Professional or Enterprise only. HubSpot’s scope reference spells it crm.objects.feedback_submission.read, so search the picker for feedback.
    crm.lists.readLireOnly if you sync Lists: hubspot.lists.
    automatisationRead and write (HubSpot has no read-only workflows scope)Only if you sync Workflows: hubspot.workflows. Professional or Enterprise accounts only. Query Streams only reads workflow definitions.
    crm.schemas.custom.readLireOnly if you sync Custom Schemas: hubspot.schemas (custom object definitions). Enterprise accounts only.

    Paste into Query Streams

    Jeton d'accès à l'application
    The service key you copied in step 13 (it starts with pat-), or a legacy private app token, or a developer-platform app’s static auth token

    Common problems

    Test connection fails with Invalid or expired access token, straight after you pasted a new key.

    Why: The value is not an app or service key. The usual mix-up is the Personal Access Key or Developer API Key, which sit next to Service Keys under Development → Keys and are for HubSpot’s developer tools.

    Fix: Go to Development → Keys → Service Keys, open your key, click Show, then Copy, and paste that into App Access Token. Test connection again; it reads Connected.

    The wizard says Not a valid HubSpot app token before it even tests.

    Why: Only part of the key was pasted: the text doesn’t start with pat- and is very short or contains a space.

    Fix: Back in HubSpot click Show, then use the Copy link (don’t select the text by hand) and paste again.

    You can’t see Development in HubSpot’s left navigation, or Service Keys is missing under Keys.

    Why: Your HubSpot user is not a Super admin and doesn’t have the Developer tools access permission.

    Fix: Ask a Super admin in your company to create the key (steps 2 to 13) and paste it into the wizard, or to grant you Developer tools access.

    Test connection reads Connected, but one table fails to sync with a Forbidden error or stays empty.

    Why: The key is missing the read scope for that table, or your HubSpot plan doesn’t include that feature (Workflows needs Professional or Enterprise; Custom Schemas needs Enterprise; Feedback needs Service Hub Professional or Enterprise).

    Fix: Open the key (Development → Keys → Service Keys → key name), click Edit, add the scope from the Permissions list and save, then sync again. If your plan doesn’t include the feature, switch that table off in the connection’s Sync settings.

    Syncs that used to work start failing with Invalid or expired access token.

    Why: Someone rotated or deleted the key. Rotate and expire now stops the old key at once; Rotate and expire later stops it after 7 days.

    Fix: Copy the current key from Development → Keys → Service Keys → key name → Show → Copy. In Data Agents, edit the HubSpot connection, paste it into App Access Token and run Test connection.

    With a legacy private app token, some tables fail with USER_DOES_NOT_HAVE_PERMISSIONS.

    Why: The HubSpot user who created the private app was removed from the account.

    Fix: Rotate the app’s token (Development → Legacy Apps → app → Rotate) and paste the new token into the connection, or create a service key instead.

    You can’t find Create legacy app, or HubSpot’s docs call private apps legacy.

    Why: HubSpot is retiring creation of new legacy private apps (already off for accounts created on or after 28 September 2026; off for older accounts from 26 October 2026). Existing private apps keep working.

    Fix: Create a service key (main steps). Existing private app tokens can stay in place.

    Data in Query Streams doesn’t match what you see in HubSpot.

    Why: The key was created in a different HubSpot account (for example a test or sandbox account).

    Fix: Switch to the right HubSpot account, create a key there, and paste it into the connection.

    Limits to know

    • HubSpot’s limits for service keys and private apps: 100 requests per 10 seconds per key on Free and Starter, 190 on Professional and Enterprise, 250 with the API Limit Increase add-on. The Agent paces itself to the lowest of these, so the first full sync of a large CRM can take a while.
    • Daily limit per HubSpot account: 250,000 requests on Free and Starter, 625,000 on Professional, 1,000,000 on Enterprise. It is shared by every private app and service key in the account, so other integrations use the same budget.
    • HubSpot’s CRM search, which the Agent uses to fetch only changed records, allows 5 requests per second per account and at most 10,000 results per query.
    • Some tables depend on your HubSpot plan: Workflows (Professional or Enterprise), Custom Schemas (Enterprise), Feedback (Service Hub Professional or Enterprise).
    • Service keys are in public beta (since 10 February 2026), so HubSpot may change details. HubSpot recommends rotating keys every six months.
    • New legacy private apps can’t be created in accounts made on or after 28 September 2026, nor in older accounts from 26 October 2026. Existing apps and tokens keep working.

    Steps verified 8 October 2026. Sources: developers.hubspot.com/docs/apps/developer-platform/build…, developers.hubspot.com/changelog/service-keys, developers.hubspot.com/blog/hubspot-service-keys-the-righ…, developers.hubspot.com/changelog/legacy-private-app-creat…, developers.hubspot.com/docs/apps/legacy-apps/private-apps…, developers.hubspot.com/docs/apps/developer-platform/build…, developers.hubspot.com/docs/apps/developer-platform/build…, developers.hubspot.com/docs/apps/developer-platform/build…, developers.hubspot.com/docs/getting-started/developer-ove…, developers.hubspot.com/docs/apps/developer-platform/build…, developers.hubspot.com/docs/developer-tooling/platform/us…, developers.hubspot.com/docs/api-reference/latest/crm/sear…, knowledge.hubspot.com/user-management/hubspot-user-permis…, developers.hubspot.com/docs/api-reference/legacy/crm/obje…, developers.hubspot.com/docs/api-reference/legacy/crm/acti…, developers.hubspot.com/docs/api-reference/legacy/crm/acti…, developers.hubspot.com/docs/api-reference/legacy/crm/obje…, developers.hubspot.com/docs/api-reference/legacy/crm/obje…, developers.hubspot.com/docs/api-reference/legacy/crm/pipe…, developers.hubspot.com/docs/api-reference/legacy/crm/obje…, developers.hubspot.com/docs/api-reference/legacy/automati…, developers.hubspot.com/docs/api-reference/legacy/marketin…, developers.hubspot.com/docs/api-reference/legacy/account/…, docs.n8n.io/integrations/builtin/credentials/hubspot.

    Nom de la connexion
    Un nom que vous reconnaîtrez plus tard, comme base de données des ventes.
    Jeton d'accès à l'application
    Un jeton d'application privée HubSpot (il commence par pat-), que vous trouverez dans Paramètres, Intégrations, Applications privées, votre application, onglet Authentification.

    Cliquez sur Test de connexion.Quand il lit Connecté, cliquez ÉconomiserLa connexion atteint votre agent en quelques secondes.

    Test échoué ? Usually a missing permission, or a credential from the wrong HubSpot account. The walkthrough above lists the common problems and their fixes.

  4. Ajouter des flux de requêtes à Excel

    Dans Excel, accédez à Insérer → Obtenir des compléments, Rechercher Flux de requêtes, et cliquez AjouterOu ouvrez-le directement depuis Flux de requêtes sur Microsoft AppSourceUn bouton « Flux de requêtes » apparaît dans le ruban. Connectez-vous avec le même compte.

    Fonctionne dans Excel pour Microsoft 365 sur Windows et Mac, et dans Excel sur le Web.

  5. Installez votre première table

    Cliquez sur le bouton « Interroger les flux », choisissez Diffuser une requête, et sélectionnez la connexion que vous venez d'établir.

    Saisissez la requête que vous souhaitez exécuter. Celle-ci extrait quelques colonnes d'une base de données. hubspot.offres tableau:

    Exemple · SQL
    SELECT dealname, dealstage, amount, closedate FROM hubspot.deals ORDER BY closedate DESC LIMIT 100;

    Sous Fiche de destination choisir Créer une nouvelle feuilleAppuyez ensuite sur le bouton Lecture (la flèche ▶). Les lignes s'affichent dans Excel en une ou deux secondes. Appuyez de nouveau sur le bouton dès que les données changent ; la feuille se met à jour automatiquement.

    Vous ne connaissez pas SQL ? Créez plutôt la requête dans le portail Query Streams. Générateur de requêtes L'interface affiche vos tableaux et colonnes, vous permettant de les parcourir par simple clic. Avec les abonnements Business, vous pouvez également interroger Nova en langage naturel (« Afficher les clients aux États-Unis ») et l'application génère automatiquement la requête SQL. Enregistrez-la : elle sera accessible en un clic depuis le portail et depuis la liste des requêtes enregistrées de l'extension (à partir de l'abonnement Personal Core).

C'est ça. Vos données sont dans la feuille et restent à jour en un clic. Seules les lignes que vous avez demandées ont quitté votre réseau.

Bonnes prochaines étapes

  • Enregistrer la requête dans le portail, vous pouvez donc le relancer en un seul clic, depuis Excel ou Google Sheets.
  • Ajouter un filtre par exemple, une plage de dates, afin que la même requête puisse répondre « ce mois-ci » sans modification.
  • Partagez les résultats avec un collègue. Il voit les rangs, pas vos qualifications.

Questions que se posent les gens

Excel doit-il être installé sur le même ordinateur que votre compte HubSpot ?

Non. Seul l'application Agent doit être installée sur le même ordinateur que votre compte HubSpot. Excel peut être installé sur n'importe quel ordinateur connecté à Internet, y compris Excel sur le Web et Excel sur Mac. Connectez-vous à l'extension avec votre compte et vos connexions seront disponibles.

Mes données sont-elles copiées dans Query Streams ?

Non. L'agent exécute la requête à l'endroit où se trouvent vos données et n'envoie que les lignes renvoyées. Aucune donnée n'est synchronisée ni stockée entre-temps.

Le forfait gratuit couvre-t-il vraiment cela ?

Oui. L'offre gratuite est un abonnement permanent, et non une période d'essai. Consultez les détails sur son contenu. page de tarification.

Est-ce compatible avec Excel pour Mac ?

Oui. Excel pour Microsoft 365 sur Mac et Windows, et Excel sur le Web.

Toujours bloqué ? Ouvrir Soutien Dans Query Streams, indiquez-nous l'étape à laquelle vous vous trouvez et ce que vous voyez. Nous vous mettrons en relation.
Query Streams connecte également les mêmes données àGoogle SheetsClaude, Curseur et ChatGPTune API RESTet plus encore

Chaque guide pour HubSpot

Ce n'est pas tout à fait votre configuration ?

  • Vous souhaitez interroger directement les classeurs Excel ? Excel Folder lit un dossier de classeurs comme des tableaux → Excel Folder
Updated on octobre 8, 2026

Powered by BetterDocs