Automatic user creation from inbound emails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2014 07:06 PM
Hi,
Is there a way to customize how glide.pop3readerjob.create_caller automatically creates users in Service Now.
e.g.
from Edgar Evangelista<edgar.evangelista@xyz.com>
Service now should pick up:
Edgar = First Name
Evangelista = Last Name
Username = edgar.evangelista
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2015 05:13 AM
::raises hand:: ... I too would like to know how to customize this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2017 11:38 AM
You would think there would be some way to customize this by now, granted there are inbound actions available but those still don't quite touch the user records like I would like to see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2017 07:24 AM
Hi Edgar
We have just built an internal tool that does what you are looking for . There is no automated, or easily configurable option for customisation of created users yet, to my knowledge. But this can be done in the following way:
Step 1) Email properties. DISABLE "Automatically create users for incoming emails from trusted domains"
Step 2) Modify the appropriate "Create Task" Inbound Action. And create the users manually with a little script magic.
//See if the users already exists for the inbound mail
var userRecord = new GlideRecord('sys_user');
userRecord.addQuery('email', email.origemail);
userRecord.query();
if(userRecord.next()){
current.caller_id = userRecord.sys_id;
current.opened_by = userRecord.sys_id;
}
else{
// If no users exists, create a new user
var new_user_record = new GlideRecord('sys_user');
new_user_record.initialize();
new_user_record.email = email.origemail;
new_user_record.first_name = email.origemail;
new_user_record.user_name = email.origemail;
var user_created = new_user_record.insert();
if(user_created != ''){
current.caller_id = user_created;
current.opened_by = user_created;
}
}