Skip to content

Instantly share code, notes, and snippets.

@justingivens
Created May 5, 2025 14:50
Show Gist options
  • Save justingivens/9490d81978d827a5a4bf6e314aa81e8c to your computer and use it in GitHub Desktop.
Save justingivens/9490d81978d827a5a4bf6e314aa81e8c to your computer and use it in GitHub Desktop.
Count the Number of Items
exports.main = async (event, callback) => {
/*****
Use inputs to get data from any action in your workflow and use it in your code instead of having to use the HubSpot API.
*****/
const list = event.inputFields['list'];
const count = list.split('; ').length;
/*****
Use the callback function to output data that can be used in later actions in your workflow.
*****/
callback({
outputFields: {
list: list,
count: count
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment