Business Professionals
Power BI | Power Pivot | Power Query | DAX
Cloud Flows | RPA | AI Builder | Copilot
60+ Formulas | Data Stories | Advanced Reporting & Modeling
VB Programming | Report Automation |
MS-Office Automation
Techno-Business Professionals
Power BI | Power Query | Advanced DAX | SQL - Query &
Programming
Microsoft Fabric | Power BI | Power Query | Advanced DAX |
SQL - Query & Programming
Power BI | Power Apps | Power Automate | Copilot Studio | Power Pages | Dataverse
Microsoft Power Apps | Microsoft Power Automate
Power BI | Adv. DAX | SQL (Query & Programming) |
VBA | Python | Web Scrapping | API Integration
Power BI | Power Apps | Power Automate |
SQL (Query & Programming)
Power BI | Adv. DAX | Power Apps | Power Automate |
SQL (Query & Programming) | VBA | Python | Web Scrapping | API Integration
Power Apps | Power Automate | SQL | VBA | Python |
Web Scraping | RPA | API Integration
Technology Professionals
Power BI | DAX | SQL | ETL with SSIS | SSAS | VBA | Python
Power BI | SQL | Azure Data Lake | Synapse Analytics |
Data Factory | Databricks | Power Apps | Power Automate |
Azure Analysis Services
Microsoft Fabric | Power BI | SQL | Lakehouse |
Data Factory (Pipelines) | Dataflows Gen2 | KQL | Delta Tables | Power Apps | Power Automate
Power BI | Power Apps | Power Automate | SQL | VBA | Python | API Integration
Power BI | Advanced DAX | Databricks | SQL | Lakehouse Architecture
Business Professionals
Power BI | Power Pivot | Power Query | DAX
Cloud Flows | RPA | AI Builder | Copilot
60+ Formulas | Data Stories | Advanced Reporting & Modeling
VB Programming | Report Automation |
MS-Office Automation
Techno-Business Professionals
Power BI | Power Query | Advanced DAX | SQL - Query &
Programming
Microsoft Fabric | Power BI | Power Query | Advanced DAX |
SQL - Query & Programming
Power BI | Power Apps | Power Automate | Copilot Studio | Power Pages | Dataverse
Microsoft Power Apps | Microsoft Power Automate
Power BI | Adv. DAX | SQL (Query & Programming) |
VBA | Web Scrapping | API Integration
Power BI | Power Apps | Power Automate |
SQL (Query & Programming)
Power BI | Adv. DAX | Power Apps | Power Automate |
SQL (Query & Programming) | VBA | Web Scrapping | API Integration
Power Apps | Power Automate | SQL | VBA |
Web Scraping | RPA | API Integration
Technology Professionals
Power BI | DAX | SQL | ETL with SSIS | SSAS | VBA
Power BI | SQL | Azure Data Lake | Synapse Analytics |
Data Factory | Azure Analysis Services
Microsoft Fabric | Power BI | SQL | Lakehouse |
Data Factory (Pipelines) | Dataflows Gen2 | KQL | Delta Tables
Power BI | Power Apps | Power Automate | SQL | VBA | API Integration
Power BI | Advanced DAX | Databricks | SQL | Lakehouse Architecture
LEARN THIS HANDS ON
Power Apps & Power Automate
Finance and HR approvals can’t afford duplicate payments, lost requests, or stuck workflows. This guide shows how to design reliable Power Automate flows for finance and HR approvals using idempotency, retries, and robust error handling patterns.
We’ll walk through concrete patterns, expressions, and design choices you can apply today. If you want to go beyond single flows and design end‑to‑end automated processes across departments, structured training in business process automation skills can help you scale these ideas safely.
Approval flows for finance and HR have a few traits that make reliability non‑negotiable:
Because of this, you need flows that:
The rest of this article focuses on patterns that support those three goals.
Idempotency means: running the same operation multiple times has the same effect as running it once.
In Power Automate terms: if your flow gets triggered twice for the same approval, it must not:
First, choose a business key that uniquely identifies the approval case. Examples:
ExpenseReportIdInvoiceNumber + VendorIdEmployeeId + ChangeRequestIdStore this key in every system you touch:
Before committing any side‑effect (posting, paying, updating HR data), add a guard step:
Example for a SharePoint‑backed approval list:
BusinessKey (single line of text).Status (e.g. Pending, Approved, PostedToERP).Pattern in the flow:
BusinessKey (if not already stored).BusinessKey eq '<key>' and Status eq 'PostedToERP'.length(body('Get_items')?['value']) is greater than 0 → Terminate (already processed).Expression example:
length(body('Get_items')?['value'])
If greater than 0, you know this business key has already been posted.
After you successfully call the downstream system (ERP, HR, payroll):
Status = 'PostedToERP' and store:
This makes your guard check effective on re‑runs.
When calling external APIs, try to:
Finance and HR flows often call:
These fail transiently more often than you’d like. The default retry behaviour in Power Automate is helpful, but not always sufficient.
Power Automate automatically retries many connector actions on transient errors. For idempotent operations (e.g. GET, status checks), this is usually fine.
Use built‑in retries when:
Add your own retry logic for:
A simple retry pattern using Do until:
Initialize variables:
retryCount = 0maxRetries = 3lastStatus = 'Pending'Use Do until with condition: or(equals(variables('lastStatus'),'Success'), greaterOrEquals(variables('retryCount'), variables('maxRetries'))).
Inside the loop:
lastStatus = 'Success'.retryCount.Example expressions:
or(
equals(variables('lastStatus'), 'Success'),
greaterOrEquals(variables('retryCount'), variables('maxRetries'))
)
Increment retry count:
add(variables('retryCount'), 1)
This pattern gives you:
Error handling for approvals is about containment and clarity:
Use Scopes to group related actions and handle errors cleanly.
Basic structure:
Main ProcessingOn ErrorConfigure On Error scope to run after Main Processing only on has failed, has timed out, or is skipped.
Inside On Error:
Error.Example for capturing error details in a Compose action in On Error scope:
concat(
'Flow: ', workflow()?['name'], '
',
'Run ID: ', workflow()?['run']?['name'], '
',
'Error time: ', utcNow(), '
',
'Business key: ', variables('BusinessKey'), '
'
)
You can extend this with outputs() from the failed action if needed.
Finance and HR approvers should never see raw connector error messages.
Instead, for any user‑facing notification:
Example email body:
Your approval for invoice 12345 (Vendor: ABC AS) was recorded, but posting to the finance system failed. The finance team has been notified and will re‑process this invoice. You do not need to approve it again.
Behind the scenes, you’ve:
Error – Awaiting Reprocessing.You will need to re‑run flows for specific approvals. Design for it.
Approach:
Reprocess Approval.Error – Awaiting Reprocessing, re‑executes the posting logic.This gives finance/HR or IT a controlled way to fix issues without touching data manually in multiple systems.
For finance and HR, logging is not just for debugging – it’s for audit.
At minimum, log:
Common options:
Whatever you choose, keep it consistent across finance and HR flows so reporting and auditing are straightforward.
If you’re logging to SQL via the SQL connector, a simple INSERT pattern is often enough.
Example INSERT statement (parameterised via action inputs):
INSERT INTO ApprovalLog
( BusinessKey,
FlowName,
RunId,
Requestor,
Approver,
Decision,
Status,
ExternalReference,
CreatedOn,
LastUpdatedOn )
VALUES
( @BusinessKey,
@FlowName,
@RunId,
@Requestor,
@Approver,
@Decision,
@Status,
GETUTCDATE(),
GETUTCDATE() );
You can call this from Power Automate’s SQL action with parameters mapped from dynamic content.
Idempotency and error handling are easier when the approval model is clean.
Avoid flows that both:
Instead:
Flow A: Approval Flow
Flow B: Execution Flow
Approved.Benefits:
For multi‑level approvals (e.g. line manager then finance controller):
Approved when all required steps are complete.This makes audit trails and troubleshooting much easier.
Before you build your next finance or HR approval flow, start by defining a business key and designing the idempotent guard around it. Once you have that in place, add retries and error handling on top – your flows will be safer to re‑run, easier to support, and far less likely to create duplicate payments or inconsistent HR records.
Power Automate
New
Next Batches Now Live
Power BI
SQL
Power Apps
Power Automate
Microsoft Fabrics
Azure Data Engineering