Hi Sameer,
I believe when the onEdit trigger fires, the email address is either:
- Email address (if you're the owner of the spreadsheet)
- Blank (in all other cases)
In my testing, the missing email is not just an issue due to strict policy, it occurs in all cases unless the user is the owner of the spreadsheet. Google Apps Script allows you to get a person's email if they perform an obvious action - like clicking a button that runs a macro, but not if it is a non-obvious action - like opening a sheet or editing a cell
----
There is a second problem: the onEdit event receives incomplete information about what changes the user made. For example if they delete a row - the event doesn't fire. If they or copy/paste a range of data, the event fires but doesn't receive the data
----
Your workarounds depend on exactly what info you want to capture. If it is a form submission, there are plenty of options (like Google Forms) that post into a sheet.
If you're looking at tracking free-edits to a sheet, I can't see how to do that reliably.
Ed