flowto.sh
BI Team · power-automate
json ndjson tmdl power-automate

Power Automate Approval & Error Scope Flow

Canonical Azure Logic Apps / Power Automate workflow definition with manual HTTP trigger, approval Condition, Scope container, and runAfter Failed error handler.

Launch in JSON Workbench Open in jq Filter
power-automate-approval-flow (json)
{
  "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
  "contentVersion": "1.0.0.0",
  "triggers": {
    "manual": {
      "type": "Request",
      "kind": "Http"
    }
  },
  "actions": {
    "Try_Approval_Scope": {
      "type": "Scope",
      "actions": {
        "Start_and_wait_for_an_approval": {
          "type": "OpenApiConnectionWebhook",
          "runAfter": {}
        },
        "Check_Outcome": {
          "type": "If",
          "expression": {
            "equals": [
              "@outputs('Start_and_wait_for_an_approval')?['body/outcome']",
              "Approve"
            ]
          },
          "actions": {
            "Update_Record_Approved": {
              "type": "OpenApiConnection",
              "runAfter": {}
            }
          },
          "else": {
            "actions": {
              "Notify_Rejection": {
                "type": "OpenApiConnection",
                "runAfter": {}
              }
            }
          },
          "runAfter": {
            "Start_and_wait_for_an_approval": [
              "Succeeded"
            ]
          }
        }
      },
      "runAfter": {}
    },
    "Catch_Failure_Alert": {
      "type": "OpenApiConnection",
      "runAfter": {
        "Try_Approval_Scope": [
          "Failed",
          "TimedOut"
        ]
      }
    }
  }
}

Paste this definition into /json or /jq to inspect its triggers, actions, Scope nesting, and runAfter (Succeeded vs Failed/TimedOut) execution edges.