Skip to content
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

[FEATURE] Hubspot - New form submission improvement #15993

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

jcortes
Copy link
Collaborator

@jcortes jcortes commented Mar 20, 2025

WHY

Resolves #15961

Summary by CodeRabbit

  • New Features

    • Added support for retrieving form definitions from HubSpot.
    • Enhanced form submission handling with asynchronous pagination and enriched form metadata.
  • Chores

    • Upgraded integration component versions across multiple features.
    • Extended support with a new marketing API endpoint.

@jcortes jcortes self-assigned this Mar 20, 2025
Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Mar 20, 2025 10:25pm
pipedream-docs ⬜️ Ignored (Inspect) Mar 20, 2025 10:25pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 20, 2025 10:25pm

Copy link
Contributor

coderabbitai bot commented Mar 20, 2025

Walkthrough

The pull request primarily updates version numbers across many HubSpot action and source modules without affecting their functionality. Two files introduce new functionality: a new method getFormDefinition in the HubSpot app for retrieving form definitions, and a new asynchronous method paginate (along with an added form property) in the new form submission source to manage pagination and include comprehensive form metadata. A new constant is also added for the marketing API path, and the package version has been incremented.

Changes

File(s) Change Summary
components/hubspot/actions/.../*.mjs Version updates for multiple action modules (e.g., from 0.0.14→0.0.15, 0.0.11→0.0.12, 1.0.0→1.0.1, etc.) with no functional changes.
components/hubspot/common/constants.mjs Added new constant: MARKETINGV3: "/marketing/v3".
components/hubspot/hubspot.app.mjs Added new method getFormDefinition({ formId, ...opts } = {}) to retrieve HubSpot form definitions.
components/hubspot/package.json Package version updated from 1.0.1 to 1.0.2.
components/hubspot/sources/.../*.mjs (excluding new form submission files) Version updates for multiple source modules (e.g., 0.0.19→0.0.20, 0.0.12→0.0.13, etc.) with no changes to logic.
components/hubspot/sources/new-form-submission/new-form-submission.mjs
components/hubspot/sources/new-form-submission/test-event.mjs
In new-form-submission: version bumped from 0.0.24→0.0.25; added async paginate method for handling pagination; test event now exports a new "form" property with detailed metadata.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HubSpotApp
    participant API

    User ->> HubSpotApp: Call getFormDefinition({ formId, opts })
    HubSpotApp ->> API: makeRequest(GET /forms/{formId}, opts)
    API -->> HubSpotApp: Response (form definition)
    HubSpotApp -->> User: Return form definition
Loading
sequenceDiagram
    participant NFS as NewFormSubmission
    participant Resource as ResourceFn
    participant Evt as EventEmitter

    loop While more pages exist
        NFS ->> Resource: Call resourceFn(pagination params)
        Resource -->> NFS: Return results with pagination info
        NFS ->> NFS: Process results and update 'after' timestamp
    end
    NFS ->> Evt: Emit event for each valid submission
Loading

Assessment against linked issues

Objective Addressed Explanation
[#15961] Export form ID and title with form submission event

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • michelle0927

Poem

I’m a rabbit hopping through the code,
Counting versions as they smoothly load.
New methods spring like buds in May,
Paginate and getFormDefinition lead the way.
With constants fresh and updates so bright,
I cheer with a twitch, “Code’s just right!” 🐇
Happy hops into a future of light!

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/hubspot/actions/create-associations/create-associations.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/hubspot/actions/create-communication/create-communication.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

  • 46 others
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jcortes jcortes force-pushed the hubspot-new-form-submission-improvement branch from 4339c0d to a5bfb7d Compare March 20, 2025 22:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
components/hubspot/actions/get-file-public-url/get-file-public-url.mjs (1)

31-35: ⚠️ Potential issue

Enhance error handling when looking up files.

Currently, the code directly accesses file.id without checking if file is defined. If no file matches the provided URL, this could result in a runtime error. Consider refactoring as shown below to ensure that you check for the existence of file before accessing its property:

-    const file = files.find(({ url }) => url === fileUrl );
-    const fileId = file.id;
-    if (!fileId) {
-      throw new Error(`File not found at ${fileUrl}`);
-    }
+    const file = files.find(({ url }) => url === fileUrl );
+    if (!file) {
+      throw new Error(`File not found at ${fileUrl}`);
+    }
+    const fileId = file.id;

This change prevents potential crashes caused by attempting to access properties on an undefined object.

🧹 Nitpick comments (1)
components/hubspot/sources/new-form-submission/new-form-submission.mjs (1)

32-32: Replace delete operator with undefined assignment.

The static analysis tool correctly flags a performance concern with the delete operator.

- delete params.after;
+ params.after = undefined;

This change maintains the same behavior while avoiding the performance impact of property deletion.

🧰 Tools
🪛 Biome (1.9.4)

[error] 32-32: Avoid the delete operator which can impact performance.

Unsafe fix: Use an undefined assignment instead.

(lint/performance/noDelete)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25c156d and a5bfb7d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (50)
  • 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/common/constants.mjs (1 hunks)
  • components/hubspot/hubspot.app.mjs (1 hunks)
  • components/hubspot/package.json (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 (2 hunks)
  • components/hubspot/sources/new-form-submission/test-event.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)
🧰 Additional context used
🪛 Biome (1.9.4)
components/hubspot/sources/new-form-submission/new-form-submission.mjs

[error] 32-32: Avoid the delete operator which can impact performance.

Unsafe fix: Use an undefined assignment instead.

(lint/performance/noDelete)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (52)
components/hubspot/package.json (1)

3-3: Version Bump Verification
The package version has been updated to "1.0.2", which is consistent with the coordinated version bump effort across multiple HubSpot modules. Make sure that any related tooling or release procedures are updated accordingly.

components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs (1)

12-12: Module Version Update
The version property has been updated to "0.0.7". This change is consistent with similar version bumps across other HubSpot sources. Ensure that any external integrations or documentation referencing the previous version are updated to reflect the new version.

components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs (1)

12-12: Module Version Update
The version has been incremented to "0.0.7". This update aligns with the broader versioning strategy observed in this PR. No functionality changes are introduced, so please confirm that downstream consumers of this module are aware of the new version.

components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs (1)

10-10: Module Version Increment
The version has been changed from "0.0.24" to "0.0.25". This minor version bump is consistent with the other HubSpot components. Ensure that any documentation or version-dependent logic is updated if necessary.

components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs (1)

10-10: Module Version Update & Pagination Enhancement
The version property is now set to "0.0.7". Additionally, the processResults method leverages the new paginate functionality (binding the appropriate HubSpot API call for blog posts) to manage pagination. This is in line with the broader improvements introduced in this PR.

components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs (1)

10-10: Version Update Confirmation

The version has been updated to "0.0.9", which is consistent with the overall version increment strategy. Ensure the release notes mention any improvements (if applicable) related to the Hubspot form submission improvements.

components/hubspot/sources/new-note/new-note.mjs (1)

11-11: Version Bump Verified

The version change from the prior release to "1.0.1" is appropriate. No functional logic has been affected.

components/hubspot/sources/delete-blog-article/delete-blog-article.mjs (1)

9-9: Consistent Version Increment

The version update to "0.0.20" accurately reflects the coordinated versioning effort. The changes do not impact functionality, so this update is straightforward.

components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs (1)

9-9: Version Update is on Target

The version number has been incremented to "0.0.20", aligning with the standardized version updates across the project. No issues detected.

components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs (1)

12-12: Version Bump Confirmed

The version has been correctly incremented to "0.0.7", ensuring consistency with the rest of the HubSpot modules. All functionality remains intact.

components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs (1)

12-12: Version Number Update Approved.
The version has been updated from "0.0.6" to "0.0.7". This is a straightforward update that does not affect any functionality.

components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs (1)

10-10: Version Number Update Approved.
The version is incremented to "0.0.20" from the previous release ("0.0.19"), which aligns with the coordinated version bumps across HubSpot modules.

components/hubspot/sources/new-task/new-task.mjs (1)

11-11: Version Number Update Approved.
The version is updated from "1.0.0" to "1.0.1". This minor version bump has no impact on functionality and maintains consistency in the module’s versioning.

components/hubspot/sources/new-event/new-event.mjs (1)

11-11: Version Number Update Approved.
The version is increased to "0.0.24". This update reflects a routine version increment without modifying the underlying functionality or control flow.

components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs (1)

9-9: Version Number Update Approved.
The version has been incremented from "0.0.4" to "0.0.5", indicating a minor update while keeping functionality intact.

components/hubspot/sources/new-social-media-message/new-social-media-message.mjs (1)

9-9: Version Update Consistency

The version field has been updated to "0.0.20". This change is purely semantic and maintains consistency with the coordinated version bump across components, without altering any behavior.

components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs (1)

12-12: Version Update Accuracy

The version has been incremented to "0.0.7", which appears consistent with our overall versioning scheme. No functionality is affected.

components/hubspot/sources/new-ticket/new-ticket.mjs (1)

12-12: Ticket Source Version Bump

Updating the version to "0.0.20" is a straightforward change that aligns with similar updates in other components. The change does not impact functionality.

components/hubspot/sources/new-engagement/new-engagement.mjs (1)

11-11: Engagement Source Version Update

The version change to "0.0.25" is correctly applied. This update is purely for version tracking and does not affect the logic or behavior of the file.

components/hubspot/sources/new-email-event/new-email-event.mjs (1)

11-11: Email Event Version Increment

The new version "0.0.23" is applied consistently with other component updates. As this is solely a version change, functionality remains intact.

components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs (1)

10-10: Version update looks good.

The version has been properly incremented from "0.0.14" to "0.0.15", following semantic versioning principles.

components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs (1)

10-10: Version update looks good.

The version has been properly incremented from "0.0.13" to "0.0.14", following semantic versioning principles.

components/hubspot/sources/new-company-property-change/new-company-property-change.mjs (1)

10-10: Version update looks good.

The version has been properly incremented from "0.0.12" to "0.0.13", following semantic versioning principles.

components/hubspot/actions/get-deal/get-deal.mjs (1)

9-9: Version update looks good.

The version has been properly incremented from "0.0.14" to "0.0.15", following semantic versioning principles.

components/hubspot/common/constants.mjs (1)

25-25:

✅ Verification successful

New API path constant added correctly.

The addition of the MARKETINGV3 constant to the API_PATH object is appropriate for accessing HubSpot's Marketing V3 API. This will enable API calls to the "/marketing/v3" endpoint.


🏁 Script executed:

#!/bin/bash
# Let's check if this new constant is being used in the PR or related files

# First, check for direct references to MARKETINGV3 in the codebase
echo "Searching for direct references to MARKETINGV3..."
rg -n "MARKETINGV3" --type js --type mjs

# Also check for references to "/marketing/v3" in case it's used directly
echo "Searching for direct string references to /marketing/v3..."
rg -n '"/marketing/v3"' --type js --type mjs

Length of output: 379


Below is an updated shell script that correctly searches both JavaScript and ECMAScript module files by using glob patterns instead of the unrecognized file type flag:


API Path Constant Verified: MARKETINGV3 Added Correctly

The new MARKETINGV3 constant in components/hubspot/common/constants.mjs (line 25) has been added as intended for accessing HubSpot’s Marketing V3 API. The revised verification script (above) now correctly searches both .js and .mjs files. No issues were identified concerning the addition.


🏁 Script executed:

#!/bin/bash
echo "Searching for direct references to MARKETINGV3 using globs..."
rg -n "MARKETINGV3" -g "*.js" -g "*.mjs"

echo "Searching for direct string references to /marketing/v3 using globs..."
rg -n '"/marketing/v3"' -g "*.js" -g "*.mjs"

Length of output: 717


API Path Constant Verified: 'MARKETINGV3' is used correctly

The new MARKETINGV3 constant in components/hubspot/common/constants.mjs has been confirmed to be correctly added for accessing HubSpot’s Marketing V3 API. It's properly referenced in the codebase (notably in components/hubspot/hubspot.app.mjs at line 719), and no discrepancies were found.

components/hubspot/actions/get-company/get-company.mjs (1)

9-9: Version Bump Confirmed
The version update to "0.0.15" is consistent with the coordinated versioning effort across HubSpot actions. No functional changes are introduced.

components/hubspot/actions/get-contact/get-contact.mjs (1)

9-9: Version Update Noted
Updating the version to "0.0.15" aligns with our systematic version increments. The module’s logic and structure remain unchanged.

components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs (1)

7-7: Module Version Increment
The version bump to "0.0.15" is applied as expected. There are no changes to functionality; this update ensures consistency with other HubSpot action modules.

components/hubspot/actions/update-contact/update-contact.mjs (1)

10-10: Version Bump Confirmation
The version has been updated to "0.0.16". This change is solely a version increment and does not affect the underlying logic. Ensure downstream integrations are aware of the update.

components/hubspot/actions/create-company/create-company.mjs (1)

9-9: Version Upgrade Verified
The version update to "0.0.19" is correctly applied. This maintains our consistent release strategy across modules without altering functionality.

components/hubspot/actions/create-ticket/create-ticket.mjs (1)

9-9: Version update for consistency.

The version field has been updated to "0.0.10", which aligns with the overall versioning strategy used across HubSpot components.

components/hubspot/actions/update-deal/update-deal.mjs (1)

10-10: Version increment applied.

The version has been updated to "0.0.6" in this module, ensuring consistency across the HubSpot action components.

components/hubspot/actions/create-lead/create-lead.mjs (1)

12-12: Version update for module consistency.

The version field is now "0.0.7", which maintains alignment with the overall versioning approach across the different HubSpot modules.

components/hubspot/actions/create-deal/create-deal.mjs (1)

9-9: Version increment for consistency.

The version field has been updated to "0.0.19", keeping the module in sync with other similar components in this release.

components/hubspot/actions/update-lead/update-lead.mjs (1)

10-10: Version update adjustment.

The version has been bumped to "0.0.7", ensuring that this module’s version is consistent with the updated release strategy.

components/hubspot/actions/create-custom-object/create-custom-object.mjs (1)

9-9: Version number updated to 1.0.1.

This version bump is consistent with the other HubSpot modules. Please ensure that any related documentation or changelogs are updated accordingly.

components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs (1)

7-7: Version number updated to 0.0.15.

The update aligns with our coordinated versioning strategy across similar modules. No further action is needed.

components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs (1)

9-9: Version number updated to 0.0.17.

This update is in line with our overall versioning approach. Ensure that components depending on this module are updated as required.

components/hubspot/actions/update-company/update-company.mjs (1)

10-10: Version number updated to 0.0.15.

The version change is handled correctly and maintains consistency with similar modules in the project.

components/hubspot/actions/get-file-public-url/get-file-public-url.mjs (1)

7-7: Version number updated to 0.0.15.

The version update is consistent with the other actions. No issues here.

components/hubspot/actions/create-communication/create-communication.mjs (1)

11-11: Version Update – Create Communication Action
The version property is updated from "0.0.7" to "0.0.8". This bump appears to be a routine version update with no changes to the functionality or logic. Please ensure that the related documentation and any downstream consumers are aware of the version change.

components/hubspot/actions/create-associations/create-associations.mjs (1)

8-8: Version Update – Create Associations Action
The module’s version has been incremented to "1.0.1". Since this update does not alter any operational logic and follows the common versioning pattern, it is approved as is.

components/hubspot/actions/search-crm/search-crm.mjs (1)

19-19: Version Update – Search CRM Action
The version update to "1.0.1" is straightforward and in line with similar changes across the codebase. There are no code logic modifications; the update strictly serves version management.

components/hubspot/actions/update-custom-object/update-custom-object.mjs (1)

9-9: Version Update – Update Custom Object Action
The version has been bumped to "1.0.1". As the change is isolated to versioning without affecting the custom object update logic, it is consistent with the project’s versioning strategy. Please verify that any external documentation referencing this action reflects the new version if applicable.

components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs (1)

10-10: Version Update – New Ticket Property Change Source
The version is updated from "0.0.13" to "0.0.14". This update does not impact the event generation or processing logic. It is advisable to ensure that any integrations or consumers that depend on event metadata are informed of this upgrade.

components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs (1)

7-7: Version increment looks good.

The version has been bumped from "0.0.11" to "0.0.12" which follows semantic versioning for minor changes.

components/hubspot/actions/create-engagement/create-engagement.mjs (1)

12-12: Version increment looks good.

The version has been bumped from "0.0.17" to "0.0.18" which follows semantic versioning for minor changes.

components/hubspot/hubspot.app.mjs (1)

715-723: New method for retrieving form definitions looks good.

The getFormDefinition method is properly implemented and follows the established patterns in the codebase. It makes a request to the HubSpot Marketing API to retrieve form definition details using the provided formId. This method will enhance the form submission functionality by allowing access to detailed form metadata.

components/hubspot/sources/new-form-submission/test-event.mjs (1)

10-11: Form metadata enrichment looks good.

The addition of the form property provides comprehensive metadata about forms, including field definitions, configuration settings, and display options. This enhancement will improve the developer experience by providing complete form context when working with form submissions.

components/hubspot/sources/new-form-submission/new-form-submission.mjs (3)

9-9: Version updated for new functionality.

Version has been incremented from 0.0.24 to 0.0.25, which is appropriate when adding new functionality.


90-95: Integration of the paginate method looks good.

The updated processResults method properly integrates the new pagination functionality, mapping over each form and passing the correct parameters to the paginate method.


40-42:

✅ Verification successful

Fetching form definitions enriches event data.

The integration with getFormDefinition is a valuable enhancement that provides complete form metadata along with the submission data.


🏁 Script executed:

#!/bin/bash
# Verify the implementation and availability of the getFormDefinition method
rg -A 5 "getFormDefinition" components/hubspot/

Length of output: 1042


Form definition fetching confirmed; no changes required.

The verification confirmed that:

  • The method getFormDefinition is defined in components/hubspot/hubspot.app.mjs and correctly invoked in components/hubspot/sources/new-form-submission/new-form-submission.mjs.
  • Enriching event data with complete form metadata is implemented as intended.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jcortes jcortes merged commit a02276e into master Mar 24, 2025
11 checks passed
@jcortes jcortes deleted the hubspot-new-form-submission-improvement branch March 24, 2025 14:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Hubspot - New form submission improvement
2 participants