npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rawdash/connector-hubspot

v0.29.2

Published

Rawdash connector for HubSpot — CRM contacts, companies, deals, and marketing email performance

Readme

@rawdash/connector-hubspot

npm version license

Sync CRM contacts, companies, and deals plus deal stage-change events and marketing email campaign stats from HubSpot.

Install

npm install @rawdash/connector-hubspot

Authentication

A HubSpot private app access token with read scopes for the resources you sync (contacts, companies, deals, and marketing email).

  1. In HubSpot, go to Settings → Integrations → Private Apps and create a private app.
  2. Grant read scopes for the resources you intend to sync (CRM contacts, companies, deals, and marketing email).
  3. Copy the generated access token (starts with pat-).
  4. Store it as a secret and reference it from the connector config as accessToken: secret("HUBSPOT_ACCESS_TOKEN").

Configuration

| Field | Type | Required | Description | | ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | accessToken | secret | Yes | HubSpot private app access token with read scopes for contacts, companies, deals, and marketing email. Create one at Settings → Integrations → Private Apps. | | resources | array | No | Which HubSpot resources to sync. Omit to sync all resources. The access token only needs read scopes for the resources listed here. |

Resources

  • hubspot_contact (entity) - CRM contacts with email, lifecycle stage, lead status, owner, and creation time.
    • Endpoint: POST /crm/v3/objects/contacts/search
  • hubspot_company (entity) - CRM companies with name, domain, industry, lifecycle stage, and creation time.
    • Endpoint: POST /crm/v3/objects/companies/search
  • hubspot_deal (entity) - CRM deals with name, stage, pipeline, amount, close date, owner, and creation time.
    • Endpoint: POST /crm/v3/objects/deals/search
  • hubspot_deal_stage_change (event) - Deal stage-change events derived from deal property history, one event per stage transition.
    • Endpoint: GET /crm/v3/objects/deals?propertiesWithHistory=dealstage
  • hubspot_email_campaign (entity) - Marketing email campaigns with name, subject, sender, type, send date, and recipient count.
    • Endpoint: GET /email/public/v1/campaigns/by-id
  • hubspot_email_stats (metric) - Per-campaign marketing email engagement stats (sent, delivered, opened, clicked, bounced, unsubscribed) timestamped at the campaign send time.
    • Endpoint: GET /email/public/v1/campaigns/{id}
    • Unit: emails
    • Dimensions: campaignId, campaignName, delivered, opened, clicked, bounced, unsubscribed
    • One sample per campaign; value is the sent count, and every counter (delivered, opened, clicked, bounced, unsubscribed) is also exposed in attributes.

Example

import {
  defineConfig,
  defineDashboard,
  defineMetric,
  secret,
} from '@rawdash/core';

const hubspot = {
  name: 'hubspot',
  connectorId: 'hubspot',
  config: {
    accessToken: secret('HUBSPOT_ACCESS_TOKEN'),
    resources: ['contacts', 'companies', 'deals'],
  },
};

export default defineConfig({
  connectors: [hubspot],
  dashboards: {
    sales: defineDashboard({
      widgets: {
        open_deals: {
          kind: 'stat',
          title: 'Open Deals',
          metric: defineMetric({
            connector: hubspot,
            shape: 'entity',
            entityType: 'hubspot_deal',
            fn: 'count',
          }),
        },
      },
    }),
  },
});

Rate limits

HubSpot allows 100 requests / 10s; the Search API caps results at 10,000 per query.

Limitations

  • Deal stage-change events are rewritten on every sync because the deal list endpoint has no incremental since filter.
  • Marketing email campaign data comes from the legacy email campaigns API and is only available for marketing emails.

Links

License

Apache-2.0