Skip to content

Commit

Permalink
Hubspot - New Event source (#11855)
Browse files Browse the repository at this point in the history
* update description

* add configuration error
  • Loading branch information
michelle0927 authored May 10, 2024
1 parent 0ab262c commit bb58da9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
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": "0.8.3",
"version": "0.8.4",
"description": "Pipedream Hubspot Components",
"main": "hubspot.app.mjs",
"keywords": [
Expand Down
19 changes: 16 additions & 3 deletions components/hubspot/sources/new-event/new-event.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import common from "../common/common.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
...common,
key: "hubspot-new-event",
name: "New Events",
description: "Emit new event for each new Hubspot event.",
version: "0.0.16",
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.17",
dedupe: "unique",
type: "source",
props: {
Expand All @@ -26,7 +27,19 @@ export default {
],
},
},
hooks: {},
hooks: {
async deploy() {
try {
await this.hubspot.getEvents({
objectType: this.objectType,
objectId: this.objectIds[0],
});
}
catch {
throw new ConfigurationError("Error occurred. Please verify that your Hubspot account is one of: Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise");
}
},
},
methods: {
...common.methods,
getTs() {
Expand Down

0 comments on commit bb58da9

Please sign in to comment.