diff --git a/components/hubspot/package.json b/components/hubspot/package.json index 14883b284a1dc..3d5b3d9355927 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.7.9", + "version": "1.7.10", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ 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 861a6f793fb3d..de17a175f57b0 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 @@ -11,7 +11,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.40", + version: "0.0.41", dedupe: "unique", type: "source", props: { @@ -100,7 +100,7 @@ export default { for (const deal of results.results) { const ts = await this.getTs(deal); - if (this.isRelevant(ts, after)) { + if (!after || this.isRelevant(ts, after)) { if (deal.properties.hubspot_owner_id) { deal.properties.owner = await this.getOwner( deal.properties.hubspot_owner_id, @@ -113,6 +113,11 @@ export default { } } } + + // first run, get only first page + if (!after) { + return; + } } while (params.after); }, async processResults(after) {