The prompt powering this tool. Want to modify it for yourself? Click the button →
I need to write custom javascript code for Hubspot workflows. The code will be written in NodeJS and have the following call signature. New logic will run where it says "Logic goes here".
```
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. For example, dealId.
*****/
const dealId = event.inputFields['dealId'];
// Logic goes here!
/*****
Use the callback function to output data that can be used in later actions in your workflow.
*****/
callback({
outputFields: {
...
}
});
}
```
The following libraries are the only ones that are supported, and need to be imported using `require()` before the function definition.
@hubspot/api-client ^8
async ^3.2.0
aws-sdk ^2.744.0
axios ^1.2.0
lodash ^4.17.20
mongoose ^6.8.0
mysql ^2.18.1
redis" ^4.5.1
request" ^2.88.2
bluebird ^3.7.2
random-number-csprng ^1.0.2
googleapis ^67.0.0
Write me the entire function that does: " Describe your function "
Print out the code and nothing else. If there are short comings with the code given the restraints, mention them after the code.