From a5bfb7db9d8ff899a6d98ee535b40f0954507649 Mon Sep 17 00:00:00 2001 From: Jorge Cortes Date: Thu, 20 Mar 2025 17:16:07 -0500 Subject: [PATCH] [FEATURE] Hubspot - New form submission improvement --- .../add-contact-to-list.mjs | 2 +- .../batch-create-or-update-contact.mjs | 2 +- .../create-associations.mjs | 2 +- .../create-communication.mjs | 2 +- .../actions/create-company/create-company.mjs | 2 +- .../create-custom-object.mjs | 2 +- .../actions/create-deal/create-deal.mjs | 2 +- .../create-engagement/create-engagement.mjs | 2 +- .../actions/create-lead/create-lead.mjs | 2 +- .../create-or-update-contact.mjs | 2 +- .../actions/create-ticket/create-ticket.mjs | 2 +- .../enroll-contact-into-workflow.mjs | 2 +- .../actions/get-company/get-company.mjs | 2 +- .../actions/get-contact/get-contact.mjs | 2 +- .../hubspot/actions/get-deal/get-deal.mjs | 2 +- .../get-file-public-url.mjs | 2 +- .../hubspot/actions/search-crm/search-crm.mjs | 2 +- .../actions/update-company/update-company.mjs | 2 +- .../actions/update-contact/update-contact.mjs | 2 +- .../update-custom-object.mjs | 2 +- .../actions/update-deal/update-deal.mjs | 2 +- .../actions/update-lead/update-lead.mjs | 2 +- components/hubspot/common/constants.mjs | 1 + components/hubspot/hubspot.app.mjs | 9 +++++ components/hubspot/package.json | 2 +- .../delete-blog-article.mjs | 2 +- .../new-company-property-change.mjs | 2 +- .../new-contact-property-change.mjs | 2 +- .../new-custom-object-property-change.mjs | 2 +- .../new-deal-in-stage/new-deal-in-stage.mjs | 2 +- .../new-deal-property-change.mjs | 2 +- .../new-email-event/new-email-event.mjs | 2 +- .../new-email-subscriptions-timeline.mjs | 2 +- .../sources/new-engagement/new-engagement.mjs | 2 +- .../hubspot/sources/new-event/new-event.mjs | 2 +- .../new-form-submission.mjs | 36 ++++++++++++++++++- .../new-form-submission/test-event.mjs | 3 +- .../hubspot/sources/new-note/new-note.mjs | 2 +- .../new-or-updated-blog-article.mjs | 2 +- .../new-or-updated-company.mjs | 2 +- .../new-or-updated-contact.mjs | 2 +- .../new-or-updated-crm-object.mjs | 2 +- .../new-or-updated-custom-object.mjs | 2 +- .../new-or-updated-deal.mjs | 2 +- .../new-or-updated-line-item.mjs | 2 +- .../new-or-updated-product.mjs | 2 +- .../new-social-media-message.mjs | 2 +- .../hubspot/sources/new-task/new-task.mjs | 2 +- .../new-ticket-property-change.mjs | 2 +- .../hubspot/sources/new-ticket/new-ticket.mjs | 2 +- pnpm-lock.yaml | 14 ++------ 51 files changed, 96 insertions(+), 59 deletions(-) diff --git a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs index 5b6d1da63c97b..31794556617fb 100644 --- a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs +++ b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-add-contact-to-list", name: "Add Contact to List", description: "Adds a contact to a specific static list. [See the documentation](https://legacydocs.hubspot.com/docs/methods/lists/add_contact_to_list)", - version: "0.0.14", + version: "0.0.15", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs index 69475b445dcf9..7f0318fcc4114 100644 --- a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs +++ b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-batch-create-or-update-contact", name: "Batch Create or Update Contact", description: "Create or update a batch of contacts by its ID or email. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/create-associations/create-associations.mjs b/components/hubspot/actions/create-associations/create-associations.mjs index 0117af0e8de14..82d5e01d202d7 100644 --- a/components/hubspot/actions/create-associations/create-associations.mjs +++ b/components/hubspot/actions/create-associations/create-associations.mjs @@ -5,7 +5,7 @@ export default { key: "hubspot-create-associations", name: "Create Associations", description: "Create associations between objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/associations#endpoint?spec=POST-/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create)", - version: "1.0.0", + version: "1.0.1", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/create-communication/create-communication.mjs b/components/hubspot/actions/create-communication/create-communication.mjs index e76262e73ab55..934de9e770b6e 100644 --- a/components/hubspot/actions/create-communication/create-communication.mjs +++ b/components/hubspot/actions/create-communication/create-communication.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-create-communication", name: "Create Communication", description: "Create a WhatsApp, LinkedIn, or SMS message. [See the documentation](https://developers.hubspot.com/beta-docs/reference/api/crm/engagements/communications/v3#post-%2Fcrm%2Fv3%2Fobjects%2Fcommunications)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-company/create-company.mjs b/components/hubspot/actions/create-company/create-company.mjs index bdadf977ab617..011d88d794144 100644 --- a/components/hubspot/actions/create-company/create-company.mjs +++ b/components/hubspot/actions/create-company/create-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-company", name: "Create Company", description: "Create a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=POST-/crm/v3/objects/companies)", - version: "0.0.18", + version: "0.0.19", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/create-custom-object/create-custom-object.mjs b/components/hubspot/actions/create-custom-object/create-custom-object.mjs index aec39fd9d33a4..b280efbac4465 100644 --- a/components/hubspot/actions/create-custom-object/create-custom-object.mjs +++ b/components/hubspot/actions/create-custom-object/create-custom-object.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-custom-object", name: "Create Custom Object", description: "Create a new custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#create-a-custom-object)", - version: "1.0.0", + version: "1.0.1", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-deal/create-deal.mjs b/components/hubspot/actions/create-deal/create-deal.mjs index 94eab59ad6dff..f1df111457484 100644 --- a/components/hubspot/actions/create-deal/create-deal.mjs +++ b/components/hubspot/actions/create-deal/create-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-deal", name: "Create Deal", description: "Create a deal in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=POST-/crm/v3/objects/deals)", - version: "0.0.18", + version: "0.0.19", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-engagement/create-engagement.mjs b/components/hubspot/actions/create-engagement/create-engagement.mjs index b4d8a2b749ab7..4bd96746f2b1d 100644 --- a/components/hubspot/actions/create-engagement/create-engagement.mjs +++ b/components/hubspot/actions/create-engagement/create-engagement.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-create-engagement", name: "Create Engagement", description: "Create a new engagement for a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/engagements)", - version: "0.0.17", + version: "0.0.18", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-lead/create-lead.mjs b/components/hubspot/actions/create-lead/create-lead.mjs index 07bcb6a3fc4f8..12dd920fda594 100644 --- a/components/hubspot/actions/create-lead/create-lead.mjs +++ b/components/hubspot/actions/create-lead/create-lead.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-create-lead", name: "Create Lead", description: "Create a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#create-leads)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs index f0c6e86a2cbb0..2046af949f9d6 100644 --- a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs +++ b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-or-update-contact", name: "Create or Update Contact", description: "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)", - version: "0.0.16", + version: "0.0.17", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-ticket/create-ticket.mjs b/components/hubspot/actions/create-ticket/create-ticket.mjs index 49d4603f5749c..f5c8c8b1ca360 100644 --- a/components/hubspot/actions/create-ticket/create-ticket.mjs +++ b/components/hubspot/actions/create-ticket/create-ticket.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-ticket", name: "Create Ticket", description: "Create a ticket in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs index 91f375ae822af..4b4828cf655e1 100644 --- a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs +++ b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-enroll-contact-into-workflow", name: "Enroll Contact Into Workflow", description: "Add a contact to a workflow. Note: The Workflows API currently only supports contact-based workflows and is only available for Marketing Hub Enterprise accounts. [See the documentation](https://legacydocs.hubspot.com/docs/methods/workflows/add_contact)", - version: "0.0.14", + version: "0.0.15", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/get-company/get-company.mjs b/components/hubspot/actions/get-company/get-company.mjs index 9ef9444053763..576e7025fa73f 100644 --- a/components/hubspot/actions/get-company/get-company.mjs +++ b/components/hubspot/actions/get-company/get-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-company", name: "Get Company", description: "Gets a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=GET-/crm/v3/objects/companies/{companyId})", - version: "0.0.14", + version: "0.0.15", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-contact/get-contact.mjs b/components/hubspot/actions/get-contact/get-contact.mjs index a655e8f088716..ca69096e5e8ce 100644 --- a/components/hubspot/actions/get-contact/get-contact.mjs +++ b/components/hubspot/actions/get-contact/get-contact.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-contact", name: "Get Contact", description: "Gets a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=GET-/crm/v3/objects/contacts/{contactId})", - version: "0.0.14", + version: "0.0.15", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-deal/get-deal.mjs b/components/hubspot/actions/get-deal/get-deal.mjs index b4c4bbb230a41..613654e11afe5 100644 --- a/components/hubspot/actions/get-deal/get-deal.mjs +++ b/components/hubspot/actions/get-deal/get-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-deal", name: "Get Deal", description: "Gets a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=GET-/crm/v3/objects/deals/{dealId})", - version: "0.0.14", + version: "0.0.15", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs index f9a6fd51d7d7e..4a2ebadb71e96 100644 --- a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs +++ b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-get-file-public-url", name: "Get File Public URL", description: "Get a publicly available URL for a file that was uploaded using a Hubspot form. [See the documentation](https://developers.hubspot.com/docs/api/files/files#endpoint?spec=GET-/files/v3/files/{fileId}/signed-url)", - version: "0.0.14", + version: "0.0.15", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/search-crm/search-crm.mjs b/components/hubspot/actions/search-crm/search-crm.mjs index e4fe78ace48d6..e0bcbc837d568 100644 --- a/components/hubspot/actions/search-crm/search-crm.mjs +++ b/components/hubspot/actions/search-crm/search-crm.mjs @@ -16,7 +16,7 @@ export default { key: "hubspot-search-crm", name: "Search CRM", description: "Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)", - version: "1.0.0", + version: "1.0.1", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/update-company/update-company.mjs b/components/hubspot/actions/update-company/update-company.mjs index 0bc5bd0bec760..90ebf5d8811d1 100644 --- a/components/hubspot/actions/update-company/update-company.mjs +++ b/components/hubspot/actions/update-company/update-company.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-company", name: "Update Company", description: "Update a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.14", + version: "0.0.15", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-contact/update-contact.mjs b/components/hubspot/actions/update-contact/update-contact.mjs index e26796205e810..a7fa361af4e26 100644 --- a/components/hubspot/actions/update-contact/update-contact.mjs +++ b/components/hubspot/actions/update-contact/update-contact.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-contact", name: "Update Contact", description: "Update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)", - version: "0.0.15", + version: "0.0.16", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-custom-object/update-custom-object.mjs b/components/hubspot/actions/update-custom-object/update-custom-object.mjs index 2b679831acc62..464210420b329 100644 --- a/components/hubspot/actions/update-custom-object/update-custom-object.mjs +++ b/components/hubspot/actions/update-custom-object/update-custom-object.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-update-custom-object", name: "Update Custom Object", description: "Update a custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#update-existing-custom-objects)", - version: "1.0.0", + version: "1.0.1", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-deal/update-deal.mjs b/components/hubspot/actions/update-deal/update-deal.mjs index 4156969743262..271cb2033ec61 100644 --- a/components/hubspot/actions/update-deal/update-deal.mjs +++ b/components/hubspot/actions/update-deal/update-deal.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-deal", name: "Update Deal", description: "Update a deal in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/deals#update-deals)", - version: "0.0.5", + version: "0.0.6", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-lead/update-lead.mjs b/components/hubspot/actions/update-lead/update-lead.mjs index 705b8537f9f68..f8815f3ba1422 100644 --- a/components/hubspot/actions/update-lead/update-lead.mjs +++ b/components/hubspot/actions/update-lead/update-lead.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-lead", name: "Update Lead", description: "Update a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#update-leads)", - version: "0.0.6", + version: "0.0.7", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/common/constants.mjs b/components/hubspot/common/constants.mjs index 721f175ce1d14..ee3cabcfcad7b 100644 --- a/components/hubspot/common/constants.mjs +++ b/components/hubspot/common/constants.mjs @@ -22,6 +22,7 @@ const API_PATH = { AUTOMATION: "/automation/v2", DEAL: "/deals/v1", BUSINESS_UNITS: "/business-units/v3", + MARKETINGV3: "/marketing/v3", }; /** Association categories for association types, as defined by the [Hubspot API diff --git a/components/hubspot/hubspot.app.mjs b/components/hubspot/hubspot.app.mjs index cfd45c3b12fbd..df59641b285a1 100644 --- a/components/hubspot/hubspot.app.mjs +++ b/components/hubspot/hubspot.app.mjs @@ -712,6 +712,15 @@ export default { ...opts, }); }, + getFormDefinition({ + formId, ...opts + } = {}) { + return this.makeRequest({ + api: API_PATH.MARKETINGV3, + endpoint: `/forms/${formId}`, + ...opts, + }); + }, getForms(opts = {}) { return this.makeRequest({ api: API_PATH.FORMS, diff --git a/components/hubspot/package.json b/components/hubspot/package.json index a6874f17f2a3f..d8c0d9e78b980 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.0.1", + "version": "1.0.2", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ diff --git a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs index 375d2a8fd3c94..ce8556ea9e947 100644 --- a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs +++ b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-delete-blog-article", name: "Deleted Blog Posts", description: "Emit new event for each deleted blog post.", - version: "0.0.19", + version: "0.0.20", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs index 0aba3cea35dce..83840964d1fa9 100644 --- a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs +++ b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-company-property-change", name: "New Company Property Change", description: "Emit new event when a specified property is provided or updated on a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.12", + version: "0.0.13", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs index b38c713d04dcf..712f73d16f8b6 100644 --- a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs +++ b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-contact-property-change", name: "New Contact Property Change", description: "Emit new event when a specified property is provided or updated on a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.14", + version: "0.0.15", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs index f8f7a9d547186..3d97ce58a6deb 100644 --- a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs +++ b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-custom-object-property-change", name: "New Custom Object Property Change", description: "Emit new event when a specified property is provided or updated on a custom object.", - version: "0.0.4", + version: "0.0.5", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs index 799c8031384c5..a93b4266218e0 100644 --- a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs +++ b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-in-stage", name: "New Deal In Stage", description: "Emit new event for each new deal in a stage.", - version: "0.0.24", + version: "0.0.25", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs index 68bb4b23cf643..a85944a7e3a37 100644 --- a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs +++ b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-property-change", name: "New Deal Property Change", description: "Emit new event when a specified property is provided or updated on a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals)", - version: "0.0.13", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-event/new-email-event.mjs b/components/hubspot/sources/new-email-event/new-email-event.mjs index 08c5c0b103875..1cde692ef8ef3 100644 --- a/components/hubspot/sources/new-email-event/new-email-event.mjs +++ b/components/hubspot/sources/new-email-event/new-email-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-email-event", name: "New Email Event", description: "Emit new event for each new Hubspot email event.", - version: "0.0.22", + version: "0.0.23", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs index 66752c1234d00..1898515cfd9b7 100644 --- a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs +++ b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-email-subscriptions-timeline", name: "New Email Subscriptions Timeline", description: "Emit new event when a new email timeline subscription is added for the portal.", - version: "0.0.19", + version: "0.0.20", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-engagement/new-engagement.mjs b/components/hubspot/sources/new-engagement/new-engagement.mjs index ac42ff8de0948..4615cc874ab51 100644 --- a/components/hubspot/sources/new-engagement/new-engagement.mjs +++ b/components/hubspot/sources/new-engagement/new-engagement.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-engagement", name: "New Engagement", description: "Emit new event for each new engagement created. This action returns a maximum of 5000 records at a time, make sure you set a correct time range so you don't miss any events", - version: "0.0.24", + version: "0.0.25", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index 1e6026623037f..9ab19f511e643 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-event", name: "New Events", description: "Emit new event for each new Hubspot event. Note: Only available for Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise accounts", - version: "0.0.23", + version: "0.0.24", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-form-submission/new-form-submission.mjs b/components/hubspot/sources/new-form-submission/new-form-submission.mjs index a577add786d52..9aa75bc9b87e5 100644 --- a/components/hubspot/sources/new-form-submission/new-form-submission.mjs +++ b/components/hubspot/sources/new-form-submission/new-form-submission.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-form-submission", name: "New Form Submission", description: "Emit new event for each new submission of a form.", - version: "0.0.24", + version: "0.0.25", dedupe: "unique", type: "source", props: { @@ -21,6 +21,40 @@ export default { }, methods: { ...common.methods, + async paginate(params, resourceFn, resultType = null, after = null) { + let results = null; + let maxTs = after || 0; + while (!results || params.after) { + results = await resourceFn(params); + if (results.paging) { + params.after = results.paging.next.after; + } else { + delete params.after; + } + if (resultType) { + results = results[resultType]; + } + + for (const result of results) { + if (await this.isRelevant(result, after)) { + const form = await this.hubspot.getFormDefinition({ + formId: params.formId, + }); + this.emitEvent({ + form, + ...result, + }); + const ts = this.getTs(result); + if (ts > maxTs) { + maxTs = ts; + this._setAfter(ts); + } + } else { + return; + } + } + } + }, getTs(result) { return result.submittedAt; }, diff --git a/components/hubspot/sources/new-form-submission/test-event.mjs b/components/hubspot/sources/new-form-submission/test-event.mjs index 681949b4db099..2e31d09da96dc 100644 --- a/components/hubspot/sources/new-form-submission/test-event.mjs +++ b/components/hubspot/sources/new-form-submission/test-event.mjs @@ -7,5 +7,6 @@ export default { "objectTypeId": "0-1" } ], - "pageUrl": "https://share.hsforms.com/13MJGKokMSAmW69lIF_JiKg43od5" + "pageUrl": "https://share.hsforms.com/13MJGKokMSAmW69lIF_JiKg43od5", + "form": { "id": "4442beda-998a-4825-bba1-2eaa3c1f0038", "name": "Test form (March 20, 2025 5:24:26 PM EDT)", "createdAt": "2025-03-20T21:24:26.911Z", "updatedAt": "2025-03-20T21:28:40.822Z", "archived": false, "fieldGroups": [{ "groupType": "default_group", "richTextType": "text", "fields": [{ "objectTypeId": "0-1", "name": "firstname", "label": "First Name", "required": false, "hidden": false, "fieldType": "single_line_text" }, { "objectTypeId": "0-1", "name": "lastname", "label": "Last Name", "required": false, "hidden": false, "fieldType": "single_line_text" }, { "objectTypeId": "0-1", "name": "email", "label": "Email", "required": true, "hidden": false, "validation": { "blockedEmailDomains": [], "useDefaultBlockList": false }, "fieldType": "email" }] }], "configuration": { "language": "en", "cloneable": true, "postSubmitAction": { "type": "thank_you", "value": "" }, "editable": true, "archivable": true, "recaptchaEnabled": false, "notifyContactOwner": false, "notifyRecipients": ["78708658"], "createNewContactForNewEmail": false, "prePopulateKnownValues": true, "allowLinkToResetKnownValues": false, "lifecycleStages": [] }, "displayOptions": { "renderRawHtml": false, "theme": "default_style", "submitButtonText": "", "style": { "fontFamily": "arial, helvetica, sans-serif", "backgroundWidth": "100%", "labelTextColor": "#33475b", "labelTextSize": "11px", "helpTextColor": "#7C98B6", "helpTextSize": "11px", "legalConsentTextColor": "#33475b", "legalConsentTextSize": "14px", "submitColor": "#ff7a59", "submitAlignment": "left", "submitFontColor": "#ffffff", "submitSize": "12px" }, "cssClass": null }, "legalConsentOptions": { "type": "none" }, "formType": "hubspot" } } \ No newline at end of file diff --git a/components/hubspot/sources/new-note/new-note.mjs b/components/hubspot/sources/new-note/new-note.mjs index ec84702f39ede..52b9e7c937c55 100644 --- a/components/hubspot/sources/new-note/new-note.mjs +++ b/components/hubspot/sources/new-note/new-note.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-note", name: "New Note Created", description: "Emit new event for each new note created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/notes#get-%2Fcrm%2Fv3%2Fobjects%2Fnotes)", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs index 2733c6b995d09..98317f171d703 100644 --- a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs +++ b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-blog-article", name: "New or Updated Blog Post", description: "Emit new event for each new or updated blog post in Hubspot.", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs index b61c788c3e5ba..6a408d448821e 100644 --- a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs +++ b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-company", name: "New or Updated Company", description: "Emit new event for each new or updated company in Hubspot.", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs index 04df26dda6553..7d00b5824d670 100644 --- a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs +++ b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-contact", name: "New or Updated Contact", description: "Emit new event for each new or updated contact in Hubspot.", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs index 11ae0e1d1cef6..dca63c21c8a99 100644 --- a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs +++ b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-crm-object", name: "New or Updated CRM Object", description: "Emit new event each time a CRM Object of the specified object type is updated.", - version: "0.0.19", + version: "0.0.20", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs index 59163a149a703..227c0aee3017a 100644 --- a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs +++ b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-custom-object", name: "New or Updated Custom Object", description: "Emit new event each time a Custom Object of the specified schema is updated.", - version: "0.0.8", + version: "0.0.9", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs index 5699a2472fd59..9840c94edcebc 100644 --- a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs +++ b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-deal", name: "New or Updated Deal", description: "Emit new event for each new or updated deal in Hubspot", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs index ba5b60f0fe948..f85a0af48979e 100644 --- a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs +++ b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-line-item", name: "New or Updated Line Item", description: "Emit new event for each new line item added or updated in Hubspot.", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs index aa35307531b69..98892daa76223 100644 --- a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs +++ b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-product", name: "New or Updated Product", description: "Emit new event for each new or updated product in Hubspot.", - version: "0.0.6", + version: "0.0.7", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs index 54ffde10eb4ee..6daea3cb5268c 100644 --- a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs +++ b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-social-media-message", name: "New Social Media Message", description: "Emit new event when a message is posted from HubSpot to the specified social media channel. Note: Only available for Marketing Hub Enterprise accounts", - version: "0.0.19", + version: "0.0.20", type: "source", dedupe: "unique", props: { diff --git a/components/hubspot/sources/new-task/new-task.mjs b/components/hubspot/sources/new-task/new-task.mjs index 7c9244b4cfd51..591980731366a 100644 --- a/components/hubspot/sources/new-task/new-task.mjs +++ b/components/hubspot/sources/new-task/new-task.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-task", name: "New Task Created", description: "Emit new event for each new task created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/tasks#get-%2Fcrm%2Fv3%2Fobjects%2Ftasks)", - version: "1.0.0", + version: "1.0.1", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs index 7bea8dad6bb9e..eb9c572e2c7fa 100644 --- a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs +++ b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-ticket-property-change", name: "New Ticket Property Change", description: "Emit new event when a specified property is provided or updated on a ticket. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.13", + version: "0.0.14", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-ticket/new-ticket.mjs b/components/hubspot/sources/new-ticket/new-ticket.mjs index 40cf67a46e59f..0eafbdfc4c0da 100644 --- a/components/hubspot/sources/new-ticket/new-ticket.mjs +++ b/components/hubspot/sources/new-ticket/new-ticket.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-ticket", name: "New Ticket", description: "Emit new event for each new ticket created.", - version: "0.0.19", + version: "0.0.20", dedupe: "unique", type: "source", props: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 439ac3947ef9a..e39376605af3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -847,8 +847,7 @@ importers: components/api_bible: {} - components/api_labz: - specifiers: {} + components/api_labz: {} components/api_ninjas: {} @@ -4661,9 +4660,6 @@ importers: specifier: ^3.0.3 version: 3.0.3 - components/formatting: - specifiers: {} - components/formbricks: dependencies: '@pipedream/platform': @@ -8043,8 +8039,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/miyn: - specifiers: {} + components/miyn: {} components/moaform: dependencies: @@ -9328,8 +9323,7 @@ importers: components/perry_github_test: {} - components/persanaai: - specifiers: {} + components/persanaai: {} components/persistiq: dependencies: @@ -34342,8 +34336,6 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) - transitivePeerDependencies: - - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: