Inbound Email Action: Parse Data From Table in Email to Create Multiple Incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 06:29 AM
We have a project where ServiceNow will be receiving an inbound email, and needs to create Incidents off of it. The information needed to create the Incidents is found in an HTML table in the email. I have found other threads discussing similar issues, but this one appears to be a bit different than those ones I found.
In all the other ones I found, the field name was in the first column of the table, and the value was in the second column. My table is structured differently. It has field name in the first row of the table, then data runs under it. So it will look something like this:
So, there will always be at least one row of data, but there could be more.
From this, I need to create an Incident for each separate data row. So, from the example I above, I would need to create 3 separate Incidents, one for each data row.
How can I do this?
How can I parse my data table in the inbound email action, and create an Incident for each row (using the values/details from each row)?
So, my end result would be three separate Incidents. The Short Description of these Incidents would look like:
Incident 1: "Site Expiration Notice for abc.com"
Incident 2: "Site Expiration Notice for lmn.com"
Incident 3: "Site Expiration Notice for xyz.com"
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 12:31 PM
I am not sure that code works within the Inbound Email Action.
Were you actually able to get this code to work yourself?
I am trying to figure out if I am doing something wrong, or the code won't work in an Inbound Email Action. I really don't want to waste any more time on something that will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 12:32 PM
Still looking for a workable solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 06:33 AM
No need to worry about this anymore. I went another route, and converted all the HTML to text, and parsed that to get what I need.