How can i parse Excel file attached with an email?

Ankit Kumar6
Tera Contributor

Dear Folks,

I have a requirement like if user reply on an email and attached an excel file then how can i parse that excel file and update a record on a table in servicenow.

Please help me how can i do this.

Thanks

Ankit

1 REPLY 1

ChrisBurks
Mega Sage

When an attachment comes in from an inbound email it creates an EMail attachment record on this table: sys_email_attachment.

sys_email_attachment_record.png

 

With this information you can use the following API found at the link below to parse the Excel attachment file

https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server/sn_impex/GlideExcelParse...

 

Examples are given there on how to use it. You can possibly create the script in the inbound action or in a business rule on the sys_email_attachment table configured to execute with your requirements.