How to Use Custom Functions in Make.com
Custom functions in make.com let you encapsulate reusable logic in JavaScript so you can keep scenarios clean, avoid repetition, and build powerful automations without extra modules.
This how-to explains what custom functions are, how they are processed, how to create them step by step, and how to use them safely in your scenarios.
What are Custom Functions in Make.com?
A custom function in make.com is user-defined JavaScript that runs inside a scenario. It behaves like a normal JavaScript function: it takes zero or more arguments, performs operations, and returns a single value.
Key characteristics:
- Written in standard JavaScript (ES5-compatible subset).
- Executed by a dedicated JavaScript engine provided by the platform.
- Available as a reusable function across modules inside the same scenario.
- Return value can be used anywhere a mapping value is accepted.
How Custom Functions Work in Make.com
When you use a custom function in make.com, the platform sends the function and its arguments to an execution environment that interprets the code and returns the output back to your scenario.
Important technical details:
- Each function call is evaluated independently.
- Only synchronous JavaScript is supported; asynchronous APIs like
setTimeoutare not available. - You can use standard language features such as variables, conditionals, loops, and arrays.
- The function must explicitly return a value with the
returnstatement.
The full technical reference and latest limitations are described in the official documentation at Custom functions | Make help.
Prerequisites for Using Make.com Custom Functions
Before creating your first custom function in make.com, ensure you have:
- Access to a make.com account and an existing scenario.
- Basic understanding of scenario building and mapping fields.
- Fundamental JavaScript knowledge (variables, expressions, and functions).
You do not need to be an advanced developer, but being able to read and write simple JavaScript expressions will make custom functions much more useful.
How to Create a Custom Function in Make.com
Follow these steps to create and define a new custom function inside your scenario.
Step 1: Open the Scenario in Make.com
- Sign in to your make.com account.
- From the dashboard, open the scenario where you want to use a custom function.
- Switch to the scenario editor so you can access module settings and mapping.
Step 2: Access the Functions Editor in Make.com
- Open any module where you can map values (for example, a data transformer or an app module).
- Click into a field that supports functions and mapping.
- Locate the section where you can manage custom functions (often available in the mapping panel or function picker).
This opens the interface where you can add, edit, or remove functions for the current scenario.
Step 3: Add a New Custom Function
- Choose the option to add a new function.
- Enter a clear, descriptive name for your function (no spaces, start with a letter).
- Specify the function parameters (arguments) if needed, separated by commas.
Your function signature will look similar to:
function myFunction(arg1, arg2) {
// Your code here
return result;
}
Note that the actual editor in make.com may not require you to type the word function in the signature, depending on the interface. Always follow the format shown in the on-screen helper.
Step 4: Write the JavaScript Logic
Inside the editor in make.com, enter the body of your custom function. You can use:
- Variables with
var,let, orconst(according to engine support). if/elseconditionals.fororwhileloops.- Array and string methods supported by the JavaScript engine.
Always ensure that the function returns a value. For example:
function addNumbers(a, b) {
var sum = a + b;
return sum;
}
If your code does not return anything, make.com will not be able to use the result in mappings.
Step 5: Validate and Save the Function
- Use the built-in validation (if available) to check syntax errors.
- Correct any reported issues until the function parses successfully.
- Save the function to make it available within the scenario.
Once saved, the custom function is listed in the function picker where you can call it like any other built-in function.
How to Call Custom Functions in Make.com
After you define a custom function, you can use it in any mapping field that accepts functions.
Step 1: Insert the Function into a Field
- Open the module whose field you want to populate.
- Click into the field to bring up the mapping panel.
- Find your custom function under the functions section.
- Click the function name to insert it into the field.
Step 2: Map Arguments from Make.com Modules
If your function requires arguments, supply them by:
- Typing literal values (for example, numbers or text).
- Dragging and dropping items from previous module outputs.
- Combining literals and mapped items as parameters.
Example usage pattern:
addNumbers({{1.value}}, {{2.value}})
In this example, the placeholders represent data coming from earlier modules in the scenario.
Step 3: Use the Return Value
The value returned by the custom function in make.com is evaluated just like any other expression. You can:
- Store it in another app via a module.
- Use it inside condition filters.
- Pass it to subsequent modules for further processing.
Best Practices for Make.com Custom Functions
To keep your make.com scenarios maintainable and efficient, follow these recommendations:
- Use clear names: Name functions according to what they do (for example,
formatInvoiceDate,normalizePhoneNumber). - Keep functions small: Focus each function on a single task to simplify debugging.
- Validate inputs: Check for
null,undefined, or unexpected types before performing operations. - Comment complex logic: Use inline comments in the editor when calculations or conditions are not obvious.
- Test with simple data: Run the scenario with known inputs and log or inspect outputs to confirm behavior.
Troubleshooting Custom Functions in Make.com
If your function does not behave as expected in make.com, check the following:
- Syntax errors: Ensure all brackets, braces, and parentheses are balanced.
- Return statement: Confirm that every execution path ends with a
returnvalue. - Argument order: Verify that you pass arguments in the same order they are defined in the function.
- Data types: Make sure you are not mixing strings and numbers unintentionally. Use
parseIntorparseFloatwhen necessary. - Scenario data: Check if mapped fields are actually populated at runtime.
If issues persist, compare your implementation with the examples and notes in the original documentation for custom functions on the official help site.
Where to Learn More About Make.com Custom Functions
To deepen your knowledge and stay aligned with the current platform capabilities, review the official guide at https://help.make.com/custom-functions. It provides the most up-to-date technical constraints, examples, and platform-specific notes.
If you need expert consulting on automations, integrations, or scenario design beyond make.com documentation, you can also explore specialized services at Consultevo.
By applying these steps and practices, you can leverage custom functions in make.com to centralize logic, reduce repetitive mappings, and create cleaner, more powerful scenarios.
Need Help With Make.com?
If you want expert help building, automating, or scaling your Make scenarios, work with ConsultEvo — certified workflow and automation specialists.
