Complete the code to create a Logic App trigger that starts when an HTTP request is received.
{
"definition": {
"triggers": {
"manual": {
"type": "[1]"
}
}
}
}The trigger type for starting a Logic App on an HTTP request is Request.
Complete the code to add an action that sends an email using Office 365 connector.
{
"actions": {
"send_email": {
"type": "[1]",
"inputs": {
"host": {
"connectionName": "office365",
"operationId": "SendEmail"
},
"parameters": {
"To": "user@example.com",
"Subject": "Hello",
"Body": "Welcome to Logic Apps!"
}
}
}
}
}The action type to call a connector like Office 365 is ApiConnection.
Fix the error in the condition expression to check if the variable 'count' is greater than 5.
{
"actions": {
"check_count": {
"type": "If",
"expression": "@greater([1], 5)",
"actions": {}
}
}
}To access a variable in Logic Apps expressions, use variables('count').
Fill both blanks to create a loop that iterates over an array variable 'items' and appends each item to a string variable 'result'.
{
"actions": {
"for_each": {
"type": "Foreach",
"inputs": {
"items": [1]
},
"actions": {
"append_string": {
"type": "AppendToStringVariable",
"inputs": {
"name": "result",
"value": [2]
}
}
}
}
}
}The loop iterates over variables('items'). Inside the loop, item() gets the current element.
Fill all three blanks to define a Logic App action that initializes a variable named 'count' with integer type and value 0.
{
"actions": {
"init_count": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": [1],
"type": [2],
"value": [3]
}
]
}
}
}
}The variable name is "count", type is "integer", and initial value is 0.