-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
Describe the bug
The hubspot-new-contact-property-change trigger fails when deployed via Pipedream SDK/API with error operator GTE requires a value. The trigger makes malformed HubSpot API requests missing the timestamp value for thelastmodifieddate GTE filter.
The issue is that we're expecting value for lastmodifieddate to be defined in filters, the value for this operator is after, and initially it's gonna be undefined, with current implementation
return this.db.get("after");
instead of
return this.db.get("after") || new Date().setDate(new Date().getDate() - 1);
filters: [
{
propertyName: this.property,
operator: "HAS_PROPERTY",
},
{
propertyName: "lastmodifieddate",
operator: "GTE",
value: after, <-------------------------------
},
],
To Reproduce
Steps to reproduce the behavior:
- Deploy the hubspot-new-contact-property-change component via Pipedream SDK using:
await pd.triggers.deploy({
external_user_id: "user_id",
id: "hubspot-new-contact-property-change",
configured_props: {
hubspot: { authProvisionId: "account_id" },
timer: { intervalSeconds: 60 },
property: { __lv: { label: "firstname", value: "firstname" } }
},
webhook_url: "https://example.com/webhook"
});
- Wait for the trigger to execute or manually test it
- Check the execution logs
- See error:
Invalid input JSON on line 1, column 246: operator GTE requires a value
Expected behavior
The component should initialize properly with a default after parameter and make valid HubSpot API requests with a proper lastmodifieddate GTE filter value.
Screenshots
If applicable, add screenshots to help explain your problem. Note that the screenshots will be displayed publicly.
Additional context
This change likely broke this trigger:
#18294
Tagging:
@dannyroosevelt @michelle0927 @andrewjschuang
Metadata
Metadata
Assignees
Labels
Type
Projects
Status