/vibe:ghcopilot-instr-azure-logic-apps-power-automatefrom vibe
Provides best practices for developing Azure Logic Apps and Power Automate workflows using Workflow Definition Language (WDL), covering trigger configuration, action organization, and enterprise integration patterns.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
These instructions will guide you in writing high-quality Azure Logic Apps and Microsoft Power Automate workflow definitions using the JSON-based Workflow Definition Language (WDL). Azure Logic Apps is a cloud-based integration platform as a service (iPaaS) that provides 1,400+ connectors to simplify integration across services and protocols. Follow these guidelines to create robust, efficient, and maintainable cloud workflow automation solutions.
When working with Logic Apps or Power Automate flow JSON files, ensure your workflow follows this standard structure:
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": { },
"contentVersion": "1.0.0.0",
"outputs": { },
"parameters": { },
"staticResults": { },
"triggers": { }
},
"parameters": { }
}
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {
"type": "object",
"properties": {
"requestParameter": {
"type": "string"
}
}
}
}
}
}
"actions": {
"Get_Customer_Data": {
"type": "Http",
"inputs": {
"method": "GET",
"uri": "https://api.example.com/customers/@{triggerBody()?['customerId']}",
"headers": {
"Content-Type": "application/json"
}
},
"runAfter": {}
}
}
"actions": {
"HTTP_Action": {
"type": "Http",
"inputs": { },
"retryPolicy": {
"type": "fixed",
"count": 3,
"interval": "PT20S",
"minimumInterval": "PT5S",
"maximumInterval": "PT1H"
}
},
"Handle_Success": {
"type": "Scope",
"actions": { },
"runAfter": {
"HTTP_Action": ["Succeeded"]
}
},
"Handle_Failure": {
"type": "Scope",
"actions": {
"Log_Error": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['loganalytics']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "WorkflowError",
"ErrorDetails": "@{actions('HTTP_Action').outputs.body}",
"StatusCode": "@{actions('HTTP_Action').outputs.statusCode}"
}
}
},
"Send_Notification": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail",
"body": {
"To": "[email protected]",
"Subject": "Workflow Error - HTTP Call Failed",
"Body": "<p>The HTTP call failed with status code: @{actions('HTTP_Action').outputs.statusCode}</p>"
}
},
"runAfter": {
"Log_Error": ["Succeeded"]
}
}
},
"runAfter": {
"HTTP_Action": ["Failed", "TimedOut"]
}
}
}
Common expression patterns:
concat(), replace(), substring()filter(), map(), select()if(), and(), or(), equals()formatDateTime(), addDays()json(), array(), createArray()"Set_Variable": {
"type": "SetVariable",
"inputs": {
"name": "formattedData",
"value": "@{map(body('Parse_JSON'), item => {
return {
id: item.id,
name: toUpper(item.name),
date: formatDateTime(item.timestamp, 'yyyy-MM-dd')
}
})}"
}
}
Power Automate supports advanced expressions in conditions to check multiple values. When working with complex logical conditions, use the following pattern:
Common logical expression functions for conditions in Power Automate:
| Expression | Description | Example |
|---|---|---|
and | Returns true if both arguments are true | @and(equals(item()?['Status'], 'completed'), equals(item()?['Assigned'], 'John')) |
or | Returns true if either argument is true | @or(equals(item()?['Status'], 'completed'), equals(item()?['Status'], 'unnecessary')) |
equals | Checks if values are equal | @equals(item()?['Status'], 'blocked') |
greater | Checks if first value is greater than second | @greater(item()?['Due'], item()?['Paid']) |
less | Checks if first value is less than second | @less(item()?['dueDate'], addDays(utcNow(),1)) |
empty | Checks if object, array or string is empty | @empty(item()?['Status']) |
not | Returns opposite of a boolean value | @not(contains(item()?['Status'], 'Failed')) |
Example: Check if a status is "completed" OR "unnecessary":
@or(equals(item()?['Status'], 'completed'), equals(item()?['Status'], 'unnecessary'))
Example: Check if status is "blocked" AND assigned to specific person:
@and(equals(item()?['Status'], 'blocked'), equals(item()?['Assigned'], 'John Wonder'))
Example: Check if a payment is overdue AND incomplete:
@and(greater(item()?['Due'], item()?['Paid']), less(item()?['dueDate'], utcNow()))
Note: In Power Automate, when accessing dynamic values from previous steps in expressions, use the syntax item()?['PropertyName'] to safely access properties in a collection.
"parameters": {
"apiEndpoint": {
"type": "string",
"defaultValue": "https://api.dev.example.com",
"metadata": {
"description": "The base URL for the API endpoint"
}
}
},
"variables": {
"requestId": "@{guid()}",
"processedItems": []
}
"Process_Items": {
"type": "Foreach",
"foreach": "@body('Get_Items')",
"actions": {
"Process_Single_Item": {
"type": "Scope",
"actions": { }
}
},
"runAfter": {
"Get_Items": ["Succeeded"]
},
"runtimeConfiguration": {
"concurrency": {
"repetitions": 10
}
}
}
"Parse_Response": {
"type": "ParseJson",
"inputs": {
"content": "@body('HTTP_Request')",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": { }
}
}
}
}
}
}
"Get_Secret": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['keyvault']['connectionId']"
}
},
"method": "get",
"path": "/secrets/@{encodeURIComponent('apiKey')}/value"
}
},
"Call_Protected_API": {
"type": "Http",
"inputs": {
"method": "POST",
"uri": "https://api.example.com/protected",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer @{body('Get_Secret')?['value']}"
},
"body": {
"data": "@variables('processedData')"
}
},
"authentication": {
"type": "ManagedServiceIdentity"
},
"runAfter": {
"Get_Secret": ["Succeeded"]
}
}
"Process_Items": {
"type": "Foreach",
"foreach": "@body('Get_Items')",
"actions": {
"Process_Single_Item": {
"type": "Scope",
"actions": { }
}
},
"runAfter": {
"Get_Items": ["Succeeded"]
},
"runtimeConfiguration": {
"concurrency": {
"repetitions": 10
}
}
}
While Azure Logic Apps and Power Automate share the same underlying workflow engine and language, they have different target audiences and capabilities:
Power Automate:
Azure Logic Apps:
Asynchronous Processing Pattern: For long-running operations
"LongRunningAction": {
"type": "Http",
"inputs": {
"method": "POST",
"uri": "https://api.example.com/longrunning",
"body": { "data": "@triggerBody()" }
},
"retryPolicy": {
"type": "fixed",
"count": 3,
"interval": "PT30S"
}
}
Webhook Pattern: For callback-based processing
"WebhookAction": {
"type": "ApiConnectionWebhook",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['servicebus']['connectionId']"
}
},
"body": {
"content": "@triggerBody()"
},
"path": "/subscribe/topics/@{encodeURIComponent('mytopic')}/subscriptions/@{encodeURIComponent('mysubscription')}"
}
}
# Example Azure DevOps YAML pipeline for Logic App deployment
trigger:
branches:
include:
- main
- release/*
pool:
vmImage: 'ubuntu-latest'
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'Your-Azure-Connection'
subscriptionId: '$(subscriptionId)'
action: 'Create Or Update Resource Group'
resourceGroupName: '$(resourceGroupName)'
location: '$(location)'
templateLocation: 'Linked artifact'
csmFile: '$(System.DefaultWorkingDirectory)/arm-templates/logicapp-template.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/arm-templates/logicapp-parameters-$(Environment).json'
deploymentMode: 'Incremental'
When working with both Azure Logic Apps and Power Automate:
// Example Power Platform solution structure for Power Automate flows
{
"SolutionName": "MyEnterpriseFlows",
"Version": "1.0.0",
"Flows": [
{
"Name": "OrderProcessingFlow",
"Type": "Microsoft.Flow/flows",
"Properties": {
"DisplayName": "Order Processing Flow",
"DefinitionData": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"triggers": {
"When_a_new_order_is_created": {
"type": "ApiConnectionWebhook",
"inputs": {
"host": {
"connectionName": "shared_commondataserviceforapps",
"operationId": "SubscribeWebhookTrigger",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
}
}
}
},
"actions": {
// Actions would be defined here
}
}
}
}
]
}
This example demonstrates a Logic App that accepts an HTTP request, validates the input data, calls an external API, transforms the response, and returns a formatted result.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Validate_Input": {
"type": "If",
"expression": {
"and": [
{
"not": {
"equals": [
"@triggerBody()?['customerId']",
null
]
}
},
{
"not": {
"equals": [
"@triggerBody()?['requestType']",
null
]
}
}
]
},
"actions": {
"Get_Customer_Data": {
"type": "Http",
"inputs": {
"method": "GET",
"uri": "https://api.example.com/customers/@{triggerBody()?['customerId']}",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer @{body('Get_API_Key')?['value']}"
}
},
"runAfter": {
"Get_API_Key": [
"Succeeded"
]
}
},
"Get_API_Key": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['keyvault']['connectionId']"
}
},
"method": "get",
"path": "/secrets/@{encodeURIComponent('apiKey')}/value"
}
},
"Parse_Customer_Response": {
"type": "ParseJson",
"inputs": {
"content": "@body('Get_Customer_Data')",
"schema": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"email": { "type": "string" },
"status": { "type": "string" },
"createdDate": { "type": "string" },
"orders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"orderId": { "type": "string" },
"orderDate": { "type": "string" },
"amount": { "type": "number" }
}
}
}
}
}
},
"runAfter": {
"Get_Customer_Data": [
"Succeeded"
]
}
},
"Switch_Request_Type": {
"type": "Switch",
"expression": "@triggerBody()?['requestType']",
"cases": {
"Profile": {
"actions": {
"Prepare_Profile_Response": {
"type": "SetVariable",
"inputs": {
"name": "responsePayload",
"value": {
"customerId": "@body('Parse_Customer_Response')?['id']",
"customerName": "@body('Parse_Customer_Response')?['name']",
"email": "@body('Parse_Customer_Response')?['email']",
"status": "@body('Parse_Customer_Response')?['status']",
"memberSince": "@formatDateTime(body('Parse_Customer_Response')?['createdDate'], 'yyyy-MM-dd')"
}
}
}
}
},
"OrderSummary": {
"actions": {
"Calculate_Order_Statistics": {
"type": "Compose",
"inputs": {
"totalOrders": "@length(body('Parse_Customer_Response')?['orders'])",
"totalSpent": "@sum(body('Parse_Customer_Response')?['orders'], item => item.amount)",
"averageOrderValue": "@if(greater(length(body('Parse_Customer_Response')?['orders']), 0), div(sum(body('Parse_Customer_Response')?['orders'], item => item.amount), length(body('Parse_Customer_Response')?['orders'])), 0)",
"lastOrderDate": "@if(greater(length(body('Parse_Customer_Response')?['orders']), 0), max(body('Parse_Customer_Response')?['orders'], item => item.orderDate), '')"
}
},
"Prepare_Order_Response": {
"type": "SetVariable",
"inputs": {
"name": "responsePayload",
"value": {
"customerId": "@body('Parse_Customer_Response')?['id']",
"customerName": "@body('Parse_Customer_Response')?['name']",
"orderStats": "@outputs('Calculate_Order_Statistics')"
}
},
"runAfter": {
"Calculate_Order_Statistics": [
"Succeeded"
]
}
}
}
}
},
"default": {
"actions": {
"Set_Default_Response": {
"type": "SetVariable",
"inputs": {
"name": "responsePayload",
"value": {
"error": "Invalid request type specified",
"validTypes": [
"Profile",
"OrderSummary"
]
}
}
}
}
},
"runAfter": {
"Parse_Customer_Response": [
"Succeeded"
]
}
},
"Log_Successful_Request": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['applicationinsights']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "ApiRequestSuccess",
"CustomerId": "@triggerBody()?['customerId']",
"RequestType": "@triggerBody()?['requestType']",
"ProcessingTime": "@workflow()['run']['duration']"
}
},
"runAfter": {
"Switch_Request_Type": [
"Succeeded"
]
}
},
"Return_Success_Response": {
"type": "Response",
"kind": "Http",
"inputs": {
"statusCode": 200,
"body": "@variables('responsePayload')",
"headers": {
"Content-Type": "application/json"
}
},
"runAfter": {
"Log_Successful_Request": [
"Succeeded"
]
}
}
},
"else": {
"actions": {
"Return_Validation_Error": {
"type": "Response",
"kind": "Http",
"inputs": {
"statusCode": 400,
"body": {
"error": "Invalid request",
"message": "Request must include customerId and requestType",
"timestamp": "@utcNow()"
}
}
}
}
},
"runAfter": {
"Initialize_Response_Variable": [
"Succeeded"
]
}
},
"Initialize_Response_Variable": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "responsePayload",
"type": "object",
"value": {}
}
]
}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {
"type": "object",
"properties": {
"customerId": {
"type": "string"
},
"requestType": {
"type": "string",
"enum": [
"Profile",
"OrderSummary"
]
}
}
}
}
}
}
},
"parameters": {
"$connections": {
"value": {
"keyvault": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/keyvault",
"connectionName": "keyvault",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/keyvault"
},
"applicationinsights": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/applicationinsights",
"connectionName": "applicationinsights",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/applicationinsights"
}
}
}
}
}
This example demonstrates a Logic App that processes events from Azure Service Bus, handles the message processing with robust error handling, and implements the retry pattern for resilience.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Parse_Message": {
"type": "ParseJson",
"inputs": {
"content": "@triggerBody()?['ContentData']",
"schema": {
"type": "object",
"properties": {
"eventId": { "type": "string" },
"eventType": { "type": "string" },
"eventTime": { "type": "string" },
"dataVersion": { "type": "string" },
"data": {
"type": "object",
"properties": {
"orderId": { "type": "string" },
"customerId": { "type": "string" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"productId": { "type": "string" },
"quantity": { "type": "integer" },
"unitPrice": { "type": "number" }
}
}
}
}
}
}
}
},
"runAfter": {}
},
"Try_Process_Order": {
"type": "Scope",
"actions": {
"Get_Customer_Details": {
"type": "Http",
"inputs": {
"method": "GET",
"uri": "https://api.example.com/customers/@{body('Parse_Message')?['data']?['customerId']}",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer @{body('Get_API_Key')?['value']}"
}
},
"runAfter": {
"Get_API_Key": [
"Succeeded"
]
},
"retryPolicy": {
"type": "exponential",
"count": 5,
"interval": "PT10S",
"minimumInterval": "PT5S",
"maximumInterval": "PT1H"
}
},
"Get_API_Key": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['keyvault']['connectionId']"
}
},
"method": "get",
"path": "/secrets/@{encodeURIComponent('apiKey')}/value"
}
},
"Validate_Stock": {
"type": "Foreach",
"foreach": "@body('Parse_Message')?['data']?['items']",
"actions": {
"Check_Product_Stock": {
"type": "Http",
"inputs": {
"method": "GET",
"uri": "https://api.example.com/inventory/@{items('Validate_Stock')?['productId']}",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer @{body('Get_API_Key')?['value']}"
}
},
"retryPolicy": {
"type": "fixed",
"count": 3,
"interval": "PT15S"
}
},
"Verify_Availability": {
"type": "If",
"expression": {
"and": [
{
"greater": [
"@body('Check_Product_Stock')?['availableStock']",
"@items('Validate_Stock')?['quantity']"
]
}
]
},
"actions": {
"Add_To_Valid_Items": {
"type": "AppendToArrayVariable",
"inputs": {
"name": "validItems",
"value": {
"productId": "@items('Validate_Stock')?['productId']",
"quantity": "@items('Validate_Stock')?['quantity']",
"unitPrice": "@items('Validate_Stock')?['unitPrice']",
"availableStock": "@body('Check_Product_Stock')?['availableStock']"
}
}
}
},
"else": {
"actions": {
"Add_To_Invalid_Items": {
"type": "AppendToArrayVariable",
"inputs": {
"name": "invalidItems",
"value": {
"productId": "@items('Validate_Stock')?['productId']",
"requestedQuantity": "@items('Validate_Stock')?['quantity']",
"availableStock": "@body('Check_Product_Stock')?['availableStock']",
"reason": "Insufficient stock"
}
}
}
}
},
"runAfter": {
"Check_Product_Stock": [
"Succeeded"
]
}
}
},
"runAfter": {
"Get_Customer_Details": [
"Succeeded"
]
}
},
"Check_Order_Validity": {
"type": "If",
"expression": {
"and": [
{
"equals": [
"@length(variables('invalidItems'))",
0
]
},
{
"greater": [
"@length(variables('validItems'))",
0
]
}
]
},
"actions": {
"Process_Valid_Order": {
"type": "Http",
"inputs": {
"method": "POST",
"uri": "https://api.example.com/orders",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer @{body('Get_API_Key')?['value']}"
},
"body": {
"orderId": "@body('Parse_Message')?['data']?['orderId']",
"customerId": "@body('Parse_Message')?['data']?['customerId']",
"customerName": "@body('Get_Customer_Details')?['name']",
"items": "@variables('validItems')",
"processedTime": "@utcNow()",
"eventId": "@body('Parse_Message')?['eventId']"
}
}
},
"Send_Order_Confirmation": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail",
"body": {
"To": "@body('Get_Customer_Details')?['email']",
"Subject": "Order Confirmation: @{body('Parse_Message')?['data']?['orderId']}",
"Body": "<p>Dear @{body('Get_Customer_Details')?['name']},</p><p>Your order has been successfully processed.</p><p>Order ID: @{body('Parse_Message')?['data']?['orderId']}</p><p>Thank you for your business!</p>",
"Importance": "Normal",
"IsHtml": true
}
},
"runAfter": {
"Process_Valid_Order": [
"Succeeded"
]
}
},
"Complete_Message": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['servicebus']['connectionId']"
}
},
"method": "post",
"path": "/messages/complete",
"body": {
"lockToken": "@triggerBody()?['LockToken']",
"sessionId": "@triggerBody()?['SessionId']",
"queueName": "@parameters('serviceBusQueueName')"
}
},
"runAfter": {
"Send_Order_Confirmation": [
"Succeeded"
]
}
}
},
"else": {
"actions": {
"Send_Invalid_Stock_Notification": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail",
"body": {
"To": "@body('Get_Customer_Details')?['email']",
"Subject": "Order Cannot Be Processed: @{body('Parse_Message')?['data']?['orderId']}",
"Body": "<p>Dear @{body('Get_Customer_Details')?['name']},</p><p>We regret to inform you that your order cannot be processed due to insufficient stock for the following items:</p><p>@{join(variables('invalidItems'), '</p><p>')}</p><p>Please adjust your order and try again.</p>",
"Importance": "High",
"IsHtml": true
}
}
},
"Dead_Letter_Message": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['servicebus']['connectionId']"
}
},
"method": "post",
"path": "/messages/deadletter",
"body": {
"lockToken": "@triggerBody()?['LockToken']",
"sessionId": "@triggerBody()?['SessionId']",
"queueName": "@parameters('serviceBusQueueName')",
"deadLetterReason": "InsufficientStock",
"deadLetterDescription": "Order contained items with insufficient stock"
}
},
"runAfter": {
"Send_Invalid_Stock_Notification": [
"Succeeded"
]
}
}
}
},
"runAfter": {
"Validate_Stock": [
"Succeeded"
]
}
}
},
"runAfter": {
"Initialize_Variables": [
"Succeeded"
]
}
},
"Initialize_Variables": {
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "validItems",
"type": "array",
"value": []
},
{
"name": "invalidItems",
"type": "array",
"value": []
}
]
},
"runAfter": {
"Parse_Message": [
"Succeeded"
]
}
},
"Handle_Process_Error": {
"type": "Scope",
"actions": {
"Log_Error_Details": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['applicationinsights']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "OrderProcessingError",
"EventId": "@body('Parse_Message')?['eventId']",
"OrderId": "@body('Parse_Message')?['data']?['orderId']",
"CustomerId": "@body('Parse_Message')?['data']?['customerId']",
"ErrorDetails": "@result('Try_Process_Order')",
"Timestamp": "@utcNow()"
}
}
},
"Abandon_Message": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['servicebus']['connectionId']"
}
},
"method": "post",
"path": "/messages/abandon",
"body": {
"lockToken": "@triggerBody()?['LockToken']",
"sessionId": "@triggerBody()?['SessionId']",
"queueName": "@parameters('serviceBusQueueName')"
}
},
"runAfter": {
"Log_Error_Details": [
"Succeeded"
]
}
},
"Send_Alert_To_Operations": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail",
"body": {
"To": "[email protected]",
"Subject": "Order Processing Error: @{body('Parse_Message')?['data']?['orderId']}",
"Body": "<p>An error occurred while processing an order:</p><p>Order ID: @{body('Parse_Message')?['data']?['orderId']}</p><p>Customer ID: @{body('Parse_Message')?['data']?['customerId']}</p><p>Error: @{result('Try_Process_Order')}</p>",
"Importance": "High",
"IsHtml": true
}
},
"runAfter": {
"Abandon_Message": [
"Succeeded"
]
}
}
},
"runAfter": {
"Try_Process_Order": [
"Failed",
"TimedOut"
]
}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
},
"serviceBusQueueName": {
"type": "string",
"defaultValue": "orders"
}
},
"triggers": {
"When_a_message_is_received_in_a_queue": {
"type": "ApiConnectionWebhook",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['servicebus']['connectionId']"
}
},
"body": {
"isSessionsEnabled": true
},
"path": "/subscriptionListener",
"queries": {
"queueName": "@parameters('serviceBusQueueName')",
"subscriptionType": "Main"
}
}
}
}
},
"parameters": {
"$connections": {
"value": {
"keyvault": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/keyvault",
"connectionName": "keyvault",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/keyvault"
},
"servicebus": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/servicebus",
"connectionName": "servicebus",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/servicebus"
},
"office365": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/office365",
"connectionName": "office365",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/office365"
},
"applicationinsights": {
"connectionId": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/connections/applicationinsights",
"connectionName": "applicationinsights",
"id": "/subscriptions/{subscription-id}/providers/Microsoft.Web/locations/{location}/managedApis/applicationinsights"
}
}
}
}
}
Implement a multi-layered exception handling approach for robust workflows:
Preventative Measures:
coalesce() and ? operatorsRuntime Error Handling:
"Process_With_Comprehensive_Error_Handling": {
"type": "Scope",
"actions": {
"Try_Primary_Action": {
"type": "Scope",
"actions": {
"Main_Operation": {
"type": "Http",
"inputs": { "method": "GET", "uri": "https://api.example.com/resource" }
}
}
},
"Handle_Connection_Errors": {
"type": "Scope",
"actions": {
"Log_Connection_Error": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['loganalytics']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "ConnectionError",
"ErrorCategory": "Network",
"StatusCode": "@{result('Try_Primary_Action')?['outputs']?['Main_Operation']?['statusCode']}",
"ErrorMessage": "@{result('Try_Primary_Action')?['error']?['message']}"
}
}
},
"Invoke_Fallback_Endpoint": {
"type": "Http",
"inputs": { "method": "GET", "uri": "https://fallback-api.example.com/resource" }
}
},
"runAfter": {
"Try_Primary_Action": ["Failed"]
}
},
"Handle_Business_Logic_Errors": {
"type": "Scope",
"actions": {
"Parse_Error_Response": {
"type": "ParseJson",
"inputs": {
"content": "@outputs('Try_Primary_Action')?['Main_Operation']?['body']",
"schema": {
"type": "object",
"properties": {
"errorCode": { "type": "string" },
"errorMessage": { "type": "string" }
}
}
}
},
"Switch_On_Error_Type": {
"type": "Switch",
"expression": "@body('Parse_Error_Response')?['errorCode']",
"cases": {
"ResourceNotFound": {
"actions": { "Create_Resource": { "type": "Http", "inputs": {} } }
},
"ValidationError": {
"actions": { "Resubmit_With_Defaults": { "type": "Http", "inputs": {} } }
},
"PermissionDenied": {
"actions": { "Elevate_Permissions": { "type": "Http", "inputs": {} } }
}
},
"default": {
"actions": { "Send_To_Support_Queue": { "type": "ApiConnection", "inputs": {} } }
}
}
},
"runAfter": {
"Try_Primary_Action": ["Succeeded"]
}
}
}
}
Implement a comprehensive monitoring strategy that covers:
Operational Monitoring:
Business Process Monitoring:
Alerting Strategy:
"Monitor_Transaction_SLA": {
"type": "Scope",
"actions": {
"Calculate_Processing_Time": {
"type": "Compose",
"inputs": "@{div(sub(ticks(utcNow()), ticks(triggerBody()?['startTime'])), 10000000)}"
},
"Check_SLA_Breach": {
"type": "If",
"expression": "@greater(outputs('Calculate_Processing_Time'), parameters('slaThresholdSeconds'))",
"actions": {
"Log_SLA_Breach": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['loganalytics']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "SLABreach",
"TransactionId": "@{triggerBody()?['transactionId']}",
"ProcessingTimeSeconds": "@{outputs('Calculate_Processing_Time')}",
"SLAThresholdSeconds": "@{parameters('slaThresholdSeconds')}",
"BreachSeverity": "@if(greater(outputs('Calculate_Processing_Time'), mul(parameters('slaThresholdSeconds'), 2)), 'Critical', 'Warning')"
}
}
},
"Send_SLA_Alert": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['teams']['connectionId']"
}
},
"method": "post",
"body": {
"notificationTitle": "SLA Breach Alert",
"message": "Transaction @{triggerBody()?['transactionId']} exceeded SLA by @{sub(outputs('Calculate_Processing_Time'), parameters('slaThresholdSeconds'))} seconds",
"channelId": "@{if(greater(outputs('Calculate_Processing_Time'), mul(parameters('slaThresholdSeconds'), 2)), parameters('criticalAlertChannelId'), parameters('warningAlertChannelId'))}"
}
}
}
}
}
}
}
Integrate Logic Apps with Azure API Management for enhanced security, governance, and management:
<!-- Logic App API Policy Example -->
<policies>
<inbound>
<!-- Authentication -->
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized">
<openid-config url="https://login.microsoftonline.com/{tenant-id}/.well-known/openid-configuration" />
<required-claims>
<claim name="aud" match="any">
<value>api://mylogicapp</value>
</claim>
</required-claims>
</validate-jwt>
<!-- Rate limiting -->
<rate-limit calls="5" renewal-period="60" />
<!-- Request transformation -->
<set-header name="Correlation-Id" exists-action="override">
<value>@(context.RequestId)</value>
</set-header>
<!-- Logging -->
<log-to-eventhub logger-id="api-logger">
@{
return new JObject(
new JProperty("correlationId", context.RequestId),
new JProperty("api", context.Api.Name),
new JProperty("operation", context.Operation.Name),
new JProperty("user", context.User.Email),
new JProperty("ip", context.Request.IpAddress)
).ToString();
}
</log-to-eventhub>
</inbound>
<backend>
<forward-request />
</backend>
<outbound>
<!-- Response transformation -->
<set-header name="X-Powered-By" exists-action="delete" />
</outbound>
<on-error>
<base />
</on-error>
</policies>
"triggers": {
"manual": {
"type": "Request",
"kind": "Http",
"inputs": {
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"customerId": {
"type": "string",
"description": "The unique identifier for the customer"
},
"requestType": {
"type": "string",
"enum": ["Profile", "OrderSummary"],
"description": "The type of request to process"
}
},
"required": ["customerId", "requestType"]
},
"method": "POST"
}
}
}
Implement robust versioning approaches for Logic Apps and Power Automate flows:
URI Path Versioning:
Parameter Versioning:
Side-by-Side Versioning:
"actions": {
"Check_Request_Version": {
"type": "Switch",
"expression": "@triggerBody()?['apiVersion']",
"cases": {
"1.0": {
"actions": {
"Process_V1_Format": {
"type": "Scope",
"actions": { }
}
}
},
"2.0": {
"actions": {
"Process_V2_Format": {
"type": "Scope",
"actions": { }
}
}
}
},
"default": {
"actions": {
"Return_Version_Error": {
"type": "Response",
"kind": "Http",
"inputs": {
"statusCode": 400,
"body": {
"error": "Unsupported API version",
"supportedVersions": ["1.0", "2.0"]
}
}
}
}
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"type": "string",
"metadata": {
"description": "Base name of the Logic App"
}
},
"version": {
"type": "string",
"metadata": {
"description": "Version of the Logic App to deploy"
},
"allowedValues": ["v1", "v2", "v3"]
}
},
"variables": {
"fullLogicAppName": "[concat(parameters('logicAppName'), '-', parameters('version'))]",
"workflowDefinitionMap": {
"v1": "[variables('v1Definition')]",
"v2": "[variables('v2Definition')]",
"v3": "[variables('v3Definition')]"
},
"v1Definition": {},
"v2Definition": {},
"v3Definition": {}
},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2019-05-01",
"name": "[variables('fullLogicAppName')]",
"location": "[resourceGroup().location]",
"properties": {
"definition": "[variables('workflowDefinitionMap')[parameters('version')]]"
}
}
]
}
Implement strategies to optimize the cost of Logic Apps and Power Automate solutions:
Trigger Optimization:
Action Optimization:
Data Transfer Optimization:
App Service Plan Selection:
Resource Sharing:
License Type Selection:
API Call Reduction:
"Monitor_Execution_Costs": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['loganalytics']['connectionId']"
}
},
"method": "post",
"body": {
"LogType": "WorkflowCostMetrics",
"WorkflowName": "@{workflow().name}",
"ExecutionId": "@{workflow().run.id}",
"ActionCount": "@{length(workflow().run.actions)}",
"TriggerType": "@{workflow().triggers[0].kind}",
"DataProcessedBytes": "@{workflow().run.transferred}",
"ExecutionDurationSeconds": "@{div(workflow().run.duration, 'PT1S')}",
"Timestamp": "@{utcNow()}"
}
},
"runAfter": {
"Main_Workflow_Actions": ["Succeeded", "Failed", "TimedOut"]
}
}
Implement comprehensive security measures for Logic Apps and Power Automate workflows:
Data Classification and Protection:
Secure Parameter Handling:
"actions": {
"Get_Database_Credentials": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['keyvault']['connectionId']"
}
},
"method": "get",
"path": "/secrets/@{encodeURIComponent('database-connection-string')}/value"
}
},
"Execute_Database_Query": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sql']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/query",
"body": {
"query": "SELECT * FROM Customers WHERE CustomerId = @CustomerId",
"parameters": {
"CustomerId": "@triggerBody()?['customerId']"
},
"connectionString": "@body('Get_Database_Credentials')?['value']"
}
},
"runAfter": {
"Get_Database_Credentials": ["Succeeded"]
}
}
}
Fine-grained Access Control:
Access Reviews and Governance:
Network Security:
{
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2019-05-01",
"name": "[parameters('logicAppName')]",
"location": "[parameters('location')]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"accessControl": {
"triggers": {
"allowedCallerIpAddresses": [
{
"addressRange": "13.91.0.0/16"
},
{
"addressRange": "40.112.0.0/13"
}
]
},
"contents": {
"allowedCallerIpAddresses": [
{
"addressRange": "13.91.0.0/16"
},
{
"addressRange": "40.112.0.0/13"
}
]
},
"actions": {
"allowedCallerIpAddresses": [
{
"addressRange": "13.91.0.0/16"
},
{
"addressRange": "40.112.0.0/13"
}
]
}
},
"definition": {}
}
}
]
}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job