Apps script in glide

Hello, can someone help me, how do I run a script in app script from a glide webhook. I’ve been trying for days until I get to this. :pensive:

Can you describe what exactly your script does? We might be able to have another method to help with that.

The only thing I want to achieve is to send a gmail message when a button is pressed

An alternative for you is to use the Glide webhook to send a payload to Make/Zapier, then send a Gmail message through a new module inside the scenario.

Or are you trying to cut down the cost by using Apps Script?

At this moment I already use Zapier to send emails, however they are not unlimited and I need to send an email every time a user places an order for an ecommerce

So each time a user orders, it will create a new row in your sheet, right?

You can have a trigger that runs every time a row is created in a specific sheet, and trigger the email to be sent.

Thank you very much for this guide, I did not know how efficient it was to write to the community. I have been making apps in glide on a daily basis for 4 months and now I am ready to use scripts, I am happy, thank you very much.

1 Like

Feel free to let us know if you have any other questions! We have a superb community here.

1 Like

You could collect orders in separate spreadsheet to save rows in Glide. Glide’s webhook is basically a POST request to wherever, so we can use doPost(e) function in apps script to receive data from Glide, then process it, append row, send email… And all that with one script project.

And if you want to display orders history to a user in your app, you can achieve this too with another apps script project, attached to the orders spreadsheet and Fetch JSON column + transpose method in Glide.

I could put together a little tutorial if you want (I love apps script and try to adopt it everywhere)))