We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to retrieve user ID from received email in Inbound email action

firemoon
Mega Expert

Hi,

I want to retrieve the user id from sender email address in the inbound email action.

Please post your suggestion.

Regards,
RK

2 REPLIES 2

arpitt
Tera Expert

Hi Ravi,



From the sender email glide the user table and fetch the user ID.



Regards,


Arpit Taneja


BrianD502676804
Kilo Sage

Hi Ravikumar,



When your IEA is run, the system impersonates the user recognized from the sender's address (assuming it is a recognized email address).



Therefore, to get the user's username, just use:



    gs.getUserName()



Or, to get their sys_id, use:



    gs.getUserID()




Thanks,


-Brian