- 30 Jul 2025
- 3 Minutes to read
- Print
- DarkLight
- PDF
Logic App Standard - Hello World
- Updated on 30 Jul 2025
- 3 Minutes to read
- Print
- DarkLight
- PDF
This sample will help you get up and running with a hello world for Logic App Standard.
In this scenario we are using the Traces log in App Insights.
Sample Scenario Logic App
In this scenario we have a very simple logic app that will receive a message and do a basic message transformation and return the response.
The input message is shown below.
{
"name":"Joe",
"surname":"Blogs"
}
We will do some tracked properties on the parse json shape which we will try to show in the Turbo360 query.
BAM Queries
There will be a parent and 2 child queries used in this scenario in BAM.
BAM - Parent Query
This query will do a join across some events and do the following:
- Find the workflow start event
- Find the workflow even event
- Link to the parse json shape so we can identify the tracked properties
- Use the KQL project to be able to promote the properties for the grid
let input_LogicAppName = "t360-la-standard-pull-bam";
let input_WorkflowName = "HelloWorld";
let input_ActionName = "Parse_JSON";
let workflowStartEvents = traces
| where cloud_RoleName == input_LogicAppName
| where customDimensions.EventName == "WorkflowRunStart"
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName == input_WorkflowName
| extend runId_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId)
| extend workflowName_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName);
let workflowEndEvents = traces
| where cloud_RoleName == input_LogicAppName
| where customDimensions.EventName == "WorkflowRunEnd"
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName == input_WorkflowName
| extend runId_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId)
| extend final_status_ = tostring(customDimensions.prop__status);
let targetActionEvents = traces
| where cloud_RoleName == input_LogicAppName
| where customDimensions.EventName == "WorkflowActionEnd"
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName == input_WorkflowName
| where customDimensions.prop__actionName == input_ActionName
| extend runId_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId)
| extend FirstName_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).trackedProperties)).FirstName)
| extend LastName_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).trackedProperties)).LastName);
workflowStartEvents
| join kind=inner (workflowEndEvents) on runId_
| join kind=inner (targetActionEvents) on runId_
| extend start = timestamp
| extend end = timestamp1
| extend duration = end - start
| project timestamp, WorkflowName = workflowName_, WorkflowRunId = runId_, final_status_, FirstName_, LastName_, start, end, duration
| order by timestamp desc
Child Query 1 - Find Parse Json Action
This query will be used as a child to find the parse json action and then help you light up that shape in your BAM query.
let input_LogicAppName = "t360-la-standard-pull-bam";
let input_WorkflowName = "HelloWorld";
let input_ActionName = "Parse_JSON";
let input_RunId = {WorkflowRunID};
traces
| where cloud_RoleName == input_LogicAppName
| where customDimensions.EventName == "WorkflowActionEnd"
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName == input_WorkflowName
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).actionName == input_ActionName
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId == input_RunId
| extend FirstName_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).trackedProperties)).FirstName)
| extend LastName_ = tostring(parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).trackedProperties)).LastName)
| extend status_ = tostring(parse_json(tostring(customDimensions.prop__properties)).status)
Child Query 2 - Find Response Shape
This query will help you to find the response action log event and then you can light up that shape.
let input_LogicAppName = "t360-la-standard-pull-bam";
let input_WorkflowName = "HelloWorld";
let input_ActionName = "Response";
let input_RunId = "{WorkflowRunId}";
traces
| where cloud_RoleName == input_LogicAppName
| where customDimensions.EventName == "WorkflowActionEnd"
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).workflowName == input_WorkflowName
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).actionName == input_ActionName
| where parse_json(tostring(parse_json(tostring(customDimensions.prop__properties)).resource)).runId == input_RunId
| extend status_ = tostring(parse_json(tostring(customDimensions.prop__properties)).status)
Sample Logic App Definition
Below is the json for the Logic App workflow.json in this sample.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {
"Compose": {
"type": "Compose",
"inputs": {
"firstname": "@{body('Parse_JSON')?['name']}",
"lastname": "@{body('Parse_JSON')?['surname']}"
},
"runAfter": {
"Parse_JSON": [
"SUCCEEDED"
]
}
},
"Response": {
"type": "Response",
"kind": "Http",
"inputs": {
"statusCode": 200,
"body": "@outputs('Compose')"
},
"runAfter": {
"Compose": [
"SUCCEEDED"
]
}
},
"Parse_JSON": {
"type": "ParseJson",
"inputs": {
"content": "@triggerBody()",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"surname": {
"type": "string"
}
}
}
},
"runAfter": {},
"trackedProperties": {
"FirstName": "@{triggerOutputs()['body']?['name']}",
"LastName": "@{triggerOutputs()['body']?['surname']}",
"Test": "Test"
}
}
},
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
}
},
"kind": "Stateful"
}