Skip to main content
Node.js 16 and Node.js 20 no longer receive security updates. If any of your workflows use a custom code action on Node.js 16 or 20, update each action to Node.js 24 before November 17, 2026. As of November 3, 2026, you can no longer create new custom code actions that use Node.js 20. Node.js 24 is available now for custom code actions. Your existing actions keep running on their current version until you switch them, so you can upgrade and test one action at a time. Upgrading isn’t only a runtime change. Node.js 24 doesn’t support callback-style handlers, so you’ll need to update your code to return its outputs instead of calling callback(). The libraries available to your code have also changed versions. You can upgrade with Breeze, which is recommended, or upgrade manually. Either way, test each action before you save it.

Prerequisites

  • You must have permission to edit workflows in your HubSpot account.
  • It’s recommended to create a dedicated test record (for example, a test contact) to test your updated actions. Testing a custom code action applies its changes to the selected record.

Find affected custom code actions

  1. In your HubSpot account, navigate to Automation > Workflows.
  2. At the top of the table, add an Action type filter, then select Custom code.
The workflows table with the Action type filter open and Custom code selected
  1. Each workflow needs to be updated individually. For each workflow in the filtered list, hover over the row and click Edit workflow.
A workflow row in the workflows table with the Edit workflow button
  1. In the workflow editor, click each custom code action and check the Language dropdown menu. If the action uses Node.js 16 or Node.js 20, it needs to be upgraded.
Node.js 16 is already deprecated for custom code actions. Existing Node.js 16 actions still run, but you can’t save changes to one until you switch it to a newer version.

Save a copy of your current code

Before you change anything, copy the code in each action and save it somewhere outside of HubSpot, such as a text file or your source control. You’ll use this copy to compare changes and to roll back if needed. Breeze can update the custom code actions in a workflow for you. This is the recommended way to upgrade, especially if a workflow has several custom code actions.
  1. In the workflow editor, click a custom code action that uses Node.js 16 or 20. A warning appears under the Language dropdown menu.
  2. Click Upgrade with Breeze. A Breeze chat opens and updates all custom code actions in the workflow to Node.js 24.
The Language dropdown set to Node.js 20.x with a warning and an Upgrade with Breeze button
You can also start the upgrade from a Breeze chat:
  1. In the workflow editor, click the Collaborate with Assistant icon in the collaboration panel on the right to open a new Breeze chat.
The workflow editor with the Collaborate with Assistant icon in the collaboration panel
  1. Ask Breeze to update the actions, for example: Update all of the custom code actions that are using Node 16 or 20 to Node 24.
A Breeze chat asking it to update all custom code actions using Node 16 or 20 to Node 24
Breeze can make mistakes, so review its changes before you save:
  • Compare the updated code with your saved copy and check that the logic is the same.
  • Check that every output in your Data outputs section is still returned.
  • Check that any API calls still use methods that exist in the new library versions.
  • Test each updated action with a test record.
You can’t update custom code actions with the HubSpot CLI. Breeze in the workflow editor is the AI-assisted way to update them.

Upgrade manually

If you prefer to update your code yourself, or you need to fix changes Breeze made, upgrade each action manually. In Node.js 20 and earlier, custom code actions pass their outputs to callback(). Node.js 24 only supports async handlers, so your exports.main function must return the output object instead. Learn more about this change in the AWS Lambda Node.js handler documentation. To upgrade an action manually:
  1. In the workflow editor, click the custom code action.
  2. Click the Language dropdown menu, then select Node.js 24.x.
  3. Update your code:
    • Remove the callback parameter from exports.main.
    • Make sure exports.main is an async function.
    • Replace each callback({ outputFields: { ... } }) call with return { outputFields: { ... } };.
    • Use await for any asynchronous work, such as API calls, before you return. Code that’s still running after return isn’t guaranteed to finish.
  4. Check the libraries your code uses against the library changes below.
  5. Test the action before you save.

Before and after

The following example shows the default sample code for a Node.js 20 custom code action:
Node.js 20
The following example shows the same action updated for Node.js 24:
Node.js 24

Errors and retries

If your code calls the HubSpot API and you want HubSpot to retry the action after a rate limit error, throw the error in your catch block. With an async handler, a thrown error fails the execution in the same way it did before. Learn more about retries for custom code actions.

Check library and SDK changes

Each Node.js version comes with its own set of libraries, and several have new major versions in Node.js 24. A major version can include breaking changes, so review the release notes for any library your code uses. Pay particular attention to the following:
  • HubSpot API client: Node.js 24 includes version 13 of @hubspot/api-client. Node.js 20 included version 11, and Node.js 16 included version 10. Review the HubSpot Node.js client release notes for changes to the methods your code calls.
  • request: the request library isn’t available in Node.js 24. Use axios or the built-in fetch() function instead.
  • mongoose, redis, and googleapis: each has a new major version in Node.js 24. Review each library’s release notes if your code uses it.

Test each updated action

Test every action after you upgrade it, whether you updated the code yourself or with Breeze. Testing runs only the custom code action, not the rest of the workflow.
  1. In the workflow editor, click the custom code action.
  2. At the bottom, click Test action to expand the testing section.
  3. Click the Object dropdown menu, then select your test record.
  4. Click Test, then confirm in the dialog box.
  5. Review the results:
    • Status: confirm the action succeeded.
    • Data outputs: confirm each output has the value you expect.
    • Logs: check for errors, such as a missing library or a method that no longer exists.
  6. When the test passes, click Save.
Learn more about testing custom code actions.
Please note: testing applies any changes your code makes to the selected record. Use a dedicated test record to avoid updating live records.

Roll back an upgrade

If an action that used Node.js 20 doesn’t work after you upgrade it, and you can’t fix it right away, you may be able to switch it back until November 17, 2026:
  1. In the workflow editor, click the custom code action.
  2. Click the Language dropdown menu, then select Node.js 20.x.
  3. Replace the code with your saved copy.
  4. Test the action, then click Save.
If Node.js 20.x isn’t available in the Language dropdown menu, you can’t roll back the action. Fix it on Node.js 24 instead, using your saved copy as a reference. Rolling back is a short-term step. Starting November 17, 2026, you can’t save changes to an action that uses Node.js 20, so you won’t be able to roll back. You can’t roll back to Node.js 16, because it’s no longer available to select. If an action used Node.js 16, fix it on Node.js 24 instead.

Deadline

Upgrade your custom code actions to Node.js 24 before November 17, 2026. HubSpot is ending support for Node.js 20 in two steps:
  • Starting November 3, 2026, you can’t create new custom code actions that use Node.js 20.
  • Starting November 17, 2026, you can’t save changes to existing custom code actions that use Node.js 20, the same way Node.js 16 works today.
Existing custom code actions that use Node.js 20 continue to run after both dates. Learn more in the changelog announcement.
Last modified on November 3, 2026