Sam's Microsoft Dynamics 365 Blog

Tuesday, 8 October 2019

Using Computer Vision Inside Microsoft Flow(AI in Microsoft Flow)

Microsoft has introduced AI services called “Cognitive services”. There are various services categorized by Vision APIs, Speech APIs, Language APIs, and Search APIs which belong to Cognitive Services. These services can be integrated with many platforms very easily. You can find more about Computer Vision https://azure.microsoft.com/en-in/services/cognitive-services/computer-vision/

In this article, I will be demonstrating how to use the Azure Computer Vision with Microsoft Flow.

Here I am using a scenario, An Image is uploaded to SharePoint Document Library, using Azure Cognitive services image content will be converted in text format and sent the text content via email.

So, let’s start step by step.

1. Generate Cognitive Service API Key and URL:-

First, we must generate the API key for Cognitive Service. So, for that

a. Login into the Azure account.
b. Now In the left navigation, click Create a resource.
c. In Azure Marketplace, select AI + Machine Learning and then click Computer Vision.
d. Enter the required details as shown below and click Create.
e. Click on All Resources in the left navigation and then click the newly created computer vision resource.
f. Now Click Keys under Resource Management, copy the Key.

Note: - It might take a few minutes to deploy the resource.


There is another option to generation Cognitive Service API key. We can register a trial through https://azure.microsoft.com/en-in/services/cognitive-services/computer-vision/.



2. Create a Microsoft flow:-

a. Go to https://us.flow.microsoft.com/en-us/
b. Click on My flows and then Click on create from the blank.
c.  Select SharePoint and Select a Trigger “When a file is created in a Folder”.


d. Now Select Site Address and Folder Id. Here I am Selecting the Invoice folder.



e. Add a new step, Select Computer Vision and Select Action “Optical Character Recognition (OCR) to Text”.


f. Now Put Connection Name, Account Key (Generated previously in Azure) and Site URL and click on Create.


g.  Select “Image Content” as Image Source and “File Content” as Image Content.


h. Add a new step, Select Office 365 Outlook and Select Action “Send an email”.


i. Now add recipient of the email in “To”, Put File name as “Subject”, Detected Text as “Body”.

j.  Inside attachments put File name in “Attachments Name” and File Content in “Attachments Content”.

Now let’s test. I have uploaded an Invoice Image to my Invoice Document Library.


Now we can check the content of Image inside flow output.


Also, I have received an email of the Image content of uploaded Invoice Image.



Sources: -
 https://azure.microsoft.com/en-in/services/cognitive-services/
https://azure.microsoft.com/en-in/services/cognitive-services/computer-vision/
https://docs.microsoft.com/en-us/azure/cognitive-services/welcome
https://docs.microsoft.com/en-us/flow/get-started-logic-flow


 Thanks for reading the article. Hope this Article will helpful for you. Cheers!!!

5 comments:

  1. Hello Sam,

    It is wonderful article. Thanks for sharing such useful information.

    ReplyDelete
  2. Writing with style and getting good compliments on the article is quite hard, to be honest.But you've done it so calmly and with so cool feeling and you've nailed the job. This article is possessed with style and I am giving good compliment. Best! Stampanti 3d professionali Milano

    ReplyDelete
  3. It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more things about it! Stampanti 3d professionali Milano

    ReplyDelete
  4. Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us. stampante 3d

    ReplyDelete
  5. Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job! Vulnerability assesment and penetration testing

    ReplyDelete

Web Resource vs PCF vs Canvas App - which of the one is used?

While started working on specific Business Requirements related to custom layout, there is a always common question that "where to star...