Inbound Action using Flow Designer

tomjuk26
Tera Contributor

Hi,

I am looking to create a Flow Designer item where it creates an Incident based on matching the subject text.

I would also like to have the functionality for the Flow to search through the body of the email and then populate the Configuration item field.

This is what the inbound email looks like:

System Alert: The backup job failed

Device: abc123.domain.local

Environment: Production

Is it also possible for it to default to a type of cmdb class? E.g. If I have two cmdb_ci objects with the same name, can I default to population of the cmdb field to a windows server ci?

Any help is much appreciated.

Thanks

 

1 REPLY 1

Tom Sienkiewicz
Mega Sage

Hi, yes you can do that. Ideally, you would want to use the IRE api when inserting anything into your CMDB:

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_cmdb-namespace/Identifica...

You need to evaluate though if the detail coming from the email is enough to properly identify that CI. IF that's a name or a serial number, chances are high.

The first step would be to use a RegEx to extract the name from the email body. Something along the lines of:

/(?<=Device: )([[a-zA-Z\d\.\_]+)$/gm

Adjust that RegEx to your needs depending on the format of the name etc. You can use a script action or even an inline script of a Flow Designer action to achieve the above.