How to Run JavaScript Code on Make (formerly Integromat)

Make.com is a powerful automation tool that allows you to connect various apps and services to create automated workflows, known as scenarios. However, it’s important to note that Make does not natively support the execution of JavaScript code within its platform.

Introducing Nodetrigger

Nodetrigger is designed to bridge this gap. It is a simple and affordable service that enables you to add various useful actions to your Make scenarios. One of these actions is the ability to execute JavaScript code. By integrating Nodetrigger with your Make scenarios, you can extend the functionality of your workflows significantly.

Real-Life Examples

Here are some simple yet useful JavaScript codes that you can run using Nodetrigger:

  1. Generate a Random Number const randomNumber = Math.floor(Math.random() * 26) + 4; return randomNumber;
  2. Format a Date const formatDate = (date) => { const d = new Date(date); const day = d.getDate(); const month = d.getMonth() + 1; const year = d.getFullYear(); return `${day}-${month}-${year}`; }; return formatDate('2024-06-02');
  3. Calculate Sum of an Array
    javascript const sumArray = (arr) => { return arr.reduce((sum, num) => sum + num, 0); }; return sumArray([1, 2, 3, 4, 5]);

How to Write the Code

To run JavaScript code on Make using Nodetrigger, you need to structure your code as a function and ensure it returns the desired output. Here’s an example code snippet that demonstrates this:

const randomNumber = Math.floor(Math.random() * 26) + 4;
return randomNumber;

When you send this code to Nodetrigger, it will execute the JavaScript and return the result.

Conclusion

While Make.com does not support JavaScript execution natively, Nodetrigger offers a seamless solution to integrate this capability into your workflows. By using simple JavaScript code snippets and leveraging Nodetrigger, you can enhance the automation potential of your Make scenarios.