Event of onEdit() for Google spreadsheet

About Event Objects

For example, it thinks the situation of input text of ‘test’ to ‘A1’ on a sheet.

When you use only ‘onEdit(e)’ without an installing trigger, ‘e’ has following parameters.

{authMode=LIMITED, range=Range, source=Spreadsheet, user=, value=test}

In this case, the event cannot send an e-mail because of ‘authMode=LIMITED’.

When you use “onEdit(e)” with an installing trigger of “Edit”, ‘e’ has following parameters.

{authMode=FULL, range=Range, source=Spreadsheet, value=test, triggerUid=#####}

In this case, the event can send an e-mail because of ‘authMode=FULL’.

‘range’ and ‘source’ are the coordinate and spreadsheet of the edited cell, respectively. They can confirm using ‘e.range.getA1Notation()’ and ‘getId()’, respectively.

About [Ljava.lang.Object;

About “Form submit event” of GAS with spreadsheet, e.values and e.namedValues have “[Ljava.lang.Object;“. Using “JSON.Stringify()” like “JSON.stringify(e.values)”, “JSON.stringify(e.namedValues)”, values from “[Ljava.lang.Object;” can be retrieved.

Reference

You can see the detailed information of sheet events from here.