Documentation for the Session object in NocoDB Scripts
The session object provides information about the current user who is executing the script. It allows you to access contextual information about the user's identity and permissions.
Overview
The session object is available in every NocoDB script and provides a way to:
- Access the current user's information (ID, name, email)
Properties
| Property | Type | Description |
|---|---|---|
currentUser | Collaborator | A Collaborator object representing the current user running the script (read-only) |
Usage Examples
Getting Current User Information
// Access the current user information
const currentUser = session.currentUser;
output.markdown('# Current User Information');
output.text(`ID: ${currentUser.id}`);
output.text(`Name: ${currentUser.name || 'No name set'}`);
output.text(`Email: ${currentUser.email}`);
Related
Related pages
- Base : Documentation for the base object in NocoDB Scripts
- Cursor : Documentation for the Cursor object in NocoDB Scripts
- Table : Documentation for the Table object in NocoDB Scripts
- View : Documentation for the View object in NocoDB Scripts
- Field : Documentation for the Field object and Field Types in NocoDB Scripts
- RecordQueryResult : Documentation for the RecordQueryResult object in NocoDB Scripts
- Record : Documentation for the NocoDBRecord object in NocoDB Scripts
- Collaborator : Documentation for the Collaborator object in NocoDB Scripts

