Azure Logic Apps
Logic App is a cloud-based service. It allows us to react to an event in one service (such as SharePoint online) and do something with the data from that event in another service (such as Twitter). It makes it practical and simple for business processes. The users build workflows that automatically perform some business tasks and processes across applications and services. We can connect our business-critical apps and services with Azure Logic Apps, automating workflows without writing a single line of code.
Before reading this article, please go through some important article links, mentioned below.
Face API
Here, we can detect the face in the image. Whenever you upload the images in the dropbox, the Face API detects the values like Gender, Age, Beard, Glasses, Smile, etc., and stores the values in the Excel file.
How to use Face API in Azure Logic App?
Here, we need to connect DropBox and Onedrive to access Face API.
Prerequisites
- Microsoft Azure Account
- DropBox Account
- Microsoft OneDrive Account(Excel Sheet)
Follow the below steps to build a Workflow using a template.
Step 1. Create the Cognitive Service. Login to https://portal.azure.com/
- In the dashboard, select "Create a resource" and click on "AI + Machine Learning". Now, choose "Face" for creating the Cognitive Service.
- Enter the name you want to assign to the Face API, choose the subscription and resource group where you organize the related resources, and location where your logic app would be stored, and the pricing tier. Then, click on "Create''.
- Under the Keys, you have keys for accessing the Face Detection.
Step 2. Create the Storage Account
- In the dashboard, select "Create a resource" and click on "Storage". Now, choose Storage account.
- Enter the name, subscription, Location, and Access tier. Then, click on "Create".
- Then create the container.
- Container Created.
- Open up the container and choose properties. There we have a storage URL.
Step 3. Now, let us create the Logic App for detecting the face in the image and storing the values on the Excel Spreadsheet.
- In the dashboard, choose to create a resource and click on Integration. Now, choose Logic App.
- Enter the name you want to assign to the logic, choose the subscription, the resource group where you organize related resources, and the location where your logic app is stored. Then, click on "Create".
- Here is the dashboard. Click on Logic App Designer.
Step 4. Now, click on the Blank Logic App.
Step 5. Configure the data by signing into DropBox and Excel Online.
- Search DropBox on the search bar.
- Choose the Triggers.
- Next, we sign in.
- We give permission to access our accounts.
- Next, Choose the Folder name where you upload the images.
Step 6. Configure the Blob Storage
- Search Blob Storage
- Choose the Storage Connection
- Next, Choose the folder path, Blob name,and Blob content.
Step 7. Configure the cognitive Face API for detecting the Face in the Image.
- Search for Face API.
- Choose the Action.
- After that, give the Connection name, API Key and Site URL from Face API Cognitive Service.
- Now, enter the Blob storage link and choose the path in the image URL.
Step 8
- Next, we want to save that value into the Excel sheet, so search for Excel Online.
- Then, choose the Action for the workflow.
- Next, we sign in to OneDrive.
- We give permission to access our accounts.
- Next, Choose the File Name and Table Name to save the Image values. And, Then, Choose the Fields that you want
- The final Workflow will be like this.
Step 9. Now we save and run the workflow and run it.
Output
Upload the image in the DropBox.
Now, the values are saved in Excel.
Logic App Evaluation.
Summary
I hope you understand how to use Face API and store the values in the Excel spreadsheet automatically and how to run it. Stay tuned for more.