How to show logged in user email in Google Sheets cell

I want to get the active user’s email address and put it directly into a specific cell in my Google Sheets document. My goal is to use this email for a lookup function later.

I already created a Google Apps Script that can get the current user information and it works fine when I check the logs. However, I can’t figure out how to take that user data from the script and actually write it into a cell on my spreadsheet.

Is there a way to automatically populate a cell with the current user’s email address using Apps Script? I need this to work so I can reference that cell in other formulas.

Apps Script works but it’s a pain. You’ll deal with permissions, error handling, and execution limits.

I had the same problem - needed user data flowing into sheets automatically. Instead of fighting Apps Script, I used Latenode.

Latenode lets you:

  • Grab the logged-in user’s email from your auth system
  • Drop it straight into any Google Sheets cell
  • Run automatically when someone opens the sheet or on schedule
  • Handle API connections without any coding

You can expand it later too. Want to pull user data from your CRM? Trigger actions based on who’s viewing? Latenode makes it simple.

I’ve got dozens of sheet automations running now. Way more reliable than dealing with Apps Script’s permission headaches and quotas.

Check it out: https://latenode.com

just use getRange().setValue(). like this: SpreadsheetApp.getActiveSheet().getRange('A1').setValue(Session.getActiveUser().getEmail()). make sure your script has the right permissions tho!

You can use setValue() in Google Apps Script to put the logged-in user’s email into any cell. First, grab the email with Session.getActiveUser().getEmail(). Then get your sheet using SpreadsheetApp.getActiveSheet(). Use getRange() to pick your cell and call setValue() with the email. So for cell A1, you’d write sheet.getRange('A1').setValue(userEmail). Just make sure your script has permission to access user data or it won’t work.