# Google AppScript not executing after an 'On Change' to sheet

**URL:** <https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837>\
**Category:** Ask for Help\
**Created:** [January 8, 2022, 2:18am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837 "2022-01-08T02:18:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 2:18am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/1 "2022-01-08T02:18:44Z")

</div>

Anyone else experiencing the same with their google AppScripts?

I have an ‘On Change’ trigger on my sheet, but it doesn’t trigger the execution of my scripts, the last execution was 40mins with no errors.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 2:39am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/2 "2022-01-08T02:39:12Z")

</div>

Do you mean that changes to the sheet initiated by Glide are not causing the trigger to fire?

I just did a test, and it seems to be working as expected.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 8, 2022, 2:41am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/3 "2022-01-08T02:41:20Z")

</div>

it was working before, and now is not without changing anything? or is it a new script and trigger?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 2:48am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/4 "2022-01-08T02:48:11Z")

</div>

yes thats correct, a change to my sheet via Glide should trigger my appscript but its not.

I just tested it again and nothing is being triggered, I have made no changes to my scripts or triggers.

is your trigger event type set to ‘On Change’ or ‘On Edit’?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 2:48am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/5 "2022-01-08T02:48:26Z")

</div>

it was working fine about an hour ago and since stopped working

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 2:50am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/6 "2022-01-08T02:50:25Z")

</div>

So when you look in the execution log, you see nothing?

 ![Screen Shot 2022-01-08 at 10.49.47 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/9/b97c600afac181bb95bde99b739cbdf4e41017ec.png)

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 2:54am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/7 "2022-01-08T02:54:56Z")

</div>

I see this, the last execution approx an hour ago my time.

I then make a change to my sheet, and no new executions are listed.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41c3b178180d539f2da6361a35185ca170a61d0f.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 2:58am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/8 "2022-01-08T02:58:57Z")

</div>

That’s odd. As I said, mine are working as expected. Are you seeing the changes in the sheet coming through from Glide?  
The only thing I could suggest would be to create another (very simple) trigger as a test case, and see what happens. eg. Something like:

```auto
function onchange() {
  console.log("I'm alive!");
}

```

Also, perhaps check that your onChange trigger is still there and correctly configured?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 3:05am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/9 "2022-01-08T03:05:49Z")

</div>

yeah very strange…

I created a test function as you suggested, manually triggered via the editor as you can see on the screenshot, updated my Trigger settings and still not being triggered via a sheet edit.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/6/f6322c19179d3a24980b6aa87a49e40fe033ed12.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57b39ec5dec601ff83238221cb55bd41bb01bae6.png)

how can I check to see if changes from my sheet are coming through?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 3:06am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/10 "2022-01-08T03:06:59Z")

</div>

> [@Rogelio](#):
>
> how can I check to see if changes from my sheet are coming through?

What I meant was, if you make a change in Glide, do you see the change reflected in the Google Sheet?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 3:11am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/11 "2022-01-08T03:11:21Z")

</div>

ah, yes i see those changes coming through from glide.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 3:12am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/12 "2022-01-08T03:12:21Z")

</div>

I know this is an obvious question, but just trying to eliminate all possibilities… the trigger is still there, yes?

 ![Screen Shot 2022-01-08 at 11.11.05 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/6/86d2e085e5bf6653d51443d5af8dcb5fdd538537.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 8, 2022, 3:13am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/13 "2022-01-08T03:13:32Z")

</div>

o you have any conditions for that trigger in the script?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 3:27am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/14 "2022-01-08T03:27:54Z")

</div>

No, this is the first line of my trigger function, i’m not seeing the debug line get written, nor there is an execution of the trigger in the logs.

```auto
function CELLARDWELLER_TRIGGER(e) {

  console.log('changeType: ', e.changeType);
  ....

}

```

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 3:29am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/15 "2022-01-08T03:29:40Z")

</div>

yeah i do…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b6230bd39fa6714248feabf96cf4d924f0c38574.jpeg)

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 3:37am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/16 "2022-01-08T03:37:58Z")

</div>

do you know how to re-trigger an authorization to allow the sheet to execute the scripts?

I have a feeling that it might an authorization issue.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 8, 2022, 3:39am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/17 "2022-01-08T03:39:43Z")

</div>

try to delete the trigger, and add a new one… do you really need that (e) ?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 8, 2022, 3:46am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/18 "2022-01-08T03:46:36Z")

</div>

I’d do as Uzo suggests. Delete it, add it again and then run it manually. If it has insufficient permissions then you should be prompted at that point.

A couple of other things to try that might help isolate the issue:

- Does it work if you manually make a change in the sheet?
- Does the same script work in a different Google Sheet?

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 4:06am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/19 "2022-01-08T04:06:52Z")

</div>

perhaps I don’t need the `(e)` but it was working with it. I use it to check the type of `event` eg; `INSERT_ROW`, `EDIT`, etc then execute based on the value.

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [January 8, 2022, 4:12am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/20 "2022-01-08T04:12:53Z")

</div>

I tested an old glide app with a similar setup, it worked after i ran the script manually and requested me to approve the permissions. A change to the sheet via glide triggers the script fine.

The problem I have with my current app is that I can’t seem to figure out to re-approve the permissions, even after deleting a re-creating the trigger and manually running it, it doesn’t prompt me to approve permissions.

Is there any other way to manually trigger the prompt to approve permissions?

[Next page](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837.md?page=2)
