Skip to content

feat(triggers): service-account credentials in the hubspot trigger - #5693

Merged
TheodoreSpeaks merged 1 commit into
stagingfrom
feat/hubspot-service-account
Jul 16, 2026
Merged

feat(triggers): service-account credentials in the hubspot trigger#5693
TheodoreSpeaks merged 1 commit into
stagingfrom
feat/hubspot-service-account

Conversation

@TheodoreSpeaks

@TheodoreSpeaksTheodoreSpeaks commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Staging's feat(credentials): token-paste service accounts for 12 providers #5682 shipped HubSpot (and 11 other) token-paste service accounts while this PR was in review, superseding the provider work here — this PR is now rebased on it and carries only what feat(credentials): token-paste service accounts for 12 providers #5682 doesn't have:
  • HubSpot CRM Trigger accepts service-account credentials: the polling credential resolver (resolveOAuthCredential) resolves service_account credentials via resolveServiceAccountToken, and a new allowServiceAccounts subblock flag opts the trigger's credential picker into listing them (enabled on the HubSpot poller)
  • 409 duplicate_display_name on token service-account create collisions (all 12 providers): previously a name match fell through to the existing-credential path and silently dropped the submitted token; the token modal already maps this code to a friendly message
  • Docs: note trigger support on the HubSpot service-account page

Type of Change

  • New feature

Testing

Tested manually. lint, tsc, and check:api-validation:strict pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
docsReadyReadyPreview, CommentJul 15, 2026 7:58pm

Request Review

@cursor

cursorBot commented Jul 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes webhook polling auth and credential-create collision handling; limited scope (HubSpot trigger + token service accounts) but affects production polling and secret storage.

Overview
HubSpot CRM Trigger can use private app (service account) credentials end-to-end: polling resolves service_account credentials via resolveServiceAccountToken in resolveOAuthCredential, and a new allowServiceAccounts flag on trigger oauth-input subblocks shows those credentials in the picker (enabled on the HubSpot poller).

Credential create API now returns 409 duplicate_display_name when a token-based service account is created with a name that already exists, instead of treating the request as success and discarding the new token.

Docs on the HubSpot service-account page mention the CRM Trigger and why a non-expiring token suits polling.

Reviewed by Cursor Bugbot for commit e212cda. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-appsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds service-account credentials to the HubSpot polling trigger. The main changes are:

  • Lists service accounts in the HubSpot trigger credential selector.
  • Resolves stored service-account tokens during polling.
  • Returns a conflict when token credentials reuse a display name.
  • Documents HubSpot trigger support for service accounts.

Confidence Score: 5/5

This looks safe to merge.

  • The display-name collision now fails clearly instead of discarding the submitted token.
  • The polling resolver accepts the new service-account selection path.
  • No blocking issue remains in the updated code.

Important Files Changed

FilenameOverview
apps/sim/app/api/credentials/route.tsReturns a clear conflict response when a token service account reuses an existing display name.
apps/sim/lib/webhooks/polling/utils.tsResolves service-account credentials to stored access tokens for polling.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsxLets eligible trigger configurations include service accounts in the credential list.
apps/sim/blocks/types.tsAdds the optional service-account selector flag to sub-block configuration.
apps/sim/triggers/hubspot/poller.tsEnables service accounts for the HubSpot polling trigger.
apps/docs/content/docs/en/integrations/hubspot-service-account.mdxDocuments HubSpot service-account use with workflows and polling triggers.

Reviews (4): Last reviewed commit: "feat(triggers): service-account credenti..." | Re-trigger Greptile

Comment threadapps/sim/lib/credentials/hubspot-service-account.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e244a7a. Configure here.

Comment threadapps/sim/lib/credentials/hubspot-service-account.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a523223. Configure here.

@TheodoreSpeaks
TheodoreSpeaksforce-pushed the feat/hubspot-service-account branch from a523223 to e212cdaCompareJuly 15, 2026 19:53
@TheodoreSpeaksTheodoreSpeaks changed the title feat(credentials): add hubspot service account supportfeat(triggers): service-account credentials in the hubspot triggerJul 15, 2026
@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e212cda. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 1da346b into stagingJul 16, 2026
19 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/hubspot-service-account branch July 16, 2026 23:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@TheodoreSpeaks