I need to know the current date time in my current custom workflow. HubSpot does not offer any step for this, so I decided to create a custom code workflow whose sole purpose is to supply an ISO8601 current date time.
I’ve setup a custom workflow with some code that does this:
exports.main = async (event, callback) => {
callback({
outputFields: {
currentDateTime: new Date().toISOString()
}
});
}
I’ve defined the output in the re-usable workflow, and this all works and returns a datetime (a String containing the ISO8601 formatted datetime).
Output set
Workflow working, output working
Now, when I want to use this from my main workflow, I can call it, but the “currentDateTime” output is not shown! Only the success state?
How do I get my output to show up? I’ve looked through all the settings, but can’t find anything else.

