You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Functions integrates with Azure Logic Apps in the Logic Apps Designer. This integration lets you use the computing power of Functions in orchestrations with other Azure and third-party services.
16
16
17
-
This tutorial shows you how to use Functions with Logic Apps and Cognitive Services on Azure to run sentiment analysis from Twitter posts. An HTTP triggered function categorizes tweets as green, yellow, or red based on the sentiment score. An email is sent when poor sentiment is detected.
17
+
This tutorial shows you how to use Azure Functions with Logic Apps and Cognitive Services on Azure to run sentiment analysis from Twitter posts. An HTTP triggered function categorizes tweets as green, yellow, or red based on the sentiment score. An email is sent when poor sentiment is detected.
18
18
19
19

20
20
@@ -66,7 +66,7 @@ The Cognitive Services APIs are available in Azure as individual resources. Use
66
66
67
67
## Create the function app
68
68
69
-
Functions provides a great way to offload processing tasks in a logic apps workflow. This tutorial uses an HTTP triggered function to process tweet sentiment scores from Cognitive Services and return a category value.
69
+
Azure Functions provides a great way to offload processing tasks in a logic apps workflow. This tutorial uses an HTTP triggered function to process tweet sentiment scores from Cognitive Services and return a category value.
70
70
71
71
[!INCLUDE [Create function app Azure portal](../../includes/functions-create-function-app-portal.md)]
72
72
@@ -78,11 +78,11 @@ Functions provides a great way to offload processing tasks in a logic apps workf
78
78
79
79

80
80
81
-
2. From the **New Function** page, select **Create Function**.
81
+
3. From the **New Function** page, select **Create Function**.
82
82
83
-
In your new HTTP trigger function, select **Code + Test** from the left menu, replace the contents of the `run.csx` file with the following code, and then select **Save**:
83
+
4.In your new HTTP trigger function, select **Code + Test** from the left menu, replace the contents of the `run.csx` file with the following code, and then select **Save**:
84
84
85
-
```csharp
85
+
```csharp
86
86
#r"Newtonsoft.Json"
87
87
88
88
usingSystem;
@@ -114,11 +114,11 @@ In your new HTTP trigger function, select **Code + Test** from the left menu, re
114
114
? (ActionResult)newOkObjectResult(category)
115
115
:newBadRequestObjectResult("Please pass a value on the query string or in the request body");
116
116
}
117
-
```
117
+
```
118
118
119
-
This function code returns a color category based on the sentiment score received in the request.
4. To test the function, select **Test** from the top menu. In the **Input** tab, enter a value of `0.2` in the **Body**, and then select **Run**. A value of **RED** is returned in the body of the response in the **Output** tab.
0 commit comments