-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Severity
P2 - High (Major functionality broken)
Describe the Bug with repro steps
I was deploying my template using az cli and I noticed that the Logic App was deployed twice - And the last one deployed was faulty
I deployed using the command:
az deployment group create --resource-group <resource-group> --template-file "01.2.Helper.SendNotification.bicep" --name 01.2.Helper.SendNotification-20260121-HHMMSS --mode Incremental --parameters parameters.test.json
After deployment which was successful I noticed that it was not working properly - And upon examining, the workflow was missing actions.
Here are the deployment versions of the WorkFlow:

The two deployed Logic Apps at 9:57 AM was part of the deployment started at 09:56:52 AM listed in the deployment list:
Here are the details from the deployment:
And looking at the actual layout of the two versions - First the one that was correct (08584326210650479843)
And the faulty one (08584326210126937598):
As you can see the faulty one are missing elements within the scopes - And some elements are directly missing.
At 10:34 AM I did a new deployment, and this time it worked.
What type of Logic App Is this happening in?
Consumption (Portal)
Are you experiencing a regression?
No response
Which operating system are you using?
Windows
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
# This is the BICEP file that was deployed
param environment string = 'test'
param projectSuffix string
param workflowNames object
param logicAppState string = 'Disabled'
#disable-next-line no-unused-params
param systemReferences object
#disable-next-line no-unused-params
param dataverse object
#disable-next-line no-unused-params
param businessCentral object
#disable-next-line no-unused-params
param storageAccount object
#disable-next-line no-unused-params
param externalSystem object
#disable-next-line no-unused-params
param secretValues object
@description('The name of the email service, defined in 00.3.AzureCommunicationsServices.bicep')
var emailServices_name = 'ces-${environment}-${projectSuffix}'
// Reference the existing domain resource
resource azureManagedDomain_existing 'Microsoft.Communication/emailServices/domains@2023-06-01-preview' existing = {
name: '${emailServices_name}/AzureManagedDomain'
scope: resourceGroup()
}
// Construct the email address dynamically
@description('The email address used for sending notifications')
var doNotReplyEmailAddress = 'DoNotReply@${azureManagedDomain_existing.properties.mailFromSenderDomain}'
@description('The prefix used for naming the Logic Apps')
var prefix = 'la-${environment}-${projectSuffix}'
@description('The name of the Logic App for sending notifications')
var nameOfLogicApp = '${prefix}-${workflowNames.helperSendNotification}'
@description('The connections used by the Logic App')
var connections object = {
acsemail: {
id: '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Web/locations/${resourceGroup().location}/managedApis/acsemail'
connectionId: resourceId('Microsoft.Web/connections', 'acsemail')
}
}
resource logicApp 'Microsoft.Logic/workflows@2019-05-01' = {
name: nameOfLogicApp
location: resourceGroup().location
properties: {
state: logicAppState
definition: {
'$schema': 'https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#'
contentVersion: '1.0.0.0'
parameters: {
errorRecipients: {
defaultValue: [
'myemail@example.com'
]
type: 'Array'
}
senderEmailAddress: {
defaultValue: doNotReplyEmailAddress
type: 'String'
}
'$connections': {
defaultValue: {}
type: 'Object'
}
}
triggers: {
Send_Notification: {
type: 'Request'
kind: 'Http'
inputs: {
schema: {
type: 'object'
properties: {
FlowDetails: {
type: 'object'
description: 'workflow() from current flow.'
}
ErrorObject: {
type: 'object'
description: 'Full error object received from the error handler.'
}
NotificationBody: {
type: 'string'
description: 'Full HTML body of the notification to be sent via Email, leave blank if not needed.'
}
MessageService: {
type: 'string'
enum: [
'Email'
'Teams'
'Notification'
]
description: 'What service to use to send notifications (Email or Teams)'
}
}
}
}
}
}
actions: {
Try: {
actions: {
'Select_-_Error_Recipients': {
type: 'Select'
inputs: {
from: '@parameters(\'errorRecipients\')'
select: {
address: '@item()'
}
}
}
'Switch_-_MessageService': {
runAfter: {
'Select_-_Error_Recipients': [
'Succeeded'
]
}
cases: {
'Case_-_Notification': {
case: 'NOTIFICATION'
actions: {
'Send_email_-_Notification': {
type: 'ApiConnection'
inputs: {
host: {
connection: {
name: '@parameters(\'$connections\')[\'acsemail\'][\'connectionId\']'
}
}
method: 'post'
body: {
senderAddress: '@{parameters(\'senderEmailAddress\')}'
recipients: {
to: '@body(\'Select_-_Error_Recipients\')'
}
content: {
subject: 'Error notification'
html: '<p class="editor-paragraph">@{triggerBody()?[\'NotificationBody\']}</p>'
}
importance: 'Normal'
}
path: '/emails:sendGAVersion'
queries: {
'api-version': '2023-03-31'
}
retryPolicy: {
type: 'none'
}
}
}
}
}
'Case_-_Email': {
case: 'EMAIL'
actions: {
Send_email: {
runAfter: {
'Compose_-_HTML_Body': [
'Succeeded'
]
}
type: 'ApiConnection'
inputs: {
host: {
connection: {
name: '@parameters(\'$connections\')[\'acsemail\'][\'connectionId\']'
}
}
method: 'post'
body: {
senderAddress: '@{parameters(\'senderEmailAddress\')}'
recipients: {
to: '@body(\'Select_-_Error_Recipients\')'
}
content: {
subject: 'Error notification'
html: '@{outputs(\'Compose_-_HTML_Body\')}'
}
importance: 'Normal'
}
path: '/emails:sendGAVersion'
queries: {
'api-version': '2023-03-31'
}
retryPolicy: {
type: 'none'
}
}
}
'Parse_JSON_-_Workflow_Details': {
type: 'ParseJson'
inputs: {
content: '@coalesce(\r\n triggerBody()?[\'FlowDetails\'],\r\n workflow()\r\n)'
schema: {
type: 'object'
properties: {
id: {
type: 'string'
}
name: {
type: 'string'
}
type: {
type: 'string'
}
location: {
type: 'string'
}
tags: {
type: 'object'
properties: {}
}
run: {
type: 'object'
properties: {
id: {
type: 'string'
}
name: {
type: 'string'
}
type: {
type: 'string'
}
}
}
}
}
}
}
Parse_JSON_Error_Data: {
runAfter: {
'Parse_JSON_-_Workflow_Details': [
'Succeeded'
]
Condition: [
'Succeeded'
]
}
type: 'ParseJson'
inputs: {
content: {
workflowName: '@{body(\'Parse_JSON_-_Workflow_Details\')?[\'name\']}'
resourceGroup: '@{split(coalesce(body(\'Parse_JSON_-_Workflow_Details\')?[\'id\'], \'\'), \'/\')?[4]}'
resourceGroup2: '@{split(coalesce(body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'inputs\']?[\'host\']?[\'connection\']?[\'name\'], \'\'), \'/\')?[4]}'
resourceGroups: [
'@{split(coalesce(body(\'Parse_JSON_-_Workflow_Details\')?[\'id\'], \'\'), \'/\')?[4]}'
'@{split(coalesce(body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'inputs\']?[\'host\']?[\'connection\']?[\'name\'], \'\'), \'/\')?[4]}'
]
location: '@{body(\'Parse_JSON_-_Workflow_Details\')?[\'location\']}'
subscriptionId: '@{split(coalesce(body(\'Parse_JSON_-_Workflow_Details\')?[\'id\'], \'\'), \'/\')?[2]}'
workflowStatus: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Status\']}'
failedAction: '@{body(\'Parse_JSON_-_Error_Details\')?[\'ActionName\']}'
runId: '@{body(\'Parse_JSON_-_Workflow_Details\')?[\'run\']?[\'name\']}'
trackingId: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'trackingId\']}'
clientTrackingId: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'clientTrackingId\']}'
startTime: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'startTime\']}'
endTime: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'endTime\']}'
errorCode: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'code\']} / @{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'error\']?[\'code\']}'
errorMessage: '@{coalesce(body(\'Parse_JSON_-_Error_Details\')?[\'ErrorMessage\'],body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']?[\'error\']?[\'message\'])}'
runUrl: '@{concat(\n \'https://portal.azure.com/#view/Microsoft_Azure_EMA/DesignerEditorConsumption.ReactView/id/\',\n encodeUriComponent(body(\'Parse_JSON_-_Workflow_Details\')?[\'id\']),\n \'/location/\',\n body(\'Parse_JSON_-_Workflow_Details\')?[\'location\'],\n \'/isReadOnly~/true/isMonitoringView~/true/runId/\',\n encodeUriComponent(body(\'Parse_JSON_-_Workflow_Details\')?[\'run\'][\'id\'])\n)}'
rawErrorDetails: '@{body(\'Parse_JSON_-_Error_Details\')?[\'Contents\']}'
}
schema: {
type: 'object'
properties: {
workflowName: {}
resourceGroup: {}
resourceGroup2: {}
resourceGroups: {}
location: {}
subscriptionId: {}
workflowStatus: {}
failedAction: {}
runId: {}
trackingId: {}
clientTrackingId: {}
startTime: {}
endTime: {}
errorCode: {}
errorMessage: {}
runUrl: {}
rawErrorDetails: {}
}
}
}
}
'Compose_-_HTML_Body': {
runAfter: {
Parse_JSON_Error_Data: [
'Succeeded'
'Failed'
]
}
type: 'Compose'
inputs: '<center>\n\t<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #f5f5f5; margin: 0; padding: 0;">\n\t\t<tr>\n\t\t\t<td align="center" style="padding: 20px 0;">\n\t\t\t\t<table style="width: 600px; margin: 0 auto; background: white; border-collapse: collapse; border: 2px solid #e2e8f0;">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="background-color: #35A5DC; color: white; padding: 20px; text-align: center;">\n\t\t\t\t\t\t\t<h1 style="margin: 0; font-size: 1.8em; font-weight: bold;">🚨 Azure Logic App Error Report</h1>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="padding: 20px; vertical-align: top;">\n\t\t\t\t\t\t\t<div style="background-color: #f8d7da; border: 1px solid #f5c6cb; border-left: 4px solid #dc3545; padding: 15px; margin-bottom: 20px; border-radius: 4px;">\n\t\t\t\t\t\t\t\t<h2 style="color: #721c24; margin-top: 0; margin-bottom: 10px; font-size: 1.3em;">❌ Error Summary</h2>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Workflow:</strong>\n\t\t\t\t\t\t\t\t\t<span style="background-color: #d1ecf1; color: #0c5460; padding: 2px 6px; border-radius: 3px; font-weight: bold; font-family: monospace;">@{body(\'Parse_JSON_Error_Data\')?[\'workflowName\']}</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Failed Action:</strong>\n\t\t\t\t\t\t\t\t\t<span style="background-color: #d1ecf1; color: #0c5460; padding: 2px 6px; border-radius: 3px; font-weight: bold; font-family: monospace;">@{body(\'Parse_JSON_Error_Data\')?[\'failedAction\']}</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Status:</strong>\n\t\t\t\t\t\t\t\t\t<span style="color: #dc3545; font-weight: bold;">@{body(\'Parse_JSON_Error_Data\')?[\'workflowStatus\']}</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">🔧 Error Details</h3>\n\t\t\t\t\t\t\t<table style="width: 100%; border-collapse: collapse; background: white; border: 1px solid #dee2e6; margin-bottom: 20px; table-layout: fixed;">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3; width: 200px;">Component</th>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3;">Details</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Error Message</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{replace(\r\n body(\'Parse_JSON_Error_Data\')?[\'errorMessage\'],\r\n \'\r\n\',\r\n \'<br/>\'\r\n)}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">🔍 Workflow Details</h3>\n\t\t\t\t\t\t\t<table style="width: 100%; border-collapse: collapse; background: white; border: 1px solid #dee2e6; margin-bottom: 20px; table-layout: fixed;">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3; width: 200px;">Property</th>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3;">Value</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Workflow Name</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'workflowName\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Resource Group</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{join(\r\n coalesce(\r\n body(\'Parse_JSON_Error_Data\')?[\'resourceGroups\'],\r\n createArray(\'\',\'\')\r\n ),\r\n \'/\'\r\n)}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Location</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'location\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Subscription ID</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'subscriptionId\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">⚠️ Execution Details</h3>\n\t\t\t\t\t\t\t<table style="width: 100%; border-collapse: collapse; background: white; border: 1px solid #dee2e6; margin-bottom: 20px; table-layout: fixed;">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3; width: 200px;">Property</th>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3;">Value</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Status</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t\t\t<span style="color: #dc3545; font-weight: bold;">@{body(\'Parse_JSON_Error_Data\')?[\'workflowStatus\']}</span>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Failed Action</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'failedAction\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Run ID</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'runId\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Tracking ID</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'trackingId\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Client Tracking ID</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'clientTrackingId\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Start Time</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t\t\t<span style="font-family: monospace;">@{body(\'Parse_JSON_Error_Data\')?[\'startTime\']}</span>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>End Time</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">\n\t\t\t\t\t\t\t\t\t\t<span style="font-family: monospace;">@{body(\'Parse_JSON_Error_Data\')?[\'endTime\']}</span>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Error Code</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{body(\'Parse_JSON_Error_Data\')?[\'errorCode\']}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">🔗 Direct Access Link</h3>\n\t\t\t\t\t\t\t<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td align="center" style="padding: 10px;">\n\t\t\t\t\t\t\t\t\t\t<a href="@{body(\'Parse_JSON_Error_Data\')?[\'runUrl\']}" style="background-color: #0078d4; color: white; padding: 10px 15px; border-radius: 4px; text-decoration: none; font-weight: bold; display: inline-block;">\n\t\t\t\t\t\t\t\t\t\t\t🚀 View Run in Azure Portal\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<div style="background-color: #f8f9fa; border: 1px solid #dee2e6; color: #495057; padding: 15px; border-radius: 4px; font-family: monospace; font-size: 0.85em; margin: 15px 0;">\n\t\t\t\t\t\t\t\t<strong>Raw Error Details:</strong>\n\t\t\t\t\t\t\t\t<pre style="white-space: pre-wrap; word-wrap: break-word; margin: 10px 0 0 0;">@{replace(replace(string(body(\'Parse_JSON_Error_Data\')?[\'rawErrorDetails\']),\',\',\', \'),\'{\',\'{ \')}</pre>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</center>'
}
Condition: {
actions: {
'Parse_JSON_-_Error_Details': {
type: 'ParseJson'
inputs: {
content: '@triggerBody()?[\'ErrorObject\']'
schema: {
type: 'object'
properties: {
Status: {
type: 'string'
}
ActionName: {
type: 'string'
}
ErrorMessage: {
type: 'string'
}
Contents: {}
}
}
}
}
}
else: {
actions: {}
}
expression: {
and: [
{
not: {
equals: [
'@empty(triggerBody()?[\'ErrorObject\'])'
'@true'
]
}
}
]
}
type: 'If'
}
}
}
'Case_-_Teams_(Not_implemented)': {
case: 'TEAMS'
actions: {}
}
}
default: {
actions: {}
}
expression: '@toUpper(triggerBody()?[\'MessageService\'])'
type: 'Switch'
}
}
runAfter: {
'Response_-_Success': [
'Succeeded'
]
}
type: 'Scope'
}
Finally: {
actions: {
'Condition_-_Try_succeeded': {
actions: {}
else: {
actions: {
'Terminate_-_Failed': {
type: 'Terminate'
inputs: {
runStatus: 'Failed'
runError: {
code: '500'
message: 'Failed'
}
}
}
}
}
expression: {
and: [
{
equals: [
'@actions(\'Try\')[\'status\']'
'Succeeded'
]
}
]
}
type: 'If'
}
}
runAfter: {
Catch: [
'Skipped'
'Failed'
'TimedOut'
'Succeeded'
]
}
type: 'Scope'
}
Catch: {
actions: {
'Send_email_-_Unable_to_send_full_error_message': {
type: 'ApiConnection'
inputs: {
host: {
connection: {
name: '@parameters(\'$connections\')[\'acsemail\'][\'connectionId\']'
}
}
method: 'post'
body: {
senderAddress: '@parameters(\'senderEmailAddress\')'
recipients: {
to: '@body(\'Select_-_Error_Recipients\')'
}
content: {
subject: 'Unable to send error'
html: '<center>\n\t<table border="0" cellpadding="0" cellspacing="0" style="background-color: #f5f5f5; margin: 0; padding: 0;">\n\t\t<tbody><tr>\n\t\t\t<td style="padding: 20px 0;">\n\t\t\t\t<table style="width: 600px; margin: 0 auto; background: white; border-collapse: collapse; border: 2px solid #e2e8f0;">\n\t\t\t\t\t<tbody><tr>\n\t\t\t\t\t\t<td style="background-color: #dc3545; color: white; padding: 20px; text-align: center;">\n\t\t\t\t\t\t\t<h1 style="margin: 0; font-size: 1.8em; font-weight: bold;">🚨 Azure Logic App Error Report</h1>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="padding: 20px; vertical-align: top;">\n\t\t\t\t\t\t\t<div style="background-color: #f8d7da; border: 1px solid #f5c6cb; border-left: 4px solid #dc3545; padding: 15px; margin-bottom: 20px; border-radius: 4px;">\n\t\t\t\t\t\t\t\t<h2 style="color: #721c24; margin-top: 0; margin-bottom: 10px; font-size: 1.3em;">❌ Error Summary</h2>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Workflow:</strong>\n\t\t\t\t\t\t\t\t\t<span style="background-color: #d1ecf1; color: #0c5460; padding: 2px 6px; border-radius: 3px; font-weight: bold; font-family: monospace;">@{workflow().name}</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Failed Action:</strong>\n\t\t\t\t\t\t\t\t\t<span style="background-color: #d1ecf1; color: #0c5460; padding: 2px 6px; border-radius: 3px; font-weight: bold; font-family: monospace;">Unable to send notification email, please investigate</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<strong>Status:</strong>\n\t\t\t\t\t\t\t\t\t<span style="color: #dc3545; font-weight: bold;">Failed</span>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">🔍 Workflow Details</h3>\n\t\t\t\t\t\t\t<table style="width: 100%; border-collapse: collapse; background: white; border: 1px solid #dee2e6; margin-bottom: 20px; table-layout: fixed;">\n\t\t\t\t\t\t\t\t<tbody><tr>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3; width: 200px;">Property</th>\n\t\t\t\t\t\t\t\t\t<th style="background-color: #007bff; color: white; padding: 12px 10px; text-align: left; font-weight: bold; border-bottom: 2px solid #0056b3;">Value</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr style="background-color: #f8f9fa;">\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; width: 200px; font-weight: bold;">\n\t\t\t\t\t\t\t\t\t\t<strong>Workflow Name</strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px; border-bottom: 1px solid #dee2e6; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word;">@{workflow().name}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody></table>\n\n\t\t\t\t\t\t\t<h3 style="color: #495057; margin-bottom: 10px; margin-top: 20px; font-size: 1.2em; border-bottom: 2px solid #dee2e6; padding-bottom: 5px;">🔗 Direct Access Link</h3>\n\t\t\t\t\t\t\t<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">\n\t\t\t\t\t\t\t\t<tbody><tr>\n\t\t\t\t\t\t\t\t\t<td style="padding: 10px;">\n\t\t\t\t\t\t\t\t\t\t<a href="@{concat(\r\n \'https://portal.azure.com/#view/Microsoft_Azure_EMA/DesignerEditorConsumption.ReactView/id/\',\r\n encodeUriComponent(workflow().id),\r\n \'/location/\',\r\n workflow().location,\r\n \'/isReadOnly~/true/isMonitoringView~/true/runId/\',\r\n encodeUriComponent(workflow().run.id)\r\n)}" style="background-color: #0078d4; color: white; padding: 10px 15px; border-radius: 4px; text-decoration: none; font-weight: bold; display: inline-block;">\n\t\t\t\t\t\t\t\t\t\t\t🚀 View Run in Azure Portal\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody></table>\n\t\t\t\t\t\t\t<div style="background-color: #f8f9fa; border: 1px solid #dee2e6; color: #495057; padding: 15px; border-radius: 4px; font-family: monospace; font-size: 0.85em; margin: 15px 0;">\n\t\t\t\t\t\t\t\t<strong>Raw Error Details:</strong>\n\t\t\t\t\t\t\t\t<pre style="word-wrap: break-word; margin: 10px 0 0 0;">@{replace(replace(string(body(\'Parse_JSON_Error_Data\')?[\'rawErrorDetails\']),\',\',\', \'),\'{\',\'{ \')}</pre>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table>\n\t\t\t</td>\n\t\t</tr>\n\t</tbody></table>\n</center>'
}
importance: 'High'
}
path: '/emails:sendGAVersion'
queries: {
'api-version': '2023-03-31'
}
retryPolicy: {
type: 'none'
}
}
}
'Terminate_-_Unable_to_send_email': {
runAfter: {
'Send_email_-_Unable_to_send_full_error_message': [
'Succeeded'
]
}
type: 'Terminate'
inputs: {
runStatus: 'Failed'
runError: {
code: '500'
message: 'Unable to send error message'
}
}
}
}
runAfter: {
Try: [
'TimedOut'
'Failed'
]
}
type: 'Scope'
}
'Terminate_-_Succeeded': {
runAfter: {
Finally: [
'Succeeded'
]
}
type: 'Terminate'
inputs: {
runStatus: 'Succeeded'
}
}
'Response_-_Success': {
runAfter: {}
type: 'Response'
kind: 'Http'
inputs: {
statusCode: 202
}
}
}
outputs: {}
}
parameters: {
senderEmailAddress: {
value: doNotReplyEmailAddress
}
'$connections': {
value: {
acsemail: {
id: connections.acsemail.id
connectionId: connections.acsemail.connectionId
connectionName: 'acsemail'
}
}
}
}
}
}Screenshots or Videos
No response
Environment
Az cli version
{
"azure-cli": "2.69.0",
"azure-cli-core": "2.69.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"azure-devops": "1.0.2",
"logic": "1.1.0"
}
}
Additional context
No response