Oauth card app with behavioral events

I’ve built an automated mechanism to add behavioural events to HubSpot companies, and my next step is to create a CRM card that displays those events in a more user-friendly and visually appealing way.

However, because our application is an OAuth app, I can’t use HubSpot serverless functions. From my investigation so far, it seems that the only available approach is to use hubspot.fetch.

What I’m struggling to understand is that the behavioural event data already exists within HubSpot. Using hubspot.fetch would require the card to call an external service, which would then call HubSpot and simply return HubSpot data back to the card. That feels somewhat redundant and introduces an additional dependency purely to access data that’s already available within the platform.

Am I missing an alternative approach? Has anyone found a way for an OAuth-based CRM UI Extension to access behavioural events directly, without relying on an intermediary service?

No, not for the event list itself. The data tools that run inside the card (useCrmProperties, useAssociations, fetchCrmObjectProperties) only read properties and associations on the current record, and event occurrences aren’t properties. Serverless functions would remove the extra hop, but only privately distributed apps with static auth can use them; OAuth apps can’t. See HubSpot’s serverless functions reference.

So the full list does need hubspot.fetch to your backend, which calls GET /events/v3/events?objectType=company&objectId={id}&eventType={your event} with that portal’s OAuth token (see the Events API guide). One thing to build in: HubSpot signs the request and adds userId, portalId, userEmail and appId, but not the record ID, which comes from the card. Look up the token by the signed portalId, and check that the user can view that company before returning any events.

If the card mainly needs a summary, you can skip the backend for that part. Since you control what writes the events, have it also write a few roll-up company properties (last event type, last event date, count in the last 30 days) and read them with useCrmProperties. The backend is then only needed for a drill-down list.

Does the card need to show every occurrence, or mostly recent activity per company?