Microsoft Power Platform

Power Automate Expense Approval with Corules Validation

Add Corules policy validation to Power Automate expense approval flows via the Corules Custom Connector. Expense reports are validated before routing — eliminating manual out-of-policy approvals.

Das Problem

Add Corules policy validation to Power Automate expense approval flows via the Corules Custom Connector. Expense reports are validated before routing — eliminating manual out-of-policy approvals.

Einrichtungsschritte

  1. 1

    Import the Corules Custom Connector into your Power Platform environment

  2. 2

    Configure the connector with your tenant API key and base URL

  3. 3

    In your expense approval Flow, add a Corules 'Validate Decision' action after the form submission trigger

  4. 4

    Map expense fields (amount, category, receipt_present, business_purpose) to the Corules context schema

  5. 5

    Add a Switch on the outcome: ALLOW → notify manager for awareness, ESCALATE → route to finance, BLOCK → reject with reason

Codebeispiel

// Power Automate HTTP action to Corules
{
  "method": "POST",
  "uri": "https://api.corules.com/v1/validate",
  "headers": {
    "Authorization": "Bearer @{variables('CorulesApiKey')}",
    "X-Tenant-Id": "@{variables('TenantId')}",
    "X-Correlation-Id": "@{triggerOutputs()?['headers']?['x-ms-workflow-run-id']}"
  },
  "body": {
    "use_case": "expense_approval",
    "actor": "@{triggerBody()?['submitter_email']}",
    "context": {
      "amount": "@{triggerBody()?['amount']}",
      "category": "@{triggerBody()?['category']}",
      "receipt_present": "@{triggerBody()?['receipt_url'] != null}",
      "business_purpose": "@{triggerBody()?['business_purpose']}"
    },
    "decision": {
      "approve": true
    }
  }
}

Frequently Asked Questions

Does this require a developer to set up?

No. The Custom Connector import and Flow configuration are no-code. IT admins can set up the connector; business analysts configure the Flow.

Can the expense categories and limits be updated without changing the Flow?

Yes. Category limits are Corules parameters. Update them in the Corules admin console — the Flow does not change.

Hören Sie auf, KI auf Vorschläge zu beschränken.

Kostenlos starten