# 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:** 2

<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, 4:16am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/21 "2022-01-08T04:16:34Z")

</div>

> [@Rogelio](#):
>
> Is there any other way to manually trigger the prompt to approve permissions?

[https://myaccount.google.com/permissions](https://myaccount.google.com/permissions) - try that. You can revoke the existing permissions through there, and then if you run it manually you should be prompted to approve it again.

---

<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, 4:16am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/22 "2022-01-08T04:16:55Z")

</div>

change the failure settings to notify immediately… maybe it will tell you whats going on

---

<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, 4:30am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/23 "2022-01-08T04:30:01Z")

</div>

I remember one time I duplicated my script so there were 2 functions with the same name, and it give me some trouble… maybe that’s the case?

---

<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:37am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/24 "2022-01-08T04:37:15Z")

</div>

so i revoked permissions, manually ran then prompted me to approve permissions again.

but script is still not been triggered by a sheet change ☹

starting to think it may be a google-side issue perhaps

---

<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:37am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/25 "2022-01-08T04:37:36Z")

</div>

checked all my function names and there’s no duplicates

---

<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, 4:41am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/26 "2022-01-08T04:41:11Z")

</div>

ugh 😒

I’m running out of ideas.  
Maybe one more thing to try… make a copy of the sheet, then attach the copied sheet to your Glide app (ie. replace existing sheet). Grasping at straws here, but that might be worth a shot…

---

<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:44am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/27 "2022-01-08T04:44:08Z")

</div>

I’m a little nervous doing that, this is a prod app with 2.5k+ users and processing a considerable amount of sales/revenue, I don’t what to completely break it ☹

---

<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, 4:45am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/28 "2022-01-08T04:45:02Z")

</div>

You could try it with a copy of the app first.

---

<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, 4:45am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/29 "2022-01-08T04:45:09Z")

</div>

oh, maybe you run out of quotas for that script… any API there?

---

<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:59am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/30 "2022-01-08T04:59:04Z")

</div>

The issue is that there’s not even an execution entry when the sheet is changed as is supposed to…

The last working execution based on a sheet changed (Type = Trigger) highlighted below was approx 2 hours ago, the other entries (Type = Editor) after that have been manually executed trying to debug.

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

I do have connected APIs everywhere including Google-services but its connected to a paid account so no quota issues that I can think of.

---

<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, 5:00am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/31 "2022-01-08T05:00:27Z")

</div>

I copied the app attached to the same sheet, made updates to the sheet via the app but still doesn’t trigger an execution.

---

<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, 5:02am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/32 "2022-01-08T05:02:28Z")

</div>

if you have a paid account, just contact google support… they answer right away

---

<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, 5:03am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/33 "2022-01-08T05:03:45Z")

</div>

> [@Rogelio](#):
>
> I copied the app attached to the same sheet, made updates to the sheet via the app but still doesn’t trigger an execution.

My suggestion was to also try copying the sheet… then see if it triggers with the copied sheet. You’d need to run it manually once first.

---

<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, 5:12am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/34 "2022-01-08T05:12:46Z")

</div>

soo copying the app and sheet works! very strange!

would you then suggest to attach the copied sheet to my prod app?

---

<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, 5:14am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/35 "2022-01-08T05:14:14Z")

</div>

> [@Rogelio](#):
>
> would you then suggest to attach the copied sheet to my prod app?

> [@Darren\_Murphy](#):
>
> make a copy of the sheet, then attach the copied sheet to your Glide app (ie. replace existing sheet).

Yes 🙂

I can’t explain what happened, but it does sound like something “broke” in the original 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, 5:18am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/36 "2022-01-08T05:18:36Z")

</div>

Before I hit “replace” what’s the back-out plan? is there any other risks that any other features in the app will not work?

just s little nervous 🙂

---

<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, 5:22am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/37 "2022-01-08T05:22:18Z")

</div>

As long as you’ve not made any structural changes to the copied sheet, I think you should be pretty safe. I’ve done this before, and seen others do it, and I think it’s pretty reliable.

I assume you now have a working backup copy of the app? That would be your fallback - if it all goes pear shaped, you should be able to promote that backup to be your new production app.

---

<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, 5:31am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/38 "2022-01-08T05:31:09Z")

</div>

ok - so I hit replace, tested it on my installed app on my phone and all seems to be working fine and back to normal.

I can now see the executions being triggered from the sheet (type = Trigger) in the log execution logs.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/c/8c8fe35787fcb4d17b6669be188797e1ee7af2ab.png)

this is the first time i encounter this type of issue - thanks soo much for your help!

---

<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, 5:34am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/39 "2022-01-08T05:34:56Z")

</div>

Excellent!

Glad you got it working, and happy to help. Still a bit of a mystery as to what went wrong though. Would be nice to know…

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 9, 2022, 5:35am UTC](https://community.glideapps.com/t/google-appscript-not-executing-after-an-on-change-to-sheet/36837/40 "2022-01-09T05:35:04Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

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