
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2022 02:55 PM
I’m trying to set a Collaborator field to the current user when they change the status of a row.
It seems automations do not know who the current user is… :thinking: :confused:
So I read about a workaround where you use the session object in a scripting step to set the current user to a variable and pull that out a step later.
output.set(‘current_username’, ${session.currentUser.name}
);
Thing is… I keep getting
ReferenceError: session is not defined
So… obviously I’m missing something, chasing a solution that is not possible, or just don’t understand how scripts work.
Any help?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2022 03:56 PM
You cannot get the current user directly in an automation script. You can only the the current user from the session object if you are in Scripting app.
You could use a last modified by field to tell you the user, and then get the user from that field.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2022 04:09 PM
Thank you.
The Last Modified By is what I ended up doing after I looked around some more.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 09, 2023 06:40 AM
In my case, I have a record being created / updated by an automation and the "Created by" /"Last modified by" fields are set to an "automations" user. How can it not be possible to have access to the user who clicked the button on the interface?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 25, 2023 04:57 PM
Same issue here. Want my automation button to create the row with the actual user. Or be able to pass the user into another custom field.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 09, 2023 10:23 AM
Did anyone ever solve this issue? I need to do the same thing.
