HubSpot Custom Code Actions: Node.js 20 No Longer Editable. How to Upgrade to Node.js 24
Since November 17, 2026, you can no longer save HubSpot custom code actions that run on Node.js 20, but they keep running. To move to Node.js 24, you replace the callback with return and check your HubSpot client methods, because the client jumps from version 11 to 13. If you skip the upgrade, the only way to fix a broken action is a full rebuild.
What applies since November 17?
Since Tuesday, November 17, 2026, you can no longer save HubSpot custom code actions that use Node.js 20. They keep running, but every fix to the code is blocked until you switch the action to Node.js 24. That's what the HubSpot Developer Changelog from November 3 says. Since that day you also can't create new Node 20 actions, and Node.js 24 is available instead.
Custom code actions are workflow steps that run your own JavaScript, for example to format data, calculate values or call an external API. According to the HubSpot docs, they're only available with Data Hub Professional or Enterprise. The reason for the deadline: Node.js 16 and 20 no longer get security updates, and nodejs.org lists Node.js 20 as end-of-life. Actions on Node.js 16 can already only be saved if you switch them to a newer version.
| Date | What happens |
|---|---|
| November 3, 2026 | No new Node 20 actions, Node.js 24 available |
| November 17, 2026 | Node 20 actions can't be saved anymore, the rollback path to Node.js 20 ends |
| February 1, 2027 | Serverless functions from the design manager (website) stop running |
Why is an editing lock riskier than a shutdown?
Because you only notice it when you need to change something, and that's usually under time pressure. One example from the calendar: on December 4, HubSpot shuts down the Pipelines API V1. If a Node 20 action still calls that endpoint, you have to change the call. At that point the only way is to move the whole action to Node.js 24, with all the library changes described below. HubSpot hasn't said whether Node 20 actions will eventually stop running. The community thread on the announcement doesn't answer that either.
How do you find affected actions?
With the filter in the workflow list, one portal at a time:
- Open Automation > Workflows.
- Set the Action type filter to Custom code.
- Open each workflow, click each code action and check the Language dropdown. If it says Node.js 16 or 20, the action needs an upgrade.
- Back up the code of each action outside HubSpot first. The upgrade guide explicitly recommends this, otherwise you have nothing to compare against or roll back to.
What do you need to change in the code?
Three things: replace the callback, check the HubSpot client, swap out old libraries.
1. Return instead of callback. Node.js 24 only accepts async functions without a callback. The call callback({ outputFields: { ... } }) becomes return { outputFields: { ... } };, and exports.main = async (event, callback) becomes exports.main = async (event). Everything asynchronous has to finish with await first: according to the guide, code that still runs after the return isn't guaranteed to complete. Our take: this is exactly where the bugs hide that don't show up in a test. Search specifically for promise chains with .then() and no await.
2. HubSpot client from version 11 to 13. On Node.js 20, @hubspot/api-client runs in version 11, on Node.js 24 in version 13.4.0. That's two major versions with renamed methods in between, documented in the client changelog. What typically shows up in workflows:
merge()for contacts, companies, deals and tickets now lives inbasicApi. Its old homepublicObjectApiwas renamed in 12.0 and removed in 13.0.- List IDs (
listId,listIds) are strings instead of numbers. purge()for contacts (GDPR deletion) lives incrm.contacts.basicApi, theGDPRApiis gone.- For association definitions (v4),
archive()is now calledremove().
3. Other libraries. request is no longer included on Node.js 24. Replace it with axios (now version 1.13.5) or the built-in fetch(). Bigger jumps: mongoose (6 to 9), redis (4 to 5) and googleapis (67 to 171). aws-sdk is new.
Can Breeze do the upgrade for you?
Partly. Breeze, HubSpot's built-in AI assistant, offers Upgrade with Breeze below the Language dropdown and then switches all code actions in a workflow. HubSpot itself says Breeze can make mistakes. In the community thread, a customer reports an error message during the Breeze upgrade. Our take: Breeze is useful for the switch from callback to return, but you still check the HubSpot client method names yourself. Afterwards, make sure every action still returns all of its Data outputs: the following workflow steps read exactly those values. The HubSpot CLI won't help here, it can't update custom code actions.
How do you test without touching customer data?
With a dedicated test record. Test action really runs the action and applies its changes to the record you pick. So create a test contact or test deal. If the action sends data to another system, the test run lands there too. Only the action is tested, not the whole workflow. Check the status, Data outputs and logs before you save.
Since November 17 there's no way back to Node.js 20: an action on Node.js 20 can't be saved, so it can't be rolled back either. Node.js 16 never allowed that anyway. If an upgraded action fails, you fix the error on Node.js 24.
Upgrade, or move the logic to Make or n8n?
The upgrade is a good reason to question each action once. Custom code in HubSpot has hard limits: 20 seconds of runtime, 128 MB of memory, and all secrets combined can't exceed 1,000 characters. In return you get one advantage: if your code rethrows a rate limit error, HubSpot retries the action on its own for up to three days.
| Situation | Our recommendation |
|---|---|
| Short formatting, a calculation, one API call | Keep it in HubSpot, upgrade to Node.js 24 |
| Several systems, long runtime, large data volumes | Move the logic to Make or n8n, HubSpot only sends the trigger |
| Nobody knows exactly what the action does anymore | Document first, then decide |
| Workflow is inactive or rarely triggered | Check whether the action can go away entirely |
We ran the numbers on what Make and n8n cost to operate in Make vs n8n.
What does this mean for you?
- Now: take inventory in every portal. Since November 17, Node 20 actions can no longer be saved. Any action you still want to change has to move to Node.js 24. Leaving an action on Node.js 20 means: if it breaks, you can't fix it without fully upgrading it first, and it runs on a version without security updates.
- Start with: actions that use deprecated HubSpot APIs (Pipelines V1 on December 4) and actions that use
request. - Website on HubSpot CMS: serverless functions from the design manager (URLs under
/_hcms/api/) also can't be edited since November 17 and stop running on February 1, 2027. They have to move to developer projects and are then reachable under/hs/serverless/. Every page, module and setting that calls them needs the new URL. - Combine the work: if you're already moving private apps to the new keys, check your code actions in the same pass.
Don't want to do the inventory yourself? We upgrade your HubSpot workflows to Node.js 24 or move the logic to Make or n8n where it fits better. See how we work with n8n on our n8n automation agency page. Tell us briefly which actions are affected: get in touch.
Frequently asked questions
Can I use Python instead of Node.js 24?
Python is only available as a beta for custom code actions. HubSpot's upgrade guide names Node.js 24 as the target, so for production workflows that's the safe route.
How exactly does HubSpot retry an action after a rate limit error?
If your code rethrows the error in the catch block, the first retry starts one minute later. After that, HubSpot keeps trying for up to three days, with a maximum gap of eight hours between attempts.
How many values can a custom code action return?
HubSpot doesn't state a fixed maximum number of output fields. String output values can be up to 65,000 characters long, and each action can include up to 50 HubSpot properties.
What if Node.js 20.x is missing from the Language dropdown?
Then there's no way back to Node.js 20. The action has to work on Node.js 24, so fix the errors there instead of rolling back.
Sources
Tell us what you're planning. You'll get an honest assessment within 24 hours.
More articles