Custom code

Write and execute JavaScript for custom logic

Add JavaScript steps to your workflows. Implement complex logic, calculations, and data transformations that visual tools can't handle—all built in, no external functions.

Included free • JavaScript • Full workflow access • Return to steps
Custom Code tool

Popular solutions using custom code

Real-world automation scenarios

Custom calculations

Custom calculations

Compute totals, taxes, discounts, or LTV from order and customer data. Return values for Filter, Paths, or Data.

Tools: Code, Filter, Data, Shopify
View template →
Complex data reshaping

Complex data reshaping

Transform API responses or webhook payloads into the format another step expects. Map, filter, and reduce arrays.

Tools: Code, API, Webhook, Transform
View template →
Dynamic content generation

Dynamic content generation

Build HTML, JSON, or text from workflow data. Generate email body, API payload, or report content programmatically.

Tools: Code, Email, API, Data
View template →
Custom validation

Custom validation

Validate data before proceeding. Check formats, ranges, or business rules. Return pass/fail for Filter to act on.

Tools: Code, Filter, Paths, Data
View template →
Aggregation and reporting

Aggregation and reporting

Aggregate line items, sum quantities, group by category. Prepare data for reports or downstream steps.

Tools: Code, Loop, Data, Schedule
View template →
Algorithm implementation

Algorithm implementation

Implement custom algorithms—deduplication, scoring, matching. Full JavaScript for logic that visual tools can't handle.

Tools: Code, Filter, Paths, Data
View template →

Getting started with custom code

1

Add a Code step

Insert Custom Code where you need custom logic. Write JavaScript in the built-in editor.

2

Access workflow data

Reference data from previous steps. Use the workflow context to read triggers, API responses, and more.

3

Return values

Export variables for later steps. Filter, Paths, Email, API, and Data can use your code\'s output.

Why choose MESA's custom code?

MESA Custom CodeZapierMakeExternal functions
Included in priceCode by ZapierCustom scriptsExtra service
JavaScriptLimitedLimitedVaries
Workflow data accessCustom
Return to stepsCustom
No external infraNo
CostFREEPer taskPer opInfra + dev

Unlike other platforms, MESA's Custom Code tool is included free with every plan.

Common questions

What's the difference between Custom Code and Transform?

What language does Custom Code use?

What can I access in the code?

Can I use npm packages?

Is there a time limit?

Can I use Code with Filter and Paths?

Do I need to be a developer?

Where can I learn more?

Start using the MESA Custom Code tool today

Included free in all MESA plans

Need help getting started? Our team will help you implement your first code step. Contact us →