ThingWorx Flow > Connectors Overview > System Connectors > Azure
  
Azure
Microsoft Azure is an open, flexible, enterprise-grade cloud computing platform. It provides software as a service (SaaS), platform as a service (PaaS) and infrastructure as a service (IaaS) and supports many different programming languages, tools and frameworks, including both Microsoft-specific and third-party software and systems.
Connector Release Version
Azure connector was delivered in the 8.4.3 release.
Supported Actions
Computer Vision
Execute Function
Execute Logic App
Face Recognition
LUIS Prediction
Speech Service
Text Analytics
Supported Triggers
None
Integration Services
Logic Apps
Supported Authorizations
OAuth
* 
Before adding an OAuth connection, ensure that you follow the steps provided in Obtaining Client Id and Client Secrets for Azure.
Basic
None
Authorize Azure
You need to authorize Azure for each Azure connector action. To authorize the Azure connector, select one of the following authentication schemes:
OAuth — In the Select an Authentication Scheme list, select OAuth, and complete the following steps:
1. In the Azure OAuth list, select Add new Azure login.
2. In the Parameters window, enter the following details:
Tenant ID — Azure tenant ID or domain name.
Subscription ID — Subscription ID that you want to use.
Resource URL — Resource URL such as https://management.azure.com/.
3. Click ALLOW. You are prompted to log in to your Azure account, if you have not already logged in.
4. Enter your credentials, and then click Sign in.
5. Edit the Authorization Label, if needed, and then click ADD.
A new authorization is added to the list.
6. Click TEST to validate the authorization.
None — In the Select an Authentication Scheme list, select None, and complete the following steps:
1. API Subscription Key — KEY 1 or KEY 2 of the cognitive service.
2. API Location — Location of the cognitive service.
Basic — In the Select an Authentication Scheme list, select Basic, and complete the following steps:
1. In the Azure Basic list, select Add New, and then enter the following details:
Connection Label — This is autopopulated. However, you can provide the connection label of your choice.
* 
Labels are case-sensitive. You cannot use spaces, some special characters, and leading numbers.
Username — Registered email address of your Azure account.
Password — Password of your Azure account.
Subscription ID — Subscription ID that you want to use.
Tenant ID — Azure tenant ID or domain name.
2. Click ADD.
A new authorization is added to the list.
Example
Consider the following scenario:
A shipment company wants to detect a customer complaint about damaged packaging, and then automate the following actions in response:
1. Add and configure a Trigger for a new customer email.
2. Use LUIS Prediction to verify whether the email is a complaint about damaged packaging.
3. Use Text Analytics to detect the sentiment of the email.
4. Execute various actions using a Logic App in response to the customer complaint.
Add and Configure an Office 365 Trigger to Get a New Customer Email
To use the Office 365 trigger in your workflow, create a new event for the Office 365 trigger, and then connect it to the flow. To create a new event, do the following:
1. Place the pointer on the start icon , and then click or double-click . A list of triggers appears.
2. Select the Office 365 trigger, and then create a new event. The Office 365 trigger configuration window opens.
* 
If a trigger is already created, select an existing trigger, and then click SAVE.
To create a new trigger, click Create a new event for Office 365, and then proceed with the steps further.
3. Edit the Trigger Label, if needed.
4. To add a new authorization, refer to Authorize Office 365.
* 
If you previously added an authorization for Office 365, select an authorization from the list.
5. In the Select Trigger list, select New Email.
6. In the Folder ID field, select Inbox.
7. Click SAVE.
Use LUIS Prediction to Verify Whether the Email is a Complaint
To use the LUIS Prediction action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Drag the LUIS Prediction action under the Azure connector to the canvas, place the pointer on the action, and then click or double-click the action.
The LUIS Prediction action window opens.
2. Edit the Label, if needed. By default, the label name is same as the action name.
3. To add a new authorization, refer to Authorize Azure.
* 
If you previously added an authorization for Azure, select an authorization from the list.
4. In the LUIS App Id list, select Specify.
5. Specify the LUIS Application ID.
6. Select the appropriate Resource Group defined in the subscription ID.
7. Select the LUIS Account.
8. In the Query field, map the Subject from the previous action as shown in the following figure:
9. Click Done.
Adding Conditions
ThingWorx Flow allows you to set conditions between two actions of your workflow. Using this functionality, you can define one or more custom conditions between two actions. The workflow proceeds to the next action only if the conditions are met.
1. To define conditions between the two actions, click the line that connects the two actions, and then click .
The Condition window opens.
2. Click Condition, and then enter the following details:
a. Map the Input from the output of the previous action.
b. Select the Condition operator that you want to apply on the specified input data.
c. Specify the Expected output value that you want to check against the specified input.
3. Click AND to specify a number of interrelated conditions. When all the conditions specified with the AND operator return true, then the flow continues execution. If any of the conditions return false, the flow execution stops immediately.
4. Click Done.
Use Text Analytics to Detect Sentiment of the Email
To use the Text Analytics action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Drag the Text Analytics action under the Azure connector to the canvas, place the pointer on the action, and then click or double-click the action. The Text Analytics action window opens.
2. Edit the Label, if needed. By default, the label name is same as the action name.
3. To add a new authorization, refer to Authorize Azure.
* 
If you previously added an authorization for Azure, select an authorization from the list.
4. Select a Resource Group defined in the subscription.
5. Select the Text Analytics Account from the list.
6. In the Select Specific Service list, select a text analytics service.
7. In the Documents section, click Add to enter the following details:
Text—Map the Body Content Text from the Output schema as shown in the figure above.
Language
8. Click Done.
Execute Various Actions Using Execute Logic App Action in Response to the Customer Complaint
To use the Execute Logic App action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Drag the Execute Logic App action under the Azure connector to the canvas, place the pointer on the action, and then click or double-click the action. The Execute Logic App action window opens.
2. Edit the Label, if needed. By default, the label name is same as the action name.
3. To add a new authorization, refer to Authorize Azure.
* 
If you previously added an authorization for Azure, select an authorization from the list.
4. Select an option to list the logic Apps.
5. Click + to view the additional fields, and then in the Properties field, specify the inputs required by the trigger, if any, as a JSON format. This field is applicable only if you enter the trigger information manually.
6. Click Done.