HubSpot Implementation9 min readDecember 2, 2026Jasmine Lovalace

HubSpot Custom Code Actions and the Node.js 24 Upgrade: What Canadian B2B Teams Must Fix Now, Plus the Python 3.9 Deadline (2026)

Many B2B HubSpot portals quietly depend on a few lines of custom code: the step that assigns a pricing tier, routes a dealer inquiry, or looks up an account in the ERP. HubSpot has now frozen the Node.js 20 runtime those steps usually run on, and Python 3.9 follows in January. Here is what changed, what breaks, and how to upgrade without disrupting sales or order workflows.

If your HubSpot workflows contain custom code actions on Node.js 20 or earlier, they are now effectively read-only: HubSpot stopped new Node.js 20 actions on November 3, 2026, and stopped saving edits to them after November 17, 2026. Rewrite them as async handlers on Node.js 24, and move any Python 3.9 actions to Python 3.14 before January 5, 2027. The actions are reported to keep running for now, which makes this easy to ignore. The risk is that the first time one breaks, because an ERP field changes or an API response shifts, nobody can fix it without a rushed migration.

The Quick Answer

HubSpot custom code actions are workflow steps that run your own JavaScript or Python, available in Data Hub (formerly Operations Hub) Professional and Enterprise. HubSpot has retired Node.js 16 and Node.js 20 for these actions because they no longer receive security updates. Node.js 24 is the supported JavaScript runtime and requires async handlers. Python 3.9 is sunset on January 5, 2027, with Python 3.14 recommended. To stay safe, inventory every action, upgrade or replace the ones you still need, and test before switching production workflows.

Why it matters: custom code usually sits on the most valuable automation in a B2B portal, the logic that sets pricing, assigns owners, and syncs account data. An action you cannot edit is a single point of failure in your revenue process.

Runtime Status and Deadlines at a Glance

RuntimeStatusKey datesWhat to do
Node.js 16No security updatesUpgrade before November 17, 2026Move to Node.js 24 now
Node.js 20No new actions, edits frozenCreation ended November 3, 2026, edits ended November 17, 2026Rewrite as async and move to Node.js 24
Node.js 24Current, supportedRecommended runtimeTarget for every JavaScript action
Python 3.9Sunset announcedNo creates or updates after January 5, 2027Move to Python 3.14 in December
Python 3.14Current, supportedRecommended runtimeTarget for every Python action

Why it matters: two of these deadlines have already passed and the third lands in the first week of January, when many Canadian teams are still back from the holidays. December is the practical window to finish the work.

1. Understand What Changed and What Still Runs

HubSpot announced the retirement of older Node.js runtimes for workflow custom code actions alongside the sunset of Design Manager serverless functions. For custom code actions, new Node.js 20 actions could no longer be created from November 3, 2026, and HubSpot asked customers to upgrade Node.js 16 and Node.js 20 actions to Node.js 24 before November 17, 2026. Partners tracking the change report that after November 17, existing Node.js 20 actions continue to execute, but edits to them can no longer be saved.

Design Manager serverless functions are a separate track with their own timeline. If your website or CMS uses serverless functions for forms, pricing lookups, or gated content, review those separately rather than assuming the workflow upgrade covers them.

HubSpot can tighten enforcement after its announced dates, and behaviour can differ by portal. Check HubSpot's developer changelog and the custom code actions documentation for the current rules before you plan around old actions continuing to run.

Why it matters:"still running" is not the same as "supported". Frozen code on an unpatched runtime is a security and continuity risk that grows every month you leave it.

2. Inventory Every Custom Code Action

Most manufacturers and wholesalers we work with do not have a list of their custom code. Actions were added over the years by an admin, a developer, or a previous agency to solve one problem at a time. Open every active workflow, starting with deal, company, order, and ticket workflows, and record the following for each custom code step.

Record thisWhy
Workflow and stepTells you where the action lives and whether the workflow is still on
Runtime versionNode.js 16, Node.js 20, or Python 3.9 actions go to the top of the list
Business purposePricing tier, routing, ERP lookup, data cleanup, or notifications
Run volumeHigh-volume actions need careful testing and rate limit checks
Secrets and external systemsPrivate app tokens, ERP keys, and Shopify credentials may also need rotation
Owner and last editorFinds actions built by former staff or a past agency
DecisionRewrite, replace with a native action, or retire

Why it matters: you cannot prioritize what you have not found. An inventory usually turns a vague worry into a short, finite list, often five to fifteen actions for an SMB portal.

3. Rewrite Callback Handlers as Async

The most common change is structural. Older actions export a function that receives the event and a callback, then pass outputs to the callback. HubSpot's Node.js 24 runtime supports only async handlers, so exports.main must be an async function that returns the output object. A simple pricing tier action looks like this before and after.

// Before: Node.js 20 callback style
exports.main = (event, callback) => {
  const tier = event.inputFields["annual_spend"] > 50000 ? "Gold" : "Standard"
  callback({ outputFields: { pricing_tier: tier } })
}

// After: Node.js 24 async style
exports.main = async (event) => {
  const tier = event.inputFields["annual_spend"] > 50000 ? "Gold" : "Standard"
  return { outputFields: { pricing_tier: tier } }
}

Actions that call external systems need more care. Replace nested callbacks and promise chains with await, wrap external calls in try and catch blocks, and decide what the workflow should do when the ERP or Shopify does not respond: retry, set an error property, or notify an owner. Partners report that HubSpot's Breeze assistant can suggest updated code, which is a useful starting point but still needs a developer review.

Why it matters: a mechanical upgrade that forgets to return outputs will run without errors and silently stop setting properties downstream, which is the hardest kind of failure to notice.

4. Update Libraries, Secrets, and Test on Real Records

Changing the runtime also changes the bundled libraries. Partners report that the HubSpot API client moves to a newer major version and the old request library is no longer available, so any action using request needs to switch to fetch or another supported client, and API client calls should be checked against the new method signatures.

Review secrets at the same time. If an action authenticates with a private app token or an ERP key that has not been rotated in years, this is the moment to replace it. Then test each upgraded action on real records in a cloned or low-risk workflow, compare the outputs to the old action, and only then switch the production workflow over.

Why it matters: pricing, routing, and order data errors reach customers and reps quickly. Side-by-side testing on real Canadian accounts, with real currencies, provinces, and tax fields, catches the edge cases a quick test record misses.

5. Move Python 3.9 Actions Before January 5, 2027

HubSpot has announced that Python 3.9 for custom code actions is sunset on January 5, 2027. After that date, you will not be able to create or update actions on Python 3.9, and HubSpot recommends switching to Python 3.14. Python actions are less common in SMB portals, but they often appear where a data person built enrichment, scoring, or cleanup logic.

Treat the Python move like the Node.js one: inventory, test, then switch. Pay attention to any third-party packages the code imports and to date and string handling, which are common sources of small behaviour differences between versions.

Why it matters: fixing both runtimes in one December project costs far less than two separate emergencies, one now and one in the middle of January.

6. Rewrite, Replace, or Retire

Not every action deserves to be upgraded. Rewrite actions that carry real business logic and still run often, such as pricing tier assignment from order history, territory and dealer routing, or ERP credit checks. Replace actions with standard workflow actions, data formatting actions, or a native integration when HubSpot can now do the job without code. Retire actions sitting in workflows that are turned off or no longer match how you sell.

Logic that is really an integration, such as syncing Shopify B2B orders or ERP inventory into HubSpot, is often better moved to a proper app or data sync than kept as a workflow step that calls an API on every enrollment. That also lines up with HubSpot's wider move away from legacy APIs and older app models.

Why it matters: every line of custom code is something your team has to maintain through the next deprecation. Using this upgrade to shrink that footprint makes the following one cheaper.

Which AtlanticWorks Guide Answers Your Question

This guide covers the custom code runtime change inside workflows. If your question is about plans, APIs, apps, or AI, one of these will be a better fit.

If your problem isRead
You are unsure what Data Hub includes after the Operations Hub rebrandHubSpot Operations Hub Is Now Data Hub
Your integrations use legacy APIs or public apps that are being retiredHubSpot's Legacy API and App Sunset
Your custom code authenticates with a private app tokenHubSpot Private Apps Sunset
You want to know what automation your HubSpot tier allows without codeHubSpot Automation by Plan Tier
You want AI inside workflows, not just a runtime upgradeCustom AI Automation Inside HubSpot

Why it matters: HubSpot is retiring several older developer tools at once. Knowing which change affects which part of your portal keeps the work scoped and the budget predictable.

How AtlanticWorks Helps

AtlanticWorks audits HubSpot portals for Canadian manufacturers, wholesalers, retailers, and DTC brands, and handles runtime upgrades as part of keeping automation healthy. We inventory every custom code action, rewrite the ones that matter for Node.js 24 and Python 3.14, test them against real records, and replace or retire the rest with native workflow actions or proper integrations to Shopify, your ERP, and accounting. As a certified HubSpot, Shopify, Google, and Salesforce partner based in Fredericton, we work across the systems your workflows depend on. The free assessment is the fastest way to find out how much custom code your portal carries and what needs attention first.

Key Takeaways

  • HubSpot stopped new Node.js 20 custom code actions on November 3, 2026, and froze edits to existing Node.js 20 actions after November 17, 2026. Node.js 24 is the supported runtime.
  • Existing Node.js 20 actions are reported to keep running, but you cannot fix them in place. Any action that breaks has to be upgraded before it can be edited.
  • Python 3.9 custom code actions are sunset on January 5, 2027. Move them to Python 3.14 this month.
  • The core code change is the handler: Node.js 24 needs an async exports.main that returns the output object instead of calling callback. Library versions also change.
  • Start with an inventory of every custom code step, its runtime, purpose, secrets, and owner, then decide to rewrite, replace with a native action, or retire it.
  • Test each upgraded action on real records in a cloned or low-risk workflow before switching production, especially actions that set pricing, routing, or order data.

Frequently Asked Questions

What changed with HubSpot custom code actions and Node.js 20?

HubSpot has retired older Node.js runtimes for workflow custom code actions. As of November 3, 2026, you can no longer create new custom code actions on Node.js 20, and HubSpot asked customers to move existing Node.js 16 and Node.js 20 actions to Node.js 24 before November 17, 2026, because those older versions no longer receive security updates. HubSpot's recommended runtime for custom code actions is now Node.js 24.

Do my Node.js 20 custom code actions stop running?

Based on HubSpot's guidance and partner reports, existing Node.js 20 actions keep running for now, but changes to them can no longer be saved after November 17, 2026. That means a broken or outdated action cannot be fixed in place. You have to upgrade it to Node.js 24 to edit it, and HubSpot can enforce further restrictions later, so treat any action still on Node.js 16 or 20 as technical debt with a short shelf life.

What code changes does Node.js 24 require in HubSpot?

The main change is the handler style. Node.js 20 and earlier actions usually pass outputs to a callback function. HubSpot's Node.js 24 runtime supports only async handlers, so exports.main must be an async function that returns the output object instead of calling callback. Partners also report that bundled library versions change, including a newer HubSpot API client and removal of the old request library, so code that relies on those needs updating and testing.

When is the HubSpot Python 3.9 custom code deadline?

HubSpot has announced that Python 3.9 for custom code actions is sunset on January 5, 2027. After that date you will not be able to create or update custom code actions that use Python 3.9, and HubSpot recommends switching existing actions to Python 3.14. If your team built any Python actions, plan that migration alongside the Node.js work rather than after it.

Which HubSpot plan includes custom code actions?

Custom code actions in workflows are part of HubSpot's Data Hub, formerly Operations Hub, at the Professional and Enterprise tiers. If your portal has custom code actions, someone on your team or a past partner bought one of those tiers. Confirm your current subscription in HubSpot's account settings, because plan names and bundles have changed through the Data Hub rebrand.

How do I find every custom code action in my HubSpot portal?

Review every active workflow for custom code steps, starting with workflows that touch deals, companies, orders, and tickets. Record the workflow name, object type, runtime version, secrets used, external systems called, and the person who last edited it. Many B2B portals have a handful of actions built years ago by a former employee or agency, so also search your documentation and integration notes for anything that calls an ERP, Shopify, or a pricing system from a workflow.

Should we rewrite custom code actions or replace them?

Rewrite actions that carry real business logic and still run often, such as pricing tier assignment, territory routing, or ERP lookups. Replace actions with standard workflow actions, data formatting actions, or a native integration when HubSpot now does the job without code. Retire actions in workflows that are off or no longer used. The upgrade is a good moment to cut the amount of custom code you maintain, not just to change a version number.

Not sure what custom code is running inside your HubSpot workflows?

AtlanticWorks inventories, upgrades, and simplifies HubSpot automation for Canadian B2B teams. The free assessment shows which workflows are at risk and what to fix first.

Start the Assessment