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 | |
28 | |
24 | |
24 | |
13 |