Inbound Actions - How to retrieve values from multiple rows in a table in the email body

Colleen1
Tera Contributor

We have an inbound action that will create new incident(s) when a specific email is received.  The email is sent regarding disk utilization and will contain the servers that are 95% full.  We need to extract the server name, which is an existing CI in SN, and create an incident for the CI owner. In the example below, I replace our actual server names with 'Server A' and 'Server B'.  I have seen tables where the first column lists the name of the field but ours only has headers so not sure how to process those.

In theory, I would like to be able to parse out the two servers and create an incident for each one.  In future emails, it could have one server or many, so the exact number of rows will be unknown.   I have looked at other community articles but they are able to pull the values from the first column since it is a constant, like email.body.city or something.  If the table was inverted, I could parse on email.body.display_name but it isn't.

Example email body:

'Production Disk Utilization Exceeds 95%' threshold

Description: Average Disk utilization during the past 1 hours exceeds 95%

New Items (2)
Occurred at 8/22/2022 2:37:31 AM

Display Name

Aspect Name

Aspect Value

Server A

G:\

100.0 %

Server B

M:\

100.0 %

----------------------------------

Any assistance would be greatly appreciated.

Thank you,

Colleen 

3 REPLIES 3

Tom Sienkiewicz
Mega Sage

Hi,

assuming you cannot do anything about the way those emails are generated (line using a csv file attachment instead of email body for example), th eonly thing I can think of is some clever RegExing or text parsing.

If you know the exact structure of your email body, you could for example split the body into individual lines, let's say you know Server names are always the first part of the line, followed by a tab, and they are always in the next line after the one starting with "Display Name". You could then try to process the subsequent lines, until you hit another "landmark".

Perhaps another way to do it is if that email body has some nice HTML tags underneath. It this is a HTML table, you could access the html body of the email and do some parsing based on the specific HTML classes or IDs.

Abhi95
Mega Expert

Hi,
Do you find any solution for the above requirement ?

jyotsna_madhu3
Tera Contributor

Hello @Colleen1,

Did you find the solution for the above  requirement.Please let us know the solution.

 

Regards,

Jyotsna.