Pull phone numbers from Email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I turned on 'automatically create users for incoming emails from trusted domain'. Is it possible to pull phone numbers, if phone numbers are associated with the email information?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
it creates user with minimal information so phone number not possible to populate.
you can use custom logic in inbound action to grab phone.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
This runs and created user when an email is sent from any user from trusted domain and user is not present in sys_user table.
It will not fetch any other information. (apart from name and email). For fetching any other information, you need integration with AD of your org.
More details in : https://www.servicenow.com/docs/bundle/zurich-platform-administration/page/administer/notification/t...
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
45m ago
User is created with limited fields and do not have option to amend phone number details during the user creation process. I would recommend to carefully consider the scenario if you want to allow automatic user creation as email_id is not always the coalesce field used for sys_user table and there could be duplicate users created by this method.
Since you can allow guest user for processing inbound email actions, creating users automatically via this method is not recommended and not mandatory. You can create a dashboard or report to monitor this gap and identify why users do not exist in sys_user table and remediate it.
As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
21m ago
Hi @athavichith ,
In your inbound email action, use a script in the Script field That reads email.body_text (or email.body) and uses a regular expression to find the phone number. Example:
var phoneMatch = email.body_text.match(/Phone:\s*([\d\-\(\)\s]+)/i);
if (phoneMatch && phoneMatch[1]) {
var phone = phoneMatch[1].trim();
current.phone_number = phone; // phone_number is a field created
}
After extracting the phone number, link it to the user record (if the user is created or exists). You might query sys_user by email (using email.from) to get the user’s record and set their phone field, or set a custom field on the incident/request/etc....
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/