How to run JavaScript or Python Code

anyone interested, there is this feature request to vote for:

FYI Make did a big middle finger to all their regular users, when they implemented this only for enterprise users:
https://www.make.com/en/platform-ideas/p/code-javascript-python-php

4 Likes

Yes i put an other feature request too :slight_smile:
It’s so crucial to have this on Make for all users.
Zapier do that for a while and for all users…

https://www.make.com/en/app-improvement-ideas/p/run-pyhton-code

2 Likes

Hey,
I often had the problem to execute JavaScript in my scenarios and since Make.com does not offer it natively, I wrote a plugin to solve this: https://www.customjs.space

If you need help please contact me.

1 Like

Because there will be cases where you need to obviously.

Hi Alex!
I’m facing a challenge that might answer your question.
I’m (possibly foolishly) considering creating a reconciliation process for reconciling my banking transactions. I have all the data I need in AirTable and Quickbooks, so figured I could automate my monthly recon process and stop having to a find book keeper to do so. Assume I have Quickbooks data in Dataset A and Banking Transactions from FinTable in Dataset B.
What I want to know:
What records exist in Dataset A that do NOT exist in Dataset B
… AND what records exist in Dataset B that do not exist in Dataset A?
Ideally I’d be able to flag these somehow for review.
Using out of the box Make.com, I think I’m looking at two passes (one for each direction) with a 2 branch router for if exists/if not exists paths. There might be a way to do a combination of map() and contains() but I don’t yet fully understand contains() so not sure yet.
A few minutes of searching on the Google for doing this via Javascript, and it appears that it is almost laughably easy to do so. Here’s the line of code from a

function compare(data1,data2){
  for(let item of data1){
    if(data2.find(item2 => item2.id === item.id)) return true 
  }
  return false
}
console.log(compare(dataLog,dataLog2));

So if I were able to run something like this in my make scenario, it would be a dream. Just being able to call the function once with arguments D1 and D2 and then again with D2 and D1.
To be clear - I’m sure there is a way to do this in native make. But my (extensive) gut is telling me that it’s not going to be pretty (kind of like my extensive gut.)

Having said all that, if you have a suggestion, I am ALL EARS (…and gut. Did I mention my gut?) :grinning:

There are some custom apps that help you do array manipulation like this. Have a look.

But yes doing these things without JavaScript is hard no doubt but not impossible in Make.

@alex.newpath … WOW.
I mean…wow.
I’ve seen mentions of custom apps in Make but figured they would be too complicated for me to understand let alone tackle. But Lukes explanation + companion video walkthrough made it very easy to understand. THIS opens up a whole new range of possibilities.
Thank you so much for sharing this. I learned a lot from this.

1 Like

Sure thing. The interesting thing about Make is the app development environment gives you a ton of options to encapsulate functions and data manipulation that can save tons of operations. All Make apps have the ability to do this once they are coded properly and with the user in mind. This is one of the very cool things about make.

Also all Make accounts have the ability to create private apps and with the ability to publish them publicly if you want.

Looking back at this thread and seeing it has over 20k views it does seem this sort of functionality is crucial to have in make for all customers. I wonder what it would take to make the enterprise-only feature available for all Make accounts? The feature is already built and is called custom functions but it’s only available for enterprise plans for now.

1 Like

Yes, Make certainly needs to reconsider making custom functions available for everyone. This is because not everyone needs an Enterprise plan especially for hobbyists.

Even Make’s closest competitor (I won’t name but it’s obvious), has a built-in JavaScript module:

Screenshot_2024-09-02_110903

— @samliew

10 Likes

This is nonsense for a nocode platform to forbid users to write code when the platform reach it’s limitation. This make me seriously reconsider Make and go back to Zapier.

But you can run JavaScript with a bunch of apps. It’s just not part of core Make app. Maybe that will change soon. Maybe not.

Good luck with zapier!

4 Likes

I tried the Workers and it works, thanks a lot

  1. Read the document of cloudflare to deploy an app that run code (i ask chatgpt to give me the js code, then I ask ā€œplease give code I can use with cloudflare workerā€)
  2. copy and paste to worker to deploy
  3. copy the http link to make.com and paste to HTTP node
  4. run and get the response in Data

This is a great idea, have you also considered using Google App Scripts (Google Sheets extension) as this is another great way for you to be able to host code FOR FREE and have that send data to Make.com.

I find it much simpler as its all cloud based so for hobbyists or non-developers you don’t have to go setting up a local environment, dealing with publishing / hosting code etc.

Food for thought!

Pat
PG Automations

For those who know about custom apps, we’ve built our own ā€œThe missing Make Toolkitā€ custom app we use for our clients. Each time we need some scripting done we create a new module and build the corresponding IML for it. This works for over 90% of our scripting work.

Some examples:

  • simple text > HTML
  • convert array values > strings
  • Advanced array filtering (multiple filters incl. aggregate functions)
  • find an replace (1 step to go through multiple terms, useful for mailmerge like applications)
  • much more…

Just build a new module and use IML.

P.S. this thread is in the top 10 of views and now almost at 28K views :face_with_monocle: