I have created a trigger in appsheet using the following code:
function createTrigger() {
ScriptApp.newTrigger(โsendWhatsappToClientโ)
.forSpreadsheet(ss)
.onFormSubmit()
.create();
// Toast notification.
SpreadsheetApp.getActiveSpreadsheet().toast(โTriggerโs added.โ, โNotificationโ, 5);
}
The trigger is being created but when a new row is added in sheet using appsheet, then the function โsendWhatsappToClientโ is not runningโฆ
However when it is added through Google form,it is running perfectlyโฆ
onEdit triggers do not fire when data is edited and synced to the spreadsheet via AppSheet.
I went thought these files, but on edit trigger runs if anything in sheets is modified. I want to run a trigger only when a new row is added through appsheet, but couldnโt find a solution anywhere. Itโll be great if I can get some help on using webhooks through which only a part of code is run with the event object attached to it.
Hereโs a similar use case to yours that you could refer to:
Read the AppSheet help docs for how to pass JSON to the webhook.
@Kaushal_Didwania1
Instead of onEdit(e), you need to use onChange(e) installable trigger to get what you want.
User | Count |
---|---|
43 | |
27 | |
24 | |
22 | |
13 |