How can I make a block inside Make that runs Google Apps Script

Hello everyone, I’m new to integrating “make” tools. Recently, I developed a leads generation chatbot using Voiceflow. However, I noticed that Voiceflow lacks the ability to differentiate between different types of input, such as names and phone numbers (I can input numbers in place of the name/surname). This caused integration issues. To resolve this, I implemented a solution using Google Apps Script, which worked perfectly. However, it requires manual execution within Google Sheets. I’m aware of triggers like onEdit, onChange, and time triggers.

Realizing that the best approach would be to automate this process within the integration flow, I’m considering adding somehow the “Run” button from the Google Apps Script directly into the Make flow I’ve included (instead of the sleep function, which I used while testing the onEdit trigger. However to make sure it was completed, I added this sleep function). I want to “Run” the function only if in DATA INTEGRITY STATUS (google sheets screenshot) we have TRUE value. That is already set up using Get a cell and than using condition to check if the value is TRUE. I ONLY need to somehow “Run” the Google Apps Script. I’ve attached screenshots for reference.

If you have other solution to my problem, also feel free to share :slight_smile:

Thanks for your assistance. Adam



Welcome to the Make community!

Make doesn’t have an integration for this third-party service (Google Apps Script).

If the external service has a Developer API Reference/Documentation then you should be able to integrate the endpoints in Make using the generic HTTP “Make an OAuth 2.0 request” module.

You can also suggest for it to be made in the Idea exchange. Don’t forget to search for it first, just in case someone already suggested it, so that you don’t end up creating a duplicate.
Screenshot_2024-01-17_130153

If you need assistance in setting up the generic HTTP module, please provide additional information about what you have tried with regards to the external service’s Developer API Reference – how you are setting the connection up, a link to the endpoint are you trying to connect to, and what errors you are encountering.

2 Likes

Hello, thank you for getting back to me. As someone new to integrations, I’d really appreciate your honest opinion on the idea I’ve outlined here. Do you think it’s too advanced or perhaps not a good idea? It’s the best idea I’ve come up with so far.

Alternatively, I’m considering sticking with the onEdit trigger in Google Apps Script, which would be activated when leads data is inputted into Google Sheets via the make integration. Additionally, incorporating a sleep function to ensure the process completes within 60 seconds just for sure process ended. Can you suggest a better approach, if you see one?

If you’re keen to go down the OAuth 2.0 route, here are some additional instructions:

1. Enable the API

Direct Link: Google Cloud console

2. Insert all the known Google Redirect URIs for your app

Direct Link: https://console.cloud.google.com/apis/credentials

How to create an OAuth app in GCP: https://www.make.com/en/help/tutorials/calling-google-apis-via-the--http-make-a-oauth-2-0-request--module ← FOLLOW THIS

Here are all the known redirect URIs you need for your Google Cloud Console OAuth app. If you set these up, you can reuse the same GCP app for other Google apps and modules on Make.

https://www.make.com/oauth/cb/oauth2
https://www.make.com/oauth/cb/google-custom
https://www.make.com/oauth/cb/google-restricted
https://www.make.com/oauth/cb/google-cloud-speech
https://www.integromat.com/oauth/cb/oauth2
https://www.integromat.com/oauth/cb/google-custom
https://www.integromat.com/oauth/cb/google-restricted
https://www.integromat.com/oauth/cb/google-cloud-speech

Once you’ve set these up, you can use/reuse the same Make connection for all the supported Google apps & modules on Make - you’ll only have to enable the respective APIs for your custom app in Google Cloud.

3. Publish your GCP OAuth2 app

Direct Link: https://console.cloud.google.com/apis/credentials/consent

You might need to set your OAuth application to “Production”, otherwise the credentials expire very frequently.

1. To do this, go to menu item “OAuth consent screen”

or click here https://console.cloud.google.com/apis/credentials/consent

2. Then click the button below if the Publishing status is not “In production”

4. Configure the HTTP OAuth2 module

You need a “Authorize parameters” key of redirect_uri with the above Make OAuth2 callback URL.

You can find the Client ID and Client Secret in the OAuth2 app you created in GCP, on the right-hand side of where you inserted the 8 callback URLs in step 2:

The above example is for indexing API, amend to your choice of Google API as necessary.

2 Likes