Updated: Mar 29, 2019
Let us look how to integrate Azure Function, Cognitive services into Microsoft Flow for extracting tags/categories and update the SharePoint document item.
This article series helps us to work on a special use case of extracting information of word documents uploaded to Office 365 SharePoint libraries and then analyze/classify the document content using Azure Cognitive Services. Then update the document with classified data as tags/categories. The article links are shown below.
Using Azure Functions, Cognitive Services and Flow for classifying Office 365 SharePoint Word Documents - Part I (Previous Article) - Azure function is briefly explained with code to understand how the data is being extracted using open XML formats/references available.
Extract Code From Github
The Azure function created in the previous article is available on Github repository (https://github.com/nakkeerann/analyze-sp-word-documents).
Clone the code from the github repository to the local.
Open in visual studio and make necessary changes, like updating user credentials and SharePoint site and details.
Test Code Locally
Run the solution to test the solution on localhost by pressing F5. The solution can be tested locally using localhost path. http://localhost:7071/api/readspdocuments?filePath=https://nakkeerann.sharepoint.com/sites/teamsite/Shared Documents/testingflow.docx
Creating Azure Function
Let us first look at deploying the azure function with the necessary code we have created in the previous article.
Login to Azure Portal.
Click on new resource and find for function App. Then create a new Azure Function.