-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hubspot New Notes and New Tasks #15209
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request introduces two new source modules for HubSpot: Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
components/hubspot/sources/new-note/new-note.mjs (1)
21-23
: Consider adding more metadata fieldsThe metadata could be enriched with additional useful fields from the note properties, such as the associated contact/company name if available.
return { id: note.id, summary: `New Note: ${note.properties.hs_body_preview || note.id}`, + timestamp: note.createdAt, + associatedWith: note.associations || [], ts: this.getTs(note), };components/hubspot/sources/new-task/new-task.mjs (2)
51-54
: Add retry mechanism for API callsThe
processResults
method makes API calls but doesn't handle retries. Consider adding retry logic for resilience.async processResults(after, params) { + const maxRetries = 3; + let retries = 0; + while (retries < maxRetries) { + try { const tasks = await this.getPaginatedItems(this.hubspot.listTasks.bind(this), params); await this.processEvents(tasks, after); + break; + } catch (error) { + retries++; + if (retries === maxRetries) throw error; + await new Promise(resolve => setTimeout(resolve, 1000 * retries)); + } + } }
11-11
: Version number suggestionSince this is part of a larger HubSpot components update (as indicated in the summary), consider aligning the version with the overall component version update to "0.13.0" instead of starting at "0.0.1".
- version: "0.0.1", + version: "0.13.0",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (49)
components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs
(1 hunks)components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs
(1 hunks)components/hubspot/actions/create-associations/create-associations.mjs
(1 hunks)components/hubspot/actions/create-communication/create-communication.mjs
(1 hunks)components/hubspot/actions/create-company/create-company.mjs
(1 hunks)components/hubspot/actions/create-custom-object/create-custom-object.mjs
(1 hunks)components/hubspot/actions/create-deal/create-deal.mjs
(1 hunks)components/hubspot/actions/create-engagement/create-engagement.mjs
(1 hunks)components/hubspot/actions/create-lead/create-lead.mjs
(1 hunks)components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs
(1 hunks)components/hubspot/actions/create-ticket/create-ticket.mjs
(1 hunks)components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs
(1 hunks)components/hubspot/actions/get-company/get-company.mjs
(1 hunks)components/hubspot/actions/get-contact/get-contact.mjs
(1 hunks)components/hubspot/actions/get-deal/get-deal.mjs
(1 hunks)components/hubspot/actions/get-file-public-url/get-file-public-url.mjs
(1 hunks)components/hubspot/actions/search-crm/search-crm.mjs
(1 hunks)components/hubspot/actions/update-company/update-company.mjs
(1 hunks)components/hubspot/actions/update-contact/update-contact.mjs
(1 hunks)components/hubspot/actions/update-custom-object/update-custom-object.mjs
(1 hunks)components/hubspot/actions/update-deal/update-deal.mjs
(1 hunks)components/hubspot/actions/update-lead/update-lead.mjs
(1 hunks)components/hubspot/hubspot.app.mjs
(1 hunks)components/hubspot/package.json
(1 hunks)components/hubspot/sources/common/common.mjs
(1 hunks)components/hubspot/sources/delete-blog-article/delete-blog-article.mjs
(1 hunks)components/hubspot/sources/new-company-property-change/new-company-property-change.mjs
(1 hunks)components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs
(1 hunks)components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs
(1 hunks)components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs
(1 hunks)components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs
(1 hunks)components/hubspot/sources/new-email-event/new-email-event.mjs
(1 hunks)components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs
(1 hunks)components/hubspot/sources/new-engagement/new-engagement.mjs
(1 hunks)components/hubspot/sources/new-event/new-event.mjs
(1 hunks)components/hubspot/sources/new-form-submission/new-form-submission.mjs
(1 hunks)components/hubspot/sources/new-note/new-note.mjs
(1 hunks)components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs
(1 hunks)components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs
(1 hunks)components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs
(1 hunks)components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs
(1 hunks)components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs
(1 hunks)components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs
(1 hunks)components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs
(1 hunks)components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs
(1 hunks)components/hubspot/sources/new-social-media-message/new-social-media-message.mjs
(1 hunks)components/hubspot/sources/new-task/new-task.mjs
(1 hunks)components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs
(1 hunks)components/hubspot/sources/new-ticket/new-ticket.mjs
(1 hunks)
✅ Files skipped from review due to trivial changes (45)
- components/hubspot/actions/create-associations/create-associations.mjs
- components/hubspot/actions/create-custom-object/create-custom-object.mjs
- components/hubspot/actions/create-ticket/create-ticket.mjs
- components/hubspot/sources/new-ticket/new-ticket.mjs
- components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs
- components/hubspot/package.json
- components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs
- components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs
- components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs
- components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs
- components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs
- components/hubspot/actions/update-company/update-company.mjs
- components/hubspot/sources/new-form-submission/new-form-submission.mjs
- components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs
- components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs
- components/hubspot/actions/create-engagement/create-engagement.mjs
- components/hubspot/actions/get-contact/get-contact.mjs
- components/hubspot/actions/update-contact/update-contact.mjs
- components/hubspot/actions/update-lead/update-lead.mjs
- components/hubspot/actions/create-deal/create-deal.mjs
- components/hubspot/actions/get-deal/get-deal.mjs
- components/hubspot/sources/new-email-event/new-email-event.mjs
- components/hubspot/actions/get-company/get-company.mjs
- components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs
- components/hubspot/sources/delete-blog-article/delete-blog-article.mjs
- components/hubspot/actions/create-communication/create-communication.mjs
- components/hubspot/sources/new-event/new-event.mjs
- components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs
- components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs
- components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs
- components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs
- components/hubspot/sources/new-company-property-change/new-company-property-change.mjs
- components/hubspot/sources/new-social-media-message/new-social-media-message.mjs
- components/hubspot/actions/create-lead/create-lead.mjs
- components/hubspot/actions/create-company/create-company.mjs
- components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs
- components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs
- components/hubspot/actions/update-custom-object/update-custom-object.mjs
- components/hubspot/actions/get-file-public-url/get-file-public-url.mjs
- components/hubspot/actions/update-deal/update-deal.mjs
- components/hubspot/sources/new-engagement/new-engagement.mjs
- components/hubspot/actions/search-crm/search-crm.mjs
- components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs
- components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs
- components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/hubspot/hubspot.app.mjs (1)
1011-1024
: LGTM! Well-structured implementation of new HubSpot CRM methods.The new
listNotes
andlistTasks
methods are well-implemented, following the established patterns in the codebase. They correctly utilize the CRMV3 API endpoints and maintain consistency with other similar methods.
Resolves #15161
Summary by CodeRabbit
Based on the comprehensive summary, here are the release notes:
Release Notes for HubSpot Integration v0.13.0
New Features
listNotes()
: Retrieve a list of notes from HubSpotlistTasks()
: Fetch tasks from HubSpotNew Sources
Version Updates
Minor Improvements