Skip to content

Programmable automation for HubSpot

Make HubSpot do the hard part.

Add a real code step to any workflow. JavaScript or Python, any package, minutes of runtime—and every execution is observable, replayable, and safe to test.

Runtime
up to 15m
Packages
npm + pip
Data Hub
not required
workflow / enrich-companylive
HS

Company enrolled

object 4471

domain
acme.co
industry
run-code / enrich-company.jsv12
const company = await enrich(domain)

await ctx.hubspot.companies.update(
  event.object.objectId,
  { industry: company.industry }
)
executing31.8s

Workflow resumed

finished in 41.2s

industrySoftware
inputcompany 44712 properties updated

A real execution

20 seconds is where native stops.

Turbyn pauses the workflow enrollment, gives your code the time it actually needs, then hands the result back and resumes the workflow.

Native20.0s
Turbyn41.2s
enrich-company / run_8f31live trace
0s20s40s60s
native
terminated
turbyn
completed
20.0s

workflow enrollment parked

40.9s

company enrichment returned

41.2s

workflow resumed

industry = "Software"memory 74 MB

No black boxes

See exactly what your code did.

The editor is only half the product. The rest is knowing what happened after a workflow handed your code a real customer record.

  1. 01

    Imports are the manifest

    Use any npm or pip package. Turbyn resolves and pins the dependency tree when you publish.

    date-fns · libphonenumber-js · httpx

  2. 02

    Test without writing

    Build the event from a real CRM record, then intercept every write before it reaches HubSpot.

    would write industry = "Software"

  3. 03

    Keep the whole execution

    Payload, console, outputs, timing and stack trace. Replay one run or every failure from the last day.

    replay · single or bulk

enrich-company

run_8f31 · company 4471

success
Overview
Input
Console
Output
Console output

00:00.041 INFO received company 4471

00:00.096 INFO resolving domain acme.co

00:20.000 WAIT enrollment parked

00:40.941 INFO enrichment returned 200

00:41.108 DRY would write industry = "Software"

00:41.214 DONE 2 output fields · 74 MB

$

Duration41.2s
Versionv12
ReplayRun again

Bring what already works

Paste it in. Press run.

Turbyn speaks HubSpot’s handler signature verbatim. The same exports.main, the same event object, and both callback and return styles.

Rewrite0 lines
Migrationpaste

The optional ctx object adds Turbyn’s package, secret and HubSpot helpers. Ignore it until you need it.

HS

HubSpot custom code

normalize-email.js

source
exports.main = async (event, callback) => {
  const email = event.inputFields['email'];

  callback({
    outputFields: {
      normalized: email.trim().toLowerCase()
    }
  });
};
Paste unchanged

Test passed

callback detected automatically

outputnormalized ✓

From code to canvas

A workflow step in about ten minutes.

No infrastructure project and no separate webhook service. The action appears in HubSpot beside the steps your team already uses.

  1. 01

    Connect

    Install Turbyn and authorise a portal.

    portal / connected
  2. 02

    Write

    Start from a template or paste an existing action.

    javascript · python
  3. 03

    Test

    Run against a real record without writing to it.

    dry run / passed
  4. 04

    Publish

    Snapshot the code and pin every dependency.

    version / v12
  5. Place

    Pick the action inside the HubSpot workflow builder.

    workflow / live

Existing action? Start at step two and paste it unchanged.

Open the quickstart

Side by side

The useful differences.

Concrete limits and behaviour, not a wall of green checkmarks.

The native action is still the simpler choice when its limits are enough. Languages are identical, and keeping code inside HubSpot can be a genuine advantage.

Native custom code
Turbyn
Execution time
20 seconds
Up to 15 minutes
Memory
128 MB
Configurable per action
Packages
~12 built in
Any npm or pip package
Testing
Writes to the record
Dry-run against a real record
Run history
Workflow history line
Payload, console and timing
Five more details
Replay
Re-enroll the record
Single or bulk replay
Version control
None
Immutable versions and rollback
Secrets
Per-action
Encrypted, reusable vault
Languages
JavaScript, Python
JavaScript, Python
Code location
Inside HubSpot
Inside Turbyn

Native custom code also requires Data Hub Professional. Read how the gating actually works.

FAQ

Common questions

Do I need Data Hub Professional to use this?

No. Turbyn provides its own workflow action through HubSpot's app platform, and app-provided actions are not gated by Data Hub. You do need the workflow tool itself, which means Professional or Enterprise on some hub.

How is this different from the native custom code action?

The native action stops at 20 seconds and 128 MB. It ships about a dozen packages with no install step, and its test mode writes to the real record. Turbyn has none of those three limits.

Will my existing HubSpot custom code work?

Usually yes, unchanged. Turbyn uses HubSpot's handler signature verbatim, including the same exports.main and event object. Both the modern return style and the older callback style work.

Where does my code actually run?

In an isolated sandbox on Turbyn's infrastructure, one micro-VM per execution. Code from different customers never shares a runtime. Secrets are decrypted at the moment of invocation and injected as environment variables.

What happens to running actions if I disconnect the portal?

In-flight runs are parked rather than lost, and their workflow enrollments stay paused. Reconnect and they resume. HubSpot's pause window is about a week, which is the practical outer bound.

Does it work in the new Agent Hub workflow builder?

Yes. Actions from connected apps appear on HubSpot's new canvas-based builder alongside the native ones. The same saved action works in both the legacy tool and the new one.

Ready when you are

Give one workflow more room.

Bring an action you already have or start from a template. The free tier does not ask for a card.

workflow / next step

$ turbyn run the-hard-part

connecting portal…

ready to write your first action