How to Get the Current User’s Info in a Coda Pack (Name, Email, etc.)

Let’s say we have a pack which exposes a button. The user clicks the button which does something. How to get the information of the user who clicked this button? Not the pack authentication, but their name/email etc on Coda.

Is it even possible to do this?

hi, you can use RunAction and User()

RunAction(addrow(DB log, log, User() + “ action btn X “) , PackAction)

I meant inside the pack. Does the @codahq/packs-sdk expose a method to get the user information?

Does the @codahq/packs-sdk expose a method to get the user information?

The short answer is no. In general Packs are installed in the doc, and users interface with the doc which in turn calls a Pack formula, etc. Packs can have authentication, requiring the user to sign in with an account, and the Pack can get information about that account. That said, there is no guarantee that the Coda user has the same email as the account they’ve connected to the Pack.

Can you provide some more context as to why you want user information?