Extract values from attachments and create records in Custom table

Sapz
Tera Contributor

Hi All,

We have an requirement from our team to create records in custom table. Vendors would like to create tickets in SNOW who do not have access to the portal, hence we proposed creation of records through email. However they would like to attachments as well. 

They would like to submit the all the fields of the form in the excel which needs to be extracted and created a record in custom table. Could you please provide any suggestions on how to extract the values in the excel and create records in custom tables with appropriate field values.

 

Eg: Custom Table Name - Legal Documents

Fields- Name, Customer, Location, Area etc.

 

7 REPLIES 7

RAHUL Khanna1
Mega Guru

Probably what you can do is 

1) Crreate a Inbound Email ACtion 

---By Using Excel Parser API , you can extract the value from the excel

--then map the same in the custom table.....

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Couple of approaches

1) Inbound email action + Data Source (Transform Map, field map)

You can have inbound email action for this which would copy the attachment to a data source already created.

You will have to write the transform map, field maps etc prior to this.

Once the attachment is added on the data source you can trigger the transform map from script

Sharing one blog for help which can get you started:

Data load and transform via Catalog Item

2) Parse the excel or CSV and read the records 1 by 1 and create in target table

Sharing links for excel and csv parser

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/sn_impex-namespace/GlideExcel...

https://finite-partners.com/using-glideexcelparser-for-bulk-ordering-of-assets/

CSV Parser

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar Can you help me to understand which will be the best approach 1st or 2nd as per performance?

Sapz
Tera Contributor

Thank you Ankur and Rahul, I will try the solution provided and will reach out to you if I need some help. Thanks once again.