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.
Overview
This integration connects Microsoft Power Platform with Corules's policy enforcement runtime. Your existing Microsoft Power Platform workflows call Corules's REST API (or MCP server) to enforce policy constraints before any business action completes.
All policy logic stays in Corules — your Microsoft Power Platform configuration only needs to call the endpoint and route based on the ALLOW / BLOCK / ESCALATE response.
Setup steps
- 1
Import the Corules Custom Connector into your Power Platform environment
- 2
Configure the connector with your tenant API key and base URL
- 3
In your expense approval Flow, add a Corules 'Validate Decision' action after the form submission trigger
- 4
Map expense fields (amount, category, receipt_present, business_purpose) to the Corules context schema
- 5
Add a Switch on the outcome: ALLOW → notify manager for awareness, ESCALATE → route to finance, BLOCK → reject with reason
Code example
The following snippet shows how to call Corules from Microsoft Power Platform. Replace YOUR_USE_CASE_ID and YOUR_API_KEY with your tenant credentials.
// 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
}
}
}Language: json
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.
Connect Microsoft Power Platform to Corules
Start free — integration templates are available on every plan.
Get started free