1

I am attempting to develop a solution to provide the following functionality:

  • When an email file (.msg) is uploaded to a SharePoint Online folder configured for emails, the email metadata (to, from, subject, etc.) is automatically extracted and saved into corresponding columns.

There are third-party products for this, but if possible my client wants to avoid the ongoing costs and implement their own solution.

My question is: would it be feasible to do this with a client-side Javascript add-in created with the SharePoint Framework?

The theory is if the script included an email parser* to extract metadata from the email header, then this could be saved into columns via a CRUD operation provided by SPFx. This would be fired via an eventlistener or Workflow attached to the folder that the emails are uploaded to.

Before I go too far down the SPFx road, could someone please confirm if this is a realistic approach?

(*such as this one: https://github.com/ykarpovich/msg.reader)

1

This is an interesting situation :)

I reckon you can use a combination of Microsoft Flow (triggered when a new item is uploaded) + Azure Function (A call from Flow to execute an azure function that would call a powershell script) + Powershell script (Run a powershell script to extract the msg file details) => update back the SP site with the extracted details.

The Azure function is the stapler here, since I am not aware of a direct possibility to execute a PS script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.