Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Sep 11, 2025

Resolves #18199

Summary by CodeRabbit

  • Chores
    • Bumped patch versions across HubSpot components, including multiple actions (e.g., create/update entities, listings, workflows) and sources (e.g., new/updated objects, events, forms, tickets, engagements).
    • Updated HubSpot package version to 1.7.2 for alignment.
    • These updates standardize metadata and maintain release consistency; no behavior, inputs/outputs, or public interfaces changed.
  • Refactor
    • No user-facing refactors.
  • Bug Fixes
    • None.
  • Documentation
    • None.
  • Tests
    • None.

- Implemented new actions for managing workflows in HubSpot, including:
  - Create a new workflow
  - Retrieve workflow details
  - Retrieve emails associated with a workflow
  - Retrieve multiple workflows by their IDs
  - Retrieve migrated workflow mappings
  - Update an existing workflow
  - Delete a workflow
- Added corresponding methods in the hubspot.app.mjs for API interactions.
- Updated constants and added necessary props for each action.
- Refactored workflow-related actions to align with the v4 API, including:
  - Updated endpoints and request structures for creating, retrieving, updating, and deleting workflows.
  - Added new properties for workflow creation and management, such as `isEnabled`, `actions`, and `enrollmentCriteria`.
  - Enhanced error handling and response parsing for better integration.
- Bumped package version to 1.7.0 to reflect these changes.
- Deleted the `retrieve-batch-workflows` action from HubSpot components as part of the ongoing refactor to streamline workflow management actions.
- Updated the `update-workflow` action to change the `revisionId` type from string to integer for better data integrity.
- Bumped version numbers for multiple HubSpot actions and sources to reflect recent updates and improvements.
- Actions updated include: add-contact-to-list, batch-create-companies, batch-update-companies, create-associations, create-communication, and more.
- Sources updated include: new-company-property-change, new-contact-property-change, new-deal-property-change, and others.
- Ensured consistency across versioning for better management and tracking of changes.
- Updated workflow-related actions to utilize the v3 API instead of v4.
- Renamed variables for clarity and consistency.
- Removed deprecated props from create and update workflow actions.
- Adjusted descriptions in action components to reflect the new API documentation.
- Bumped versions for several source components to maintain compatibility.
…maintain compatibility with the latest API changes.
@vercel
Copy link

vercel bot commented Sep 11, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 11, 2025 5:52pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 11, 2025 5:52pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 11, 2025

Walkthrough

Patch release updates across HubSpot components: version fields were incremented in multiple actions and sources, plus a package.json version bump. No functional code, control flow, or API surface changes were made.

Changes

Cohort / File(s) Summary of Changes
HubSpot CRM actions (create/update/get)
components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs, .../batch-create-companies/batch-create-companies.mjs, .../batch-create-or-update-contact/batch-create-or-update-contact.mjs, .../batch-update-companies/batch-update-companies.mjs, .../batch-upsert-companies/batch-upsert-companies.mjs, .../create-company/create-company.mjs, .../create-contact-workflow/create-contact-workflow.mjs, .../create-custom-object/create-custom-object.mjs, .../create-deal/create-deal.mjs, .../create-engagement/create-engagement.mjs, .../create-lead/create-lead.mjs, .../create-meeting/create-meeting.mjs, .../create-note/create-note.mjs, .../create-or-update-contact/create-or-update-contact.mjs, .../create-task/create-task.mjs, .../create-ticket/create-ticket.mjs, .../enroll-contact-into-workflow/enroll-contact-into-workflow.mjs, .../get-company/get-company.mjs, .../get-contact/get-contact.mjs, .../get-deal/get-deal.mjs, .../get-meeting/get-meeting.mjs, .../search-crm/search-crm.mjs, .../update-company/update-company.mjs, .../update-contact/update-contact.mjs, .../update-custom-object/update-custom-object.mjs, .../update-deal/update-deal.mjs
Version fields bumped only; no logic, props, or control-flow changes.
HubSpot CMS/Marketing actions
components/hubspot/actions/clone-email/clone-email.mjs, .../clone-site-page/clone-site-page.mjs, .../create-email/create-email.mjs, .../create-form/create-form.mjs, .../create-landing-page/create-landing-page.mjs, .../create-page/create-page.mjs, .../get-file-public-url/get-file-public-url.mjs, .../get-associated-emails/get-associated-emails.mjs, .../get-associated-meetings/get-associated-meetings.mjs, .../get-subscription-preferences/get-subscription-preferences.mjs, .../list-blog-posts/list-blog-posts.mjs, .../list-campaigns/list-campaigns.mjs, .../list-forms/list-forms.mjs, .../list-marketing-emails/list-marketing-emails.mjs, .../list-marketing-events/list-marketing-events.mjs, .../list-pages/list-pages.mjs, .../list-templates/list-templates.mjs, .../update-fields-on-the-form/update-fields-on-the-form.mjs, .../update-landing-page/update-landing-page.mjs, .../update-page/update-page.mjs
Version-only updates; no implementation changes.
HubSpot Workflow actions
components/hubspot/actions/create-workflow/create-workflow.mjs, .../delete-workflow/delete-workflow.mjs, .../retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs, .../retrieve-workflow-details/retrieve-workflow-details.mjs, .../retrieve-workflow-emails/retrieve-workflow-emails.mjs, .../retrieve-workflows/retrieve-workflows.mjs
Version bumped across workflow-related actions; no functional modifications.
HubSpot sources
components/hubspot/sources/delete-blog-article/delete-blog-article.mjs, .../new-company-property-change/new-company-property-change.mjs, .../new-contact-added-to-list/new-contact-added-to-list.mjs, .../new-contact-property-change/new-contact-property-change.mjs, .../new-custom-object-property-change/new-custom-object-property-change.mjs, .../new-deal-in-stage/new-deal-in-stage.mjs, .../new-deal-property-change/new-deal-property-change.mjs, .../new-email-event/new-email-event.mjs, .../new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs, .../new-engagement/new-engagement.mjs, .../new-event/new-event.mjs, .../new-form-submission/new-form-submission.mjs, .../new-note/new-note.mjs, .../new-or-updated-blog-article/new-or-updated-blog-article.mjs, .../new-or-updated-company/new-or-updated-company.mjs, .../new-or-updated-contact/new-or-updated-contact.mjs, .../new-or-updated-crm-object/new-or-updated-crm-object.mjs, .../new-or-updated-custom-object/new-or-updated-custom-object.mjs, .../new-or-updated-deal/new-or-updated-deal.mjs, .../new-or-updated-line-item/new-or-updated-line-item.mjs, .../new-or-updated-product/new-or-updated-product.mjs, .../new-social-media-message/new-social-media-message.mjs, .../new-task/new-task.mjs, .../new-ticket-property-change/new-ticket-property-change.mjs, .../new-ticket/new-ticket.mjs
Version-only bumps; no code behavior changes.
Package metadata
components/hubspot/package.json
Package version updated from 1.7.1 to 1.7.2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

User submitted

Suggested reviewers

  • jcortes
  • michelle0927

Pre-merge checks (2 passed, 3 warnings)

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The PR contains version bumps for the workflow-related actions and sources for create-workflow, retrieve-workflows, retrieve-workflow-details, retrieve-workflow-emails, delete-workflow, and retrieve-migrated-workflow-mappings, indicating partial implementation of the linked issue's objectives, but I do not see evidence in the provided summary of an update-workflow action or a dedicated "batch read workflows" (POST /automation/v4/flows/batch/read) endpoint, so the issue's full set of requested operations is not satisfied. Either add the missing endpoints (update-workflow and the batch-read workflows endpoint) with tests and documentation, or update the PR/issue to explicitly state which objectives are intentionally omitted and why, and map each implemented objective to its file(s).
Out of Scope Changes Check ⚠️ Warning The diff shows many unrelated, package-wide version-only bumps across numerous HubSpot actions and sources plus a components/hubspot/package.json version bump; these changes appear out of scope for the workflow-API objective in issue #18199 and are not justified in the PR description. Separate unrelated version bumps into their own release/maintenance PR or document in this PR why those bumps are required for the workflow changes; keep this PR focused on implementing and testing the workflow API endpoints.
Description Check ⚠️ Warning The PR description only contains "Resolves #18199" and does not follow the repository template that requires a "## WHY" section; it lacks a summary of what was changed, which endpoints/actions were implemented, testing or verification steps, and rationale for the unrelated version bumps seen in the diff. Please update the PR description to use the repository template (include a "## WHY" section), add a concise summary of implemented files/endpoints, note any missing/unimplemented objectives, and include testing/verification steps and rationale for unrelated version/package changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title references issue 18199 and indicates HubSpot workflow API actions were changed/added, so it is directly related to the main change in the PR; however it is terse and could be more descriptive for teammates scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I nudge the numbers, hop by hop,
Patchy clouds of versions pop.
No wires crossed, no flows askew,
Just spruced-up tags in fields anew.
Thump-thump! the release drums beat—
A tidy warren, ship it neat. 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 18199-action-hubspot-workflow-api

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (14)
components/hubspot/actions/list-campaigns/list-campaigns.mjs (1)

36-73: Shadowed results and self-appending loop cause wrong output and potential runaway iteration; optional chaining bug.

  • Outer accumulator results is shadowed by { results } from the API, then results.push(results[i]) pattern mutates the iterated array.
  • paging?.next.after throws if paging.next is undefined; needs ?. on both hops.
   async run({ $ }) {
-    const results = [];
-    let hasMore,
-      count = 0;
+    const items = [];
+    let after;
+    let count = 0;
@@
-    do {
-      const {
-        paging, results,
-      } = await this.hubspot.listCampaigns({
+    do {
+      const {
+        paging, results: pageResults,
+      } = await this.hubspot.listCampaigns({
         $,
         params,
       });
-      if (!results?.length) {
+      if (!pageResults?.length) {
         break;
       }
-      for (const item of results) {
-        results.push(item);
+      for (const item of pageResults) {
+        items.push(item);
         count++;
         if (count >= this.maxResults) {
           break;
         }
       }
-      hasMore = paging?.next.after;
-      params.after = paging?.next.after;
-    } while (hasMore && count < this.maxResults);
+      after = paging?.next?.after;
+      params.after = after;
+    } while (after && count < this.maxResults);
@@
-    $.export(
-      "$summary",
-      `Found ${results.length} campaign${results.length === 1
-        ? ""
-        : "s"}`,
-    );
-    return results;
+    $.export(
+      "$summary",
+      `Found ${items.length} campaign${items.length === 1 ? "" : "s"}`,
+    );
+    return items;
components/hubspot/sources/new-task/new-task.mjs (1)

36-44: Possible TypeError: spreading undefined when schemas API returns no results.
[...customObjects] will throw if custom is undefined. Default to an empty array.

-      const objectTypes = OBJECT_TYPES.map(({ value }) => value);
-      const { results: custom } = await this.hubspot.listSchemas();
-      const customObjects = custom?.map(
+      const objectTypes = OBJECT_TYPES.map(({ value }) => value);
+      const { results: custom } = await this.hubspot.listSchemas();
+      const customObjects = (custom ?? []).map(
         ({ fullyQualifiedName }) => fullyQualifiedName,
       );
       const associations = [
         ...objectTypes,
         ...customObjects,
       ];
components/hubspot/sources/new-note/new-note.mjs (1)

35-41: Same spread-of-undefined risk as other source.
Default customObjects to [] before spreading.

-      const objectTypes = OBJECT_TYPES.map(({ value }) => value);
-      const { results: custom } = await this.hubspot.listSchemas();
-      const customObjects = custom?.map(({ fullyQualifiedName }) => fullyQualifiedName);
+      const objectTypes = OBJECT_TYPES.map(({ value }) => value);
+      const { results: custom } = await this.hubspot.listSchemas();
+      const customObjects = (custom ?? []).map(({ fullyQualifiedName }) => fullyQualifiedName);
       const associations = [
         ...objectTypes,
         ...customObjects,
       ];
components/hubspot/actions/list-pages/list-pages.mjs (1)

82-126: Same results shadowing/self-append bug and optional chaining issue as campaigns.
Fix accumulator naming and paging?.next?.after.

   async run({ $ }) {
-    const results = [];
-    let hasMore,
-      count = 0;
+    const items = [];
+    let after;
+    let count = 0;
@@
-    do {
-      const {
-        paging, results,
-      } = await this.hubspot.listPages({
+    do {
+      const {
+        paging, results: pageResults,
+      } = await this.hubspot.listPages({
         $,
         params,
       });
-      if (!results?.length) {
+      if (!pageResults?.length) {
         break;
       }
-      for (const item of results) {
-        results.push(item);
+      for (const item of pageResults) {
+        items.push(item);
         count++;
         if (count >= this.maxResults) {
           break;
         }
       }
-      hasMore = paging?.next.after;
-      params.after = paging?.next.after;
-    } while (hasMore && count < this.maxResults);
+      after = paging?.next?.after;
+      params.after = after;
+    } while (after && count < this.maxResults);
@@
-    $.export(
-      "$summary",
-      `Found ${results.length} page${results.length === 1
-        ? ""
-        : "s"}`,
-    );
-    return results;
+    $.export(
+      "$summary",
+      `Found ${items.length} page${items.length === 1 ? "" : "s"}`,
+    );
+    return items;
components/hubspot/actions/list-blog-posts/list-blog-posts.mjs (1)

97-116: Fix variable shadowing and self-extending iteration (can loop indefinitely or duplicate items).

results from the API response shadows the outer accumulator results, and you push into the same array you're iterating. Rename and push into the accumulator.

Apply:

-  const results = [];
+  const allResults = [];
@@
-    do {
-      const {
-        paging, results,
-      } = await this.hubspot.getBlogPosts({
+    do {
+      const {
+        paging, results: pageResults,
+      } = await this.hubspot.getBlogPosts({
         $,
         params,
       });
-      if (!results?.length) {
+      if (!pageResults?.length) {
         break;
       }
-      for (const item of results) {
-        results.push(item);
-        count++;
-        if (count >= this.maxResults) {
-          break;
-        }
-      }
-      hasMore = paging?.next.after;
+      const remaining = this.maxResults - count;
+      const toAdd = pageResults.slice(0, Math.max(0, remaining));
+      allResults.push(...toAdd);
+      count += toAdd.length;
+      hasMore = Boolean(paging?.next?.after);
       params.after = paging?.next.after;
-    } while (hasMore && count < this.maxResults);
+    } while (hasMore && count < this.maxResults);
@@
-    $.export(
-      "$summary",
-      `Found ${results.length} page${results.length === 1
+    $.export(
+      "$summary",
+      `Found ${allResults.length} post${allResults.length === 1
         ? ""
         : "s"}`,
     );
-    return results;
+    return allResults;

Also applies to: 82-85, 107-113

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

33-61: Guard against undefined search results to avoid runtime errors.

results may be undefined; .includes and the for...of would throw. Default to [].

Apply:

-      const { results } = await this.hubspot.searchCRM({
+      const { results = [] } = await this.hubspot.searchCRM({
@@
-      const updateEmails = results?.map(({ properties }) => properties.email);
+      const updateEmails = results.map(({ properties }) => properties.email);
@@
-      for (const contact of results) {
+      for (const contact of results) {
         updateProperties.push({
           id: contact.id,
           properties: contacts.find(
             ({ email }) => contact.properties.email === email,
           ),
         });
       }

85-101: Skip empty batch calls; HubSpot APIs often error on empty inputs.

Only call create/update when there are items; shape the response accordingly and keep the summary accurate.

-    let response = {};
-    response.created = await this.hubspot.batchCreateContacts({
+    const response = {};
+    if (insertProperties.length) {
+      response.created = await this.hubspot.batchCreateContacts({
         $,
         data: {
           inputs: insertProperties,
         },
-    });
-    response.updated = await this.hubspot.batchUpdateContacts({
+      });
+    }
+    if (updateProperties.length) {
+      response.updated = await this.hubspot.batchUpdateContacts({
         $,
         data: {
           inputs: updateProperties,
         },
-    });
+      });
+    }
@@
-    $.export(
-      "$summary",
-      `Successfully created ${insertProperties.length} and updated ${updateProperties.length} contacts`,
-    );
+    $.export("$summary",
+      `Created ${insertProperties.length} • Updated ${updateProperties.length}`);

Also applies to: 89-101, 103-109

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

84-88: Fix association lookup and handle “not found”.

Use the method arg instead of this.associationType, and fail fast if the type isn’t returned by HubSpot to avoid Cannot read properties of undefined (reading 'category').

-      const association = results.find(
-        ({ typeId }) => typeId === this.associationType,
-      );
-      return association.category;
+      const association = results.find(({ typeId }) => typeId === associationType);
+      if (!association) {
+        throw new ConfigurationError(
+          `Association type ${associationType} not found for ${fromObjectType} -> ${toObjectType}.`
+        );
+      }
+      return association.category;
components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs (1)

88-123: Logic bug: shadowed results var and self-appending array causes incorrect accumulation.

const { paging, results } = ... shadows the outer array, then for (const item of results) { results.push(item) } appends to the same array being iterated. Accumulator remains empty and loop risks unintended growth. Fix by separating accumulator and page results.

-  const results = [];
+  const items = [];
   let hasMore,
     count = 0;

   const params = {
     ...
   };

   do {
-    const {
-      paging, results,
-    } = await this.hubspot.listMarketingEmails({
+    const {
+      paging, results: pageResults,
+    } = await this.hubspot.listMarketingEmails({
       $,
       params,
     });
-    if (!results?.length) {
+    if (!pageResults?.length) {
       break;
     }
-    for (const item of results) {
-      results.push(item);
+    for (const item of pageResults) {
+      items.push(item);
       count++;
       if (count >= this.maxResults) {
         break;
       }
     }
-    hasMore = paging?.next.after;
-    params.after = paging?.next.after;
+    const after = paging?.next?.after;
+    hasMore = Boolean(after);
+    params.after = after;
   } while (hasMore && count < this.maxResults);

   $.export(
     "$summary",
-    `Found ${results.length} email${results.length === 1
+    `Found ${items.length} email${items.length === 1
       ? ""
       : "s"}`,
   );
-  return results;
+  return items;
components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs (1)

203-213: Incorrect custom timeframe filter (operators inverted).

For a custom range, start should be GTE startDate and end should be LTE endDate. Current logic returns the inverse window.

-      case "custom":
-        return {
-          hs_meeting_start_time: {
-            operator: "LTE",
-            value: startDate,
-          },
-          hs_meeting_end_time: {
-            operator: "GTE",
-            value: endDate,
-          },
-        };
+      case "custom":
+        return {
+          hs_meeting_start_time: {
+            operator: "GTE",
+            value: startDate,
+          },
+          hs_meeting_end_time: {
+            operator: "LTE",
+            value: endDate,
+          },
+        };
components/hubspot/actions/list-forms/list-forms.mjs (1)

27-54: Bug: results array is shadowed, returning empty array and corrupting pagination

Inside the loop, results from the API response shadows the outer accumulator results, so you push into the API page array instead of the accumulator. The final return will likely be [], and this also risks confusing pagination logic.

Apply this fix:

-    const results = [];
+    const results = [];
@@
-      const {
-        paging, results,
-      } = await this.hubspot.listMarketingForms({
+      const {
+        paging, results: apiResults,
+      } = await this.hubspot.listMarketingForms({
         $,
         params,
       });
-      if (!results?.length) {
+      if (!apiResults?.length) {
         break;
       }
-      for (const item of results) {
-        results.push(item);
+      for (const item of apiResults) {
+        results.push(item);
         count++;
         if (count >= this.maxResults) {
           break;
         }
       }
components/hubspot/actions/retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs (1)

40-57: Broken inputs parsing and payload shape for batch mapping.

  • Uses this.workflowIds but prop is workflow.
  • Payload keys look like response fields; API expects { id, type }.

Apply:

-    const parsedFlowIds = parseObject(this.flowIds) || [];
-    const parsedWorkflowIds = parseObject(this.workflowIds) || [];
-
-    const flowIds = [];
-    const workflowIds = [];
-
-    for (const flowId of parsedFlowIds) {
-      flowIds.push({
-        flowMigrationStatuses: `${flowId}`,
-        type: "FLOW_ID",
-      });
-    }
-    for (const workflowId of parsedWorkflowIds) {
-      workflowIds.push({
-        flowMigrationStatusForClassicWorkflows: `${workflowId}`,
-        type: "WORKFLOW_ID",
-      });
-    }
+    const parsedFlowIds = parseObject(this.flowIds) || [];
+    const parsedWorkflowIds = parseObject(this.workflow) || [];
+    const inputs = [
+      ...parsedFlowIds.map((id) => ({ id: String(id), type: "FLOW_ID" })),
+      ...parsedWorkflowIds.map((id) => ({ id: String(id), type: "WORKFLOW_ID" })),
+    ];

And:

-    const response = await this.hubspot.getMigratedWorkflowMappings({
+    const response = await this.hubspot.getMigratedWorkflowMappings({
       $,
-      data: {
-        inputs: [
-          ...flowIds,
-          ...workflowIds,
-        ],
-      },
+      data: { inputs },
     });
components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs (1)

44-47: Bug: uses this.isNew instead of this.newOnly.
This breaks timestamp selection and dedupe behavior.

Apply:

-      return this.isNew
+      return this.newOnly
         ? Date.parse(company.createdAt)
         : Date.parse(company.updatedAt);
components/hubspot/actions/list-marketing-events/list-marketing-events.mjs (1)

21-27: Fix variable shadowing and self-growing loop in pagination.

Shadowing results and pushing into the iterated array risks unbounded growth. Use a separate accumulator and rename the page results.

Apply:

-    const results = [];
+    const items = [];
@@
-      const {
-        paging, results,
-      } = await this.hubspot.listMarketingEvents({
+      const {
+        paging, results: pageResults,
+      } = await this.hubspot.listMarketingEvents({
         $,
         params,
       });
-      if (!results?.length) {
+      if (!pageResults?.length) {
         break;
       }
-      for (const item of results) {
-        results.push(item);
+      for (const item of pageResults) {
+        items.push(item);
         count++;
         if (count >= this.maxResults) {
           break;
         }
       }
@@
-    $.export(
+    $.export(
       "$summary",
-      `Found ${results.length} event${results.length === 1
+      `Found ${items.length} event${items.length === 1
         ? ""
         : "s"}`,
     );
-    return results;
+    return items;

Also applies to: 29-31, 38-47, 49-56

🧹 Nitpick comments (23)
components/hubspot/sources/new-engagement/new-engagement.mjs (1)

19-19: Typo: “engagment” → “engagement”.
User-facing description should be corrected.

Apply:

-      description: "Filter results by the type of engagment",
+      description: "Filter results by the type of engagement",
components/hubspot/actions/get-deal/get-deal.mjs (1)

14-18: Brand capitalization nit: “Hubspot” → “HubSpot”.
User-facing description should use the correct brand case.

       label: "Deal ID",
-      description: "Hubspot's internal ID for the deal",
+      description: "HubSpot's internal ID for the deal",
components/hubspot/actions/create-workflow/create-workflow.mjs (1)

5-29: Scope gap vs. Issue #18199.
This PR doesn’t add the other required actions (retrieve emails, get flow, list flows, batch read, update, delete, migrated ID mappings). I can scaffold these quickly following existing action conventions.

components/hubspot/actions/list-blog-posts/list-blog-posts.mjs (1)

118-123: Nit: “page(s)” → “post(s)” in summary text.

It’s listing blog posts, not pages.

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

20-31: Optional: harden JSON parsing and input normalization.

Wrap JSON.parse calls with try/catch and throw a ConfigurationError with a helpful message when a contact string isn’t valid JSON.

components/hubspot/actions/batch-create-companies/batch-create-companies.mjs (1)

49-54: Harden error parsing; current logic is brittle and can throw during handling.

Avoid nested JSON.parse and regex splits that assume a specific format. Fallback safely.

-    } catch (error) {
-      const message = JSON.parse(
-        JSON.parse(error.message).message.split(/:(.+)/)[1],
-      )[0].message;
-      throw new ConfigurationError(message.split(/:(.+)/)[0]);
-    }
+    } catch (error) {
+      let msg = "Failed to create companies";
+      try {
+        const parsed = typeof error.message === "string" ? JSON.parse(error.message) : error;
+        const inner = typeof parsed?.message === "string" ? JSON.parse(parsed.message) : parsed?.message;
+        msg = inner?.[0]?.message ?? parsed?.message ?? msg;
+      } catch (_) { /* ignore */ }
+      throw new ConfigurationError(String(msg).split(/:(.+)/)[0]);
+    }
components/hubspot/actions/get-associated-emails/get-associated-emails.mjs (4)

72-75: Clarify boolean precedence in length check.

The current condition relies on operator precedence (!results?.length > 0). Make the intent explicit to avoid misreads.

Apply:

-    if (!results?.length > 0) {
+    if (!results?.length) {

81-88: Harden against undefined results from batch get.

Default emails to an empty array to prevent potential emails.length/sort errors if the API returns no results.

-    const { results: emails } = await this.hubspot.batchGetObjects({
+    const { results: emails = [] } = await this.hubspot.batchGetObjects({
       $,
       objectType: "emails",
       data: {
         properties,
         inputs: emailIds,
       },
     });

90-96: Remove dead fallback after defaulting and simplify sort.

After defaulting emails = [], optional chaining and || [] are unnecessary.

-    // Sort emails by timestamp in descending order (most recent first)
-    emails?.sort((a, b) => {
+    // Sort emails by timestamp in descending order (most recent first)
+    emails.sort((a, b) => {
       const timestampA = new Date(a.properties?.hs_timestamp || 0).getTime();
       const timestampB = new Date(b.properties?.hs_timestamp || 0).getTime();
       return timestampB - timestampA;
-    }) || [];
+    });

1-104: Scope check: PR doesn’t implement the HubSpot Workflows API requested in Issue #18199.

This diff only bumps versions. None of the required Workflow endpoints (GET/POST/PUT/DELETE /automation/v4/flows…, email-campaigns, workflow-id-mappings) are added.

Confirm if this PR is a version sweep only. If not, I can scaffold actions for:

  • GET /automation/v4/flows
  • GET /automation/v4/flows/{flowId}
  • POST /automation/v4/flows
  • PUT /automation/v4/flows/{flowId}
  • DELETE /automation/v4/flows/{flowId}
  • POST /automation/v4/flows/batch/read
  • GET /automation/v4/flows/email-campaigns
  • POST /automation/v4/workflow-id-mappings/batch/read
components/hubspot/actions/create-associations/create-associations.mjs (1)

95-104: Validate parsed toObjectIds.

Ensure a non-empty array after parsing to prevent silent no-ops or confusing API errors.

     if (Array.isArray(this.toObjectIds)) {
       toObjectIds = this.toObjectIds;
     } else {
       try {
         toObjectIds = JSON.parse(this.toObjectIds);
       } catch {
         throw new ConfigurationError("Could not parse \"To Objects\" array.");
       }
     }
+    if (!Array.isArray(toObjectIds) || toObjectIds.length === 0) {
+      throw new ConfigurationError("\"To Objects\" must be a non-empty array of IDs.");
+    }
components/hubspot/actions/create-note/create-note.mjs (1)

114-116: Validate hs_task_reminders before assigning epoch.

Date.parse can return NaN; guard and provide a clear error.

-    if (properties.hs_task_reminders) {
-      properties.hs_task_reminders = Date.parse(properties.hs_task_reminders);
-    }
+    if (properties.hs_task_reminders) {
+      const ts = Date.parse(properties.hs_task_reminders);
+      if (Number.isNaN(ts)) {
+        throw new ConfigurationError("Invalid hs_task_reminders date. Use ISO 8601 or epoch ms.");
+      }
+      properties.hs_task_reminders = ts;
+    }
components/hubspot/actions/search-crm/search-crm.mjs (1)

263-272: Guard against missing searchableProperties.

Some schemas may not define searchableProperties. Add a defensive check to avoid a runtime TypeError on includes.

-    if (!schema.searchableProperties.includes(searchProperty)) {
+    if (!Array.isArray(schema.searchableProperties) ||
+        !schema.searchableProperties.includes(searchProperty)) {
       throw new ConfigurationError(
         `Property \`${searchProperty}\` is not a searchable property of object type \`${objectType}\`. ` +
           `\n\nAvailable searchable properties are: \`${schema.searchableProperties.join("`, `")}\``,
       );
     }
components/hubspot/sources/delete-blog-article/delete-blog-article.mjs (1)

21-26: Use deletedAt for event timestamp to match source semantics.

getTs uses deletedAt, but generateMeta sets ts from created. Align to deletion time for correct ordering/dedupe.

-      const ts = Date.parse(blogpost.created);
+      const ts = this.getTs(blogpost);
components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs (1)

48-52: Brittle error parsing; add safe fallbacks.

The nested JSON.parse + regex split can throw and obscure the original error. Prefer defensive parsing and fallback to the raw message.

-      const message = JSON.parse(
-        JSON.parse(error.message).message.split(/:(.+)/)[1],
-      )[0].message;
-      throw new ConfigurationError(message.split(/:(.+)/)[0]);
+      let parsedMsg = error.message;
+      try {
+        const outer = JSON.parse(error.message);
+        const inner = typeof outer.message === "string" ? outer.message : "";
+        const afterColon = inner.split(/:(.+)/)[1] ?? inner;
+        const arr = JSON.parse(afterColon);
+        parsedMsg = Array.isArray(arr) && arr[0]?.message ? arr[0].message : inner || parsedMsg;
+      } catch (_) {
+        // fall through to use parsedMsg as-is
+      }
+      throw new ConfigurationError((parsedMsg.split(/:(.+)/)[0] || parsedMsg).trim());
components/hubspot/actions/retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs (1)

69-71: Edge case: empty inputs.
If both arrays are empty, consider throwing a ConfigurationError before the request.

components/hubspot/actions/batch-update-companies/batch-update-companies.mjs (1)

50-54: Harden error parsing to avoid JSON.parse crashes.

Current parsing can throw on unexpected formats. Use defensive extraction.

-      const message = JSON.parse(
-        JSON.parse(error.message).message.split(/:(.+)/)[1],
-      )[0].message;
-      throw new ConfigurationError(message.split(/:(.+)/)[0]);
+      let message = error?.message;
+      try {
+        const parsed = JSON.parse(error.message);
+        message = parsed?.message ?? message;
+      } catch (_) { /* keep fallback */ }
+      throw new ConfigurationError(String(message).split(/:(.+)/)[0]);
components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs (1)

12-12: Nit: brand capitalization.

Use “HubSpot” (capital S) in user-facing text.

Apply:

-  description: "Emit new event for each new line item added or updated in Hubspot.",
+  description: "Emit new event for each new line item added or updated in HubSpot.",
components/hubspot/actions/create-lead/create-lead.mjs (1)

11-13: Nit: brand capitalization.

Prefer “HubSpot” in descriptions.

-  description:
-    "Create a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#create-leads)",
+  description:
+    "Create a lead in HubSpot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#create-leads)",
components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs (1)

9-9: Nit: brand capitalization.

Change “Hubspot” → “HubSpot”.

-    "Create or update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)",
+    "Create or update a contact in HubSpot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)",
components/hubspot/actions/create-landing-page/create-landing-page.mjs (1)

9-9: Nit: brand capitalization.

Update to “HubSpot”.

-    "Create a landing page in Hubspot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#post-%2Fcms%2Fv3%2Fpages%2Flanding-pages)",
+    "Create a landing page in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#post-%2Fcms%2Fv3%2Fpages%2Flanding-pages)",
components/hubspot/actions/update-contact/update-contact.mjs (1)

10-10: Nit: brand capitalization.

Use “HubSpot”.

-    "Update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)",
+    "Update a contact in HubSpot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)",
components/hubspot/actions/retrieve-workflow-emails/retrieve-workflow-emails.mjs (1)

48-49: Guard summary against empty/undefined results.

Avoid potential Cannot read properties of undefined (reading 'length') if API shape changes or errors are partial.

-    $.export("$summary", `Successfully retrieved ${response.results.length} emails for workflow ${this.workflowId}`);
+    const count = response?.results?.length ?? 0;
+    $.export("$summary", `Successfully retrieved ${count} emails for workflow ${this.workflowId}`);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4e584e and ad02968.

📒 Files selected for processing (81)
  • components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs (1 hunks)
  • components/hubspot/actions/batch-create-companies/batch-create-companies.mjs (1 hunks)
  • components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs (1 hunks)
  • components/hubspot/actions/batch-update-companies/batch-update-companies.mjs (1 hunks)
  • components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs (1 hunks)
  • components/hubspot/actions/clone-email/clone-email.mjs (1 hunks)
  • components/hubspot/actions/clone-site-page/clone-site-page.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-contact-workflow/create-contact-workflow.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-email/create-email.mjs (1 hunks)
  • components/hubspot/actions/create-engagement/create-engagement.mjs (1 hunks)
  • components/hubspot/actions/create-form/create-form.mjs (1 hunks)
  • components/hubspot/actions/create-landing-page/create-landing-page.mjs (1 hunks)
  • components/hubspot/actions/create-lead/create-lead.mjs (1 hunks)
  • components/hubspot/actions/create-meeting/create-meeting.mjs (1 hunks)
  • components/hubspot/actions/create-note/create-note.mjs (1 hunks)
  • components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs (1 hunks)
  • components/hubspot/actions/create-page/create-page.mjs (1 hunks)
  • components/hubspot/actions/create-task/create-task.mjs (1 hunks)
  • components/hubspot/actions/create-ticket/create-ticket.mjs (1 hunks)
  • components/hubspot/actions/create-workflow/create-workflow.mjs (1 hunks)
  • components/hubspot/actions/delete-workflow/delete-workflow.mjs (1 hunks)
  • components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs (1 hunks)
  • components/hubspot/actions/get-associated-emails/get-associated-emails.mjs (1 hunks)
  • components/hubspot/actions/get-associated-meetings/get-associated-meetings.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/get-meeting/get-meeting.mjs (1 hunks)
  • components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs (1 hunks)
  • components/hubspot/actions/list-blog-posts/list-blog-posts.mjs (1 hunks)
  • components/hubspot/actions/list-campaigns/list-campaigns.mjs (1 hunks)
  • components/hubspot/actions/list-forms/list-forms.mjs (1 hunks)
  • components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs (1 hunks)
  • components/hubspot/actions/list-marketing-events/list-marketing-events.mjs (1 hunks)
  • components/hubspot/actions/list-pages/list-pages.mjs (1 hunks)
  • components/hubspot/actions/list-templates/list-templates.mjs (1 hunks)
  • components/hubspot/actions/retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs (1 hunks)
  • components/hubspot/actions/retrieve-workflow-details/retrieve-workflow-details.mjs (1 hunks)
  • components/hubspot/actions/retrieve-workflow-emails/retrieve-workflow-emails.mjs (1 hunks)
  • components/hubspot/actions/retrieve-workflows/retrieve-workflows.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-fields-on-the-form/update-fields-on-the-form.mjs (1 hunks)
  • components/hubspot/actions/update-landing-page/update-landing-page.mjs (1 hunks)
  • components/hubspot/actions/update-lead/update-lead.mjs (1 hunks)
  • components/hubspot/actions/update-page/update-page.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-added-to-list/new-contact-added-to-list.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)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (84)
components/hubspot/sources/new-company-property-change/new-company-property-change.mjs (1)

10-10: LGTM: patch version bump only

No functional changes. Safe to publish.

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

10-10: Patch bump only — LGTM.

No logic changes detected. Confirm this version aligns with the hubspot package.json bump and that a release note is added noting “no functional changes.”

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

10-10: LGTM — patch version bump to 0.0.16

Quick check confirms components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs contains version: "0.0.16" and still spreads ...common — no functional changes detected.

components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs (1)

8-8: Version bump only — verify top-level package.json version

components/hubspot/actions/get-subscription-preferences/get-subscription-preferences.mjs → version "0.0.7"; top-level package.json → 1.2.1 (PR description expects 1.7.2). Confirm whether package.json should be bumped or the PR description updated.

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

11-11: LGTM: version bump only.
Looks good. Please ensure package.json and release notes reflect this version.

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

8-8: LGTM: version bump only.
No functional changes observed.


3-39: Incorrect — Automation v4 Workflows actions are present in this PR

Found these files in components/hubspot/actions/:

  • create-contact-workflow/create-contact-workflow.mjs
  • create-workflow/create-workflow.mjs
  • delete-workflow/delete-workflow.mjs
  • enroll-contact-into-workflow/enroll-contact-into-workflow.mjs
  • retrieve-workflows/retrieve-workflows.mjs

Likely an incorrect or invalid review comment.


6-8: Update HubSpot docs link and API note
Description currently points to legacydocs and states the Workflows API “only supports contact-based workflows” and is enterprise-only. HubSpot now documents Automation (Workflows) v4 (beta) while v3 is legacy (still usable in many cases but being migrated and may not support newer workflow IDs). Replace the legacy link with the current Automation v4 docs (or include both v4 + v3 legacy links) and clarify whether this action targets the v3 enroll endpoint (enterprise-only/contact-based) or the v4 API; confirm compatibility with the workflows/IDs you intend to support.

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

10-10: LGTM: version bump only.
No behavior changes detected.

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

13-13: LGTM: version bump only.
All good.

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

11-11: LGTM: version bump only.
Looks consistent with surrounding modules.

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

11-11: LGTM: version bump only.
No further changes needed.

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

10-10: LGTM: version bump only.
No functional diffs observed.

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

10-10: LGTM: version bump only.
Ship it.

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

10-10: Version bump only — OK.
No functional impact.

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

12-12: Version bump only — OK.

components/hubspot/package.json (1)

3-3: Package version bump — OK.
No dependency or script changes.

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

14-14: Version bump only — OK.

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

11-11: Version bump only — OK.

components/hubspot/actions/list-pages/list-pages.mjs (1)

9-9: Version bump only — OK.

components/hubspot/actions/create-workflow/create-workflow.mjs (2)

8-8: Version bump only — OK.


7-9: Update doc link to Automation v4 and confirm POST /automation/v4/flows usage

Automation v4 "Create a workflow" endpoint is POST /automation/v4/flows (v4 is a public beta; v3 is still available and not listed as deprecated). Update components/hubspot/actions/create-workflow/create-workflow.mjs (lines 7–9) description to point to the v4 docs: https://developers.hubspot.com/docs/api/automation/workflows — and verify the implementation calls POST /automation/v4/flows (or intentionally remain on v3 if that was the plan).

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

10-10: LGTM — version bump only.

No functional changes observed.

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

11-11: LGTM — version bump only.

No functional changes observed.

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

11-11: LGTM — version bump only.

No functional changes observed.

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

10-10: LGTM — version bump only.

No functional changes observed.

components/hubspot/actions/get-associated-emails/get-associated-emails.mjs (1)

9-9: Version bump only — OK.

No functional changes. Safe to merge.

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

9-9: Version bump only — OK.

No functional changes.

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

11-11: Version bump only — OK.

No logic changes.

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

10-10: Version bump only — OK.

No functional changes.

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

10-10: Version bump only — OK.

No functional changes.

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

12-12: Version bump only — OK.

No functional changes.

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

21-21: Review comment incorrect — HubSpot Workflows actions are included in this PR. Multiple new workflow actions were added under components/hubspot/actions/ (e.g. components/hubspot/actions/create-workflow/create-workflow.mjs, retrieve-workflows/retrieve-workflows.mjs, retrieve-workflow-emails/retrieve-workflow-emails.mjs, retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs, retrieve-workflow-details/retrieve-workflow-details.mjs, enroll-contact-into-workflow/enroll-contact-into-workflow.mjs, delete-workflow/delete-workflow.mjs, create-contact-workflow/create-contact-workflow.mjs).

Likely an incorrect or invalid review comment.

components/hubspot/actions/list-marketing-emails/list-marketing-emails.mjs (1)

8-8: Version bump acknowledged.

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

10-10: Version bump only—no issues found.

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

13-13: Version bump only—looks good.

components/hubspot/actions/get-associated-meetings/get-associated-meetings.mjs (2)

10-10: Version bump noted.


253-256: Verify correct meeting ID property for search filter.

HubSpot search typically uses hs_object_id as the identifier property. Please confirm whether "id" is valid for meetings; if not, switch to "hs_object_id".

Proposed change:

-                {
-                  propertyName: "id",
+                {
+                  propertyName: "hs_object_id",
                   operator: "IN",
                   values: meetingIds,
                 },
components/hubspot/sources/delete-blog-article/delete-blog-article.mjs (1)

9-9: Version bump only—OK.

components/hubspot/actions/batch-upsert-companies/batch-upsert-companies.mjs (1)

10-10: Version bump acknowledged.

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

10-10: Version bump only—no concerns.

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

8-8: Version bump only — LGTM

No behavioral changes; safe to merge.

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

8-8: Version bump only — LGTM

No functional diffs detected.

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

9-9: Version bump only — LGTM

No logic changes; action surface remains the same.

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

11-11: Version bump only — LGTM

No runtime changes observed.

components/hubspot/actions/clone-site-page/clone-site-page.mjs (1)

8-8: Version bump only — LGTM

No behavioral modifications.

components/hubspot/actions/list-forms/list-forms.mjs (1)

8-8: Version bump only

Noted; see separate comment below for a functional bug in this file unrelated to the version line.

components/hubspot/actions/list-templates/list-templates.mjs (1)

8-8: Version bump only — LGTM

No functional differences detected.

components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs (1)

15-15: Version bump only — LGTM

Source behavior unchanged.

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

13-13: Version bump only — LGTM.
No logic changes. Safe to merge.

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

10-10: Version bump only — LGTM.
No functional changes.

components/hubspot/actions/retrieve-workflow-details/retrieve-workflow-details.mjs (2)

7-7: Version bump only — LGTM.
No behavioral changes.


6-6: Ignore — the action targets Automation v3 (no doc-change needed).
getWorkflowDetails in components/hubspot/hubspot.app.mjs calls API_PATH.AUTOMATIONV3 with endpoint /workflows/${workflowId}, and the action description in components/hubspot/actions/retrieve-workflow-details/retrieve-workflow-details.mjs already links to the v3 docs. If you intend to migrate to v4, update the client to API_PATH.AUTOMATIONV4 and endpoint /flows/{flowId} and then change the doc link.

Likely an incorrect or invalid review comment.

components/hubspot/actions/retrieve-migrated-workflow-mappings/retrieve-migrated-workflow-mappings.mjs (1)

8-8: Version bump only — LGTM.
No runtime changes.

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

10-10: Version bump only — LGTM.
No changes to behavior.

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

10-10: Version bump only — LGTM.
Safe metadata update.

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

13-13: Version bump only — LGTM.
No logic changes tied to this line.

components/hubspot/actions/update-landing-page/update-landing-page.mjs (1)

10-10: Version bump only — LGTM.
No functional impact.

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

9-9: LGTM: version bump only.


4-12: Workflows API not present in this PR.

PR objective mentions new HubSpot Workflows actions (create/read/update/delete/batch/mappings), but only version bumps appear here. Please confirm if workflow actions will land in this PR or a follow-up.

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

13-13: LGTM: version bump only.

components/hubspot/actions/update-fields-on-the-form/update-fields-on-the-form.mjs (1)

13-13: LGTM: version bump only.

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

13-13: LGTM: version bump only.

components/hubspot/actions/list-marketing-events/list-marketing-events.mjs (1)

8-8: LGTM: version bump only.

components/hubspot/actions/batch-update-companies/batch-update-companies.mjs (1)

11-11: LGTM: version bump only.

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

10-10: LGTM: version bump only.

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

11-11: LGTM: version bump only.

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

14-14: LGTM: version bump only.

No functional changes detected; safe metadata update.


14-14: PR objective mismatch — no Workflow API actions present.

PR claims to add HubSpot Workflows endpoints but the diff only shows a version bump (components/hubspot/actions/create-engagement/create-engagement.mjs:14); repository search returned no matches. Confirm scope or add the following:

  • GET / POST / PUT / DELETE under /automation/v4/flows
  • Batch read endpoints
  • Migrated workflow-id-mappings
components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs (1)

13-13: LGTM: version bump only.

No logic changes; source behavior unchanged.

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

13-13: LGTM: version bump only.

Safe metadata change.

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

10-10: LGTM: version bump only.

No behavior change.

components/hubspot/actions/create-landing-page/create-landing-page.mjs (1)

10-10: LGTM: version bump only.

No run/props changes.

components/hubspot/actions/clone-email/clone-email.mjs (1)

9-9: LGTM: version bump only.

Everything else unchanged; description already uses correct “HubSpot”.

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

9-9: LGTM: version bump only.

No functional modifications detected.

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

11-11: LGTM: version bump only.

Safe metadata update.

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

14-14: Version bump looks good.

No functional changes. Please ensure the package.json/changelog reflect 0.0.37.

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

13-13: Version bump OK.

Metadata-only change to 0.0.18.

components/hubspot/actions/delete-workflow/delete-workflow.mjs (1)

7-7: Version bump OK.

No runtime diffs detected.

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

10-10: Version bump OK.

No functional impact.

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

10-10: Version bump OK.

No behavior changes observed.

components/hubspot/actions/retrieve-workflow-emails/retrieve-workflow-emails.mjs (2)

7-7: Version bump OK.

No logic changes.


6-6: Broken/misaligned docs URL.

The path includes “automation-automation-v4-v4” and likely 404s; also better to point at the Automation v4 docs.

Apply:

-  description: "Retrieve emails sent by a workflow by ID. [See the documentation](https://developers.hubspot.com/docs/api-reference/automation-automation-v4-v4/email-campaigns/get-automation-v4-flows-email-campaigns)",
+  description: "Retrieve emails sent by a workflow by ID. [See the documentation](https://developers.hubspot.com/docs/reference/api/automation/create-manage-workflows)",

Likely an incorrect or invalid review comment.

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

11-11: Version bump OK.

No functional changes.

@luancazarine luancazarine merged commit 944bcf0 into master Sep 11, 2025
10 checks passed
@luancazarine luancazarine deleted the 18199-action-hubspot-workflow-api branch September 11, 2025 18:17
@luancazarine luancazarine restored the 18199-action-hubspot-workflow-api branch September 11, 2025 19:12
Sign up for free to 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.

[ACTION] Hubspot Workflow API

3 participants