0
0
Azurecloud~10 mins

Logic Apps for visual workflows in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Logic App trigger that starts when an HTTP request is received.

Azure
{
  "definition": {
    "triggers": {
      "manual": {
        "type": "[1]"
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
AHttpRequest
BRequest
CHttpTrigger
DHttp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'HttpTrigger' which is from Azure Functions, not Logic Apps.
Using 'Http' which is the 'kind' property, not the type.
Using 'HttpRequest' which is not a valid trigger type.
2fill in blank
medium

Complete the code to add an action that sends an email using Office 365 connector.

Azure
{
  "actions": {
    "send_email": {
      "type": "[1]",
      "inputs": {
        "host": {
          "connectionName": "office365",
          "operationId": "SendEmail"
        },
        "parameters": {
          "To": "user@example.com",
          "Subject": "Hello",
          "Body": "Welcome to Logic Apps!"
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
AEmail
BHttp
CSendEmail
DApiConnection
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Http' which is for HTTP calls, not connectors.
Using 'SendEmail' which is an operation, not a type.
Using 'Email' which is not a valid action type.
3fill in blank
hard

Fix the error in the condition expression to check if the variable 'count' is greater than 5.

Azure
{
  "actions": {
    "check_count": {
      "type": "If",
      "expression": "@greater([1], 5)",
      "actions": {}
    }
  }
}
Drag options to blanks, or click blank then click option'
Avariables('count')
Bcount
Cvariables[count]
Dvariables.get('count')
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'count' directly which is undefined.
Using bracket notation which is invalid in Logic Apps expressions.
Using 'variables.get' which is not supported.
4fill in blank
hard

Fill both blanks to create a loop that iterates over an array variable 'items' and appends each item to a string variable 'result'.

Azure
{
  "actions": {
    "for_each": {
      "type": "Foreach",
      "inputs": {
        "items": [1]
      },
      "actions": {
        "append_string": {
          "type": "AppendToStringVariable",
          "inputs": {
            "name": "result",
            "value": [2]
          }
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Avariables('items')
Bitems()
Citem()
Dvariables('result')
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'items()' which is not a variable or function here.
Using 'variables('result')' as the value to append instead of current item.
Using 'variables('items')' incorrectly inside the loop for current item.
5fill in blank
hard

Fill all three blanks to define a Logic App action that initializes a variable named 'count' with integer type and value 0.

Azure
{
  "actions": {
    "init_count": {
      "type": "InitializeVariable",
      "inputs": {
        "variables": [
          {
            "name": [1],
            "type": [2],
            "value": [3]
          }
        ]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A"count"
B"integer"
C0
D"int"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'int' instead of 'integer' for type.
Not quoting the variable name and type.
Using a string '0' instead of number 0 for value.