It’s actually quite easy to do, using Google Cloud Functions.
Here’s a super simple way to re-implement the built in
Built In Function
This is the sensible way to do this, using the built in Integromat function:
1.. Create a new Google Cloud Function by clicking here. You might have to create a Google Cloud account if you don’t already have one. The usage in this example is within the free tier.
2.. Fill in the name, select 128 MB memory, and leave the runtime as Node.js 6:
3.. Next, add the code, which can be found at this gist, and set the function to match the function named within the code. Also, set the region to
europe-west-1to be closer to the Integromat servers, resulting in a faster load time.
4.. Find the Trigger URL for this function by clicking on it and clicking “Trigger”. You’ll need to copy this for use later.
5.. Now go back to Integromat and create a new HTTP “Make a request” module. Set it up with the URL as the trigger from step 4, with the GET variables for “old_string”, “text_to_find”, and “text_to_replace”. The output should be the string, but with old replaced by new. This should work the same as the built in function.
You can now use the output of that anywhere else in the scenario!
Basic security can be added with an API Key type structure (with a hardcoded key in the function), otherwise anyone will be able to “call” the function if they know the URL. If I have time I will write more on that later.