Can you run custom code in HubSpot workflows without Data Hub?
Native custom code actions in HubSpot require Data Hub Professional or Enterprise. Workflows themselves only require Professional of any hub, so the gap is the code step, not automation. A connected app can register its own workflow action that runs JavaScript or Python, and app-provided actions carry no Data Hub requirement.
Last updated
The short version: workflows and the custom code step are gated separately, and people frequently assume otherwise.
Where the line actually falls
| Capability | What it requires |
|---|---|
| The workflow tool itself | Professional or Enterprise of any hub |
| Native custom code action | Data Hub Professional or Enterprise |
| Native “Send a webhook” action | Data Hub Professional or Enterprise |
| Connected app / integration actions | Professional or Enterprise of any hub |
So a portal on Marketing Hub Professional or Sales Hub Professional has fully functional workflows, and a locked custom code step inside them. Data Hub Professional lists at roughly $720/month billed annually.
The second row surprises people more than the first. “Send a webhook” has been gated since April 2021, which closes the obvious escape hatch. You can’t push the work to your own server with a native action either. That’s what makes the fourth row matter: an app-provided action is the remaining supported way to get arbitrary logic into a workflow step.
The Operations Hub / Data Hub naming
HubSpot renamed Operations Hub to Data Hub at INBOUND in September 2025. Nothing about the gating or pricing changed. If you’re reading a guide from 2024 that says “Operations Hub Professional,” it means what’s now called Data Hub Professional. Both names still appear across HubSpot’s own knowledge base.
What changed with the new workflow builder
HubSpot launched Agent Hub and a rebuilt, canvas-based workflow builder in public beta in July 2026. Two things are worth knowing, because the builder’s behaviour is genuinely misleading:
The custom code gate travelled to the new builder, but it’s enforced late. In legacy workflows, the custom code action displays as locked. In the new builder, it appears unlocked in the action picker and can be added to the canvas. Only on use does an account without Data Hub get told it doesn’t have access. Anyone evaluating the new builder by eye would reasonably conclude the gate had been dropped. It hasn’t.
Some other gates genuinely were dropped. The “webhook event is received” trigger and scheduled triggers no longer require Data Hub on the new canvas. So the direction of travel isn’t uniformly restrictive, but custom code specifically stayed gated.
Third-party app actions appear in the new builder. Actions provided by connected apps show up on the new canvas alongside native ones, so this approach isn’t tied to the legacy tool.
How app-provided actions work
HubSpot’s Automation API lets a connected app register custom workflow actions. Once you install the app, its actions appear in your workflow editor grouped under the app’s name. You add one like any other step and map inputs from CRM properties or previous actions.
When the action runs, HubSpot posts the enrollment payload to the app, and the app returns output fields that later steps can branch on or copy into properties. The code executes on the app’s infrastructure, which is why the Data Hub requirement doesn’t apply, and why the 20-second native limit doesn’t either.
This is a documented platform capability, not a loophole. It’s the same mechanism behind every integration action in the marketplace.
There is one honest constraint: you configure the code in the app rather than in the HubSpot editor. HubSpot has no code-editor field type for third-party actions, so the workflow step holds the inputs and a picker for which saved action to run, while the code itself lives in the app.
Where Turbyn fits
Turbyn is a connected app that provides exactly this: a Run Code workflow action, backed by JavaScript or Python that you write in Turbyn.
What you get beyond clearing the gate, and this matters, because a tool whose only value is a gate is a bad bet:
- Minutes of runtime, not 20 seconds. Long API calls and document generation fit.
- Any npm or pip package, versus about a dozen built-ins in the native runtime.
- A test loop that doesn’t mutate your data. Hydrate the event from a real record, dry-run it, and see what would be written before anything is.
- Run history, streaming console output and one-click replay for every execution.
- Python and JavaScript, both first-class.
The handler signature is deliberately identical to HubSpot’s, so existing code moves over unchanged:
exports.main = async (event, ctx) => { const email = event.inputFields.email;
// ctx is the only addition. A pre-authenticated HubSpot client, // a secrets vault, a KV store and structured logging. const contact = await ctx.hubspot.contacts.get(event.object.objectId);
return { outputFields: { output1: contact.properties.lifecyclestage } };};If you’re on Professional without Data Hub and you’ve been working around the missing code step, that’s the situation this was built for.
FAQ
Frequently asked
Is the custom code action available on Marketing Hub Professional?
Not the native one. HubSpot's built-in custom code action requires Data Hub Professional or Enterprise, regardless of which other hubs you own. Marketing Hub Professional gives you workflows, but the custom code step inside them stays locked.
What happened to Operations Hub?
HubSpot renamed Operations Hub to Data Hub at INBOUND in September 2025. The pricing and the feature gating carried over unchanged, so guidance written about Operations Hub still applies. Only the name is different. You'll see both names in HubSpot's own documentation.
Do app-provided workflow actions really work without Data Hub?
Yes. HubSpot's own documentation states that all connected app and integration actions can be used in all available workflow types, on the same page that describes the Data Hub requirement for native custom code. The requirement is Professional of some hub, which is what gives you workflows in the first place.
Is the custom code action unlocked in the new Agent Hub workflow builder?
No, though it looks like it is. In the new builder the native custom code action appears unlocked in the action picker and can be dropped onto the canvas, but on use, an account without Data Hub gets an error saying it doesn't have access to this action. The gate is enforced at execution, not in the picker.
Does this work on Starter or Free?
No. Workflows require Professional or Enterprise of at least one hub. Without the workflow tool there's no step to add an action to, so no approach. Native or app-provided. Applies below Professional.