Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/hubspot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/hubspot",
"version": "1.6.2",
"version": "1.6.3",
"description": "Pipedream Hubspot Components",
"main": "hubspot.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
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.14",
version: "0.0.15",
dedupe: "unique",
type: "source",
props: {
...common.props,
info: {

Check warning on line 18 in components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 18 in components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop info must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: `Properties:\n\`${DEFAULT_CONTACT_PROPERTIES.join(", ")}\``,
Expand Down Expand Up @@ -96,16 +96,21 @@
}
return true;
},
getParams() {
getParams(after) {
const { properties = [] } = this;
return {
const dateProperty = this.newOnly
? "createdate"
: "lastmodifieddate";
const isFirstRun = !this.db.get("after");

const params = {
data: {
limit: DEFAULT_LIMIT,
limit: isFirstRun
? 100
: DEFAULT_LIMIT,
sorts: [
{
propertyName: this.newOnly
? "createdate"
: "lastmodifieddate",
propertyName: dateProperty,
direction: "DESCENDING",
},
],
Expand All @@ -116,6 +121,22 @@
},
object: "contacts",
};

if (after) {
params.data.filterGroups = [
{
filters: [
{
propertyName: dateProperty,
operator: "GT",
value: after,
},
],
},
];
}

return params;
},
async processResults(after, params) {
await this.searchCRM(params, after);
Expand Down
Loading