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.
Popular solutions using custom code
Real-world automation scenarios
Custom calculations
Compute totals, taxes, discounts, or LTV from order and customer data. Return values for Filter, Paths, or Data.
Complex data reshaping
Transform API responses or webhook payloads into the format another step expects. Map, filter, and reduce arrays.
Dynamic content generation
Build HTML, JSON, or text from workflow data. Generate email body, API payload, or report content programmatically.
Custom validation
Validate data before proceeding. Check formats, ranges, or business rules. Return pass/fail for Filter to act on.
Aggregation and reporting
Aggregate line items, sum quantities, group by category. Prepare data for reports or downstream steps.
Algorithm implementation
Implement custom algorithms—deduplication, scoring, matching. Full JavaScript for logic that visual tools can't handle.
Pre-built custom code templates
Get started with these customizable workflow templates
Getting started with custom code
Add a Code step
Insert Custom Code where you need custom logic. Write JavaScript in the built-in editor.
Access workflow data
Reference data from previous steps. Use the workflow context to read triggers, API responses, and more.
Return values
Export variables for later steps. Filter, Paths, Email, API, and Data can use your code\'s output.
Building is better together
Tools often used together:
Why choose MESA's custom code?
| MESA Custom Code | Zapier | Make | External functions | |
|---|---|---|---|---|
| Included in price | ✓ | Code by Zapier | Custom scripts | Extra service |
| JavaScript | ✓ | Limited | Limited | Varies |
| Workflow data access | ✓ | ✓ | ✓ | Custom |
| Return to steps | ✓ | ✓ | ✓ | Custom |
| No external infra | ✓ | ✓ | ✓ | No |
| Cost | FREE | Per task | Per op | Infra + 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 →


