Google Sheets Time Tracking | Using Google AppScript

Productivity Tools

Are you tired of manually tracking the employee’s login time and logout time? Excel Dose brings an easy to use Google AppScript based tool that will help you to track employee’s login time and logout time. This tool has the potential to track the login time and logout time for multiple employees at a same time.


Table of content:

  • Introduction about the tool
  • How to get this tool
  • How to use this tool
  • Conditions & Logics Applied
  • Important pointers
  • Video about this tool
  • About the author

Introduction about the tool:

This tool is created using the Google Sheets & Google AppScript. The tool needs permission to run the script (it is a one time activity).

Google Sheets Time Tracking

How to get this tool:

  1. Open this “Google Sheets
  2. “Make a copy” of the sheet

Google Sheets Time Tracking

3. Once you make a copy of the sheet, complete code will be copied to your own sheet

4. Your final sheet will look like below screenshot

Google Sheets Time Tracking

How to use this tool:

  1. Enter the Employee ID in Cell A6

2. Enter the Employee Email ID in Cell B6

3. To capture the login time, press “Login” button. The moment user click on the “Login” button, the system’s current time will be captured and it will be entered in Cell C6. (As mentioned below)

4. To capture the logout time, press “Logout” button. The moment user click on the “Logout” button, the system’s current time will be captured and it will be entered in Cell D6. (As mentioned below)

5. Once both login time and logout time is entered in the sheet, then click on the “Submit” button. Once the user clicked on the “Submit” button, all the data will be moved in to the backend sheet.


Conditions & Logics Applied:

  1. If Employee email id is missing in the Cell B6, then “No action” will be performed. So it is mandatory to enter the Employee email ID in Cell B6. With the help of email ID, the login time and logout time will be captured and entered against the same email ID who has pressed the buttons (Login, Logout or Submit)
  2. If user has already entered the “Login” time and by mistakenly clicked on the “Login” button again. Then the script will not allow user to enter the login time again and show below error message.

3. If user has clicked on the “Logout” button before the “Login” button. In that case script will not run and show below error message. It is always important to enter first login time and then logout time.

4. If user has entered only the login time and tried to submit the data. In that case script will not allow user to submit the data and show below error message. It is always important to enter both login time and logout time.


Important Pointers:

  1. User need to grant the permission to run the script
  2. If multiple users are using the same Google Sheets, then every user has to grant the permission to run the script
  3. Once user grant the permission, only their Login time and Logout time will be entered against their email ID

Want to create a custom tool for your organisation? Please write an email to info@exceldose.com


Video about this tool:

We have also created the complete video about this tool, which is available on our YouTube channel. For more educational videos you can subscribe to our official YouTube channel.


About the Author:

Vishal Pooner has over 12+ years of experience in Digital Marketing and automating existing workflow using the Google AppScript. You can follow him on LinkedIn, YouTube, Instagram.

If you need our help to make productivity tools or automate existing workflows for your business. Please write an email to info@exceldose.com

Contact Info

Let's Chat!

Get in touch with us to discuss your needs. Write an email to us at