Create Incident when Mail is received and push mail details in Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 12:18 PM
Hello All,
A tool is sending mail (EML extension file) which has details of the ticket as shown in Image1.
My task is:
1. To create an incident as soon as the mail is received.
2. To put the hostname and description content from Mail to Incident's CI Name and description field.
The catch here is that I do not have admin access to production. I will be implementing the logic on the dev instance with admin access. So, I would also need to find a way to upload and trigger the mail (EML) file on the dev instance and later I can use the provided script.
Thanks,
Swapnil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 02:48 PM
Hi, when you state upload eml file, is the message sent to the ServiceNow instance via email (smtp) or are you importing EML files directly and then wanting to process them?
Note: EML is a vendor specific format used to store email messages and it is not the EML file that is sent to the ServiceNow instance via email.
If you want to test email processing in sub-production and the received\test message is in your production instance, then you will need the assistance of a production admin user as they will need to export the received sys_email message to xml. you can then import the xml file to your sub-prod environment drill into the record and 'reprocess' it as often as you would like. Each reprocess will follow the BAU process, checking the received email against your inbound actions and running any inbound action that matches.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 04:22 AM - edited 11-10-2023 03:16 AM
Hello Tony,
Thanks for your response.
When I talk about the EML file, it is the file that I get to see when I click on preview mail in email logs. Yes, the file is sent to ServiceNow via email (SMTP). I have exported the XML (sys_email) from production with the help of the admin user and imported it back to the dev instance to test it after the script runs, PFA of XML. Now, I need a script that can fetch the data (Description and Host Name) from XML, create a new INC (say INC1) as soon as Mail XML is received in dev and push the data from XML to INC1 (Description and CI Name).
Thanks,
Swapnil.