We want an Action that changes a text value, ...

We want an Action that changes a text value, to also trigger a Google Apps Script to run.

The script is setup to run ‘on edit’. And this works if we edit the text value manually in the spreadsheet. But if the value is changed by AppSheet, then an the scripts is not being triggered to run.

Any ideas on why this is happening and what we can do? Thanks!

0 5 564
5 REPLIES 5

It’s not my “homeland” but you can trigger the script with the workflow/webhook. When you use the workflow for that purpose, you can trigger that in many different ways and you can pass values with the JSON Body.

Harry2
New Member

@Tom_Graham Hi Tom, when using Google scripts with AppSheet, it’s important to note that there’s a restriction in the Google API that prevents changes made via the API from triggering Google scripts. This means that changes made to the spreadsheet via AppSheet will not trigger your scripts.

As such, your best bet would be to use @Aleksi_Alkio’s approach, which is to trigger the script using a webhook.

@Harry onChange(e) trigger works with AppSheet. However onOpen(e) and onEdit(e) triggers will not work. I have many apps using onChange(e) triggering. FYI.

Harry2
New Member

@Levent_KULACOGLU Thanks Levent for pointing that out.

@Tom_Graham you should be enclosing your code within an onChange(e) trigger. onEdit(e) trigger will not work with AppSheet.

Top Labels in this Space