Is there any way to get the date and time a user was last online?

Is there any way to know the last time a user was online? I would like to ideally have that saved into a table, so from within the app you can views users and the last time they used the app. Eg In a project management app there is a good use case to know when each of the staff members  from a client company were online in the app

im hoping there's a way to do it out of the box, or some way to of it with an api I can hit?

1 6 1,809
6 REPLIES 6

AFAIK, there's no great solution for this and would love to hear from anyone who has a way to accomplish this.

Available adjacent techniques that I've noodled on include:

  • From your AppSheet My account page, you can download to .csv your account's user activity for the last 30 days across all apps. The data includes the last access timestamp for each user. Potentially, it's possible to create some sort of RPA routine that does that automatically on a regular schedule and then populates a spreadsheet table connected to your app.
  • If you have an Enterprise subscription plan and use the Team features, it's apparently possible to Manage and monitor your team using the API - AppSheet Help.
  • You can capture a timestamp whenever a row is edited (including making that conditional--e.g., conceptually something like if USERMAIL() = Current User[Email], then UTCNOW() else [_THIS], although maybe it's just USERMAIL() = Current User[Email] in Reset on edit or just a Change type column). So, for example, you could theoretically use features like security filters, view conditions, go-to-app-view actions, or even just user instructions to create some sort of user flow that forces (or, at least, guides) users to periodically edit a record for the purpose of capturing a timestamp. For instance, don't show any views or data unless a [Last check-in] timestamp in the current user's row in the Users table is within the last 24 hours. Then, have a view that does show whose only purpose is for users with an expired check-in to select an action button that updates their [Last check-in] timestamp.


@dbaum wrote:

 

 


FYI, this indeed works: Reference User's Last Access Timestamp

It works if you can manage to get an enterprise account ๐Ÿ˜‚

im still waiting for anyone to come back to me... ive been in touch with support@appsheet, google support, a local google partner support company, and still none of them have been able to get me details when they all keep saying they will come back to be before the end of the day. so frustrating and seems im not the only one having issues getting info and signing up to enterprise. 

Steve
Platinum 5
Platinum 5

Because apps can be used offline, "online" doesn't provide an accurate picture of hen the user is using the app.

I found there is an account usage screen, and when I download the csv file it shows last online, so the data is there im wondering if there is a way to access that via api or something. thats the exact info im after, it exists, I just can't see how to get that into a spreadsheet without manually going to that site, downloading the file and manually copying in the values.

That's what I referenced in the first bullet of my previous reply.

Consider upvoting Make account User Activity data available to apps - Google Cloud Community

Top Labels in this Space