This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import the Hubspot NodeJS Client Library - this will allow us to use the HubSpot APIs | |
const hubspot = require('@hubspot/api-client'); | |
/* | |
This function is called when the custom code action is executed. It takes 2 arguements. The first is the event object which contains information on the currently enrolled object. | |
The second is the callback function which is used to pass data back to the workflow. | |
*/ | |
exports.main = (event, callback) => { | |
// Instantiate a new HubSpot API client using the HAPI key (secret) |