# Apps script in glide

**URL:** <https://community.glideapps.com/t/apps-script-in-glide/43825>\
**Category:** Ask for Help\
**Created:** [July 3, 2022, 12:17am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825 "2022-07-03T00:17:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DillanMartinez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dillanmartinez/32/46254_2.png) [@DillanMartinez](https://community.glideapps.com/u/DillanMartinez)\
**Post date:** [July 3, 2022, 12:17am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/1 "2022-07-03T00:17:08Z")

</div>

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. 😔

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 3, 2022, 12:17am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/2 "2022-07-03T00:17:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DillanMartinez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dillanmartinez/32/46254_2.png) [@DillanMartinez](https://community.glideapps.com/u/DillanMartinez)\
**Post date:** [July 3, 2022, 12:19am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/3 "2022-07-03T00:19:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 3, 2022, 12:22am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/4 "2022-07-03T00:22:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![DillanMartinez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dillanmartinez/32/46254_2.png) [@DillanMartinez](https://community.glideapps.com/u/DillanMartinez)\
**Post date:** [July 3, 2022, 12:24am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/5 "2022-07-03T00:24:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 3, 2022, 12:26am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/6 "2022-07-03T00:26:48Z")

</div>

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.

> **[Send an email for every row in a Google Sheet](https://spreadsheet.dev/send-an-email-for-every-row-in-a-google-sheet)**
>
> This tutorial will teach you how to send an email for every row in a Google Sheet.

---

<div class="post-metadata">

**Author:** ![DillanMartinez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dillanmartinez/32/46254_2.png) [@DillanMartinez](https://community.glideapps.com/u/DillanMartinez)\
**Post date:** [July 3, 2022, 12:30am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/7 "2022-07-03T00:30:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 3, 2022, 12:31am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/8 "2022-07-03T00:31:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![11183](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/11183/32/29797_2.png) [@11183](https://community.glideapps.com/u/11183)\
**Post date:** [July 3, 2022, 5:55pm UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/9 "2022-07-03T17:55:35Z")

</div>

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)))

---

<div class="post-metadata">

**Author:** ![Leonfort2](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Leonfort2](https://community.glideapps.com/u/Leonfort2)\
**Post date:** [November 4, 2022, 12:35pm UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/10 "2022-11-04T12:35:28Z")

</div>

hello  
i think my problem is very simple and i post this requete many time, but I have no response.  
Maybe, you help me, I try to explain simply  
My script is very simple and I use myself with google shett

function getStudents(parameter) {  
instructions to modify list of row, not all only one filtered list  
};

I would automatize this by an Glide Action that allows to launch an external script with a button lik this ?  
I don’t know how to do

thanks a lot

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 5, 2022, 12:53am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/11 "2022-11-05T00:53:22Z")

</div>

> [@How update a list of rows](https://community.glideapps.com/t/how-update-a-list-of-rows/50434/21):
>
> Can you trigger a Google Apps Macro in the same way as you would trigger a Google Apps Script? If it’s the case, I think you can set the script to run every time a specific change is made in a Sheet.

> <https://stackoverflow.com/questions/71514452/trigger-when-change-is-happening-in-specific-sheet>

---

<div class="post-metadata">

**Author:** ![Leonfort2](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Leonfort2](https://community.glideapps.com/u/Leonfort2)\
**Post date:** [November 5, 2022, 11:40am UTC](https://community.glideapps.com/t/apps-script-in-glide/43825/12 "2022-11-05T11:40:08Z")

</div>

Thanks ThinhDinh  
I was looking in the community and this answer appears on another site.  
By studying Stackoverflow’s proposal, I understood that it’s very simple, no need for any triggers onChange or others  
In summary :  
I have a parameter to pass: the name of the association and the run will be on the association received.  
Via Glide, I write in a cell the name of the association I want modify  
The script runs if the cell is not empty and therefore filled with the name of the association  
The execution will only be done on this association.  
At the end of the script I erase the contents of this cell.  
So I wouldn’t need Onchange.  
I did a little test, this run how I hope. Now I have to do to integrate it into Glide

PS: My difficulty and my silly questions come from the fact that I have reflexes of an old programmer, I have to get used to thinking about Javascript and Glide

Thanks also to Jeff, Darren for their help
