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
Most Romanian finance teams now receive e-Factura invoices as XML, then manually copy values into Excel or an ERP just to archive and reconcile them. The files are structured but stuck in a document workflow. This walkthrough shows how to use Power Automate to parse e-Factura XML and turn every invoice into a clean row of data, ready for long‑term archiving or downstream processing.
You have:
No Power BI, no data warehouse. Just:
We’ll build a flow that:
xml() in an expression.The focus is on robust parsing and repeatable extraction, not on visualization.
Romania’s e-Factura is based on EN16931 / UBL 2.1. You’ll typically see an XML root like:
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID>INV-2026-000123</cbc:ID>
<cbc:IssueDate>2026-10-15</cbc:IssueDate>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Supplier SRL</cbc:RegistrationName>
</cac:PartyLegalEntity>
<cac:PartyTaxScheme>
<cbc:CompanyID>RO12345678</cbc:CompanyID>
</cac:PartyTaxScheme>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:LegalMonetaryTotal>
<cbc:PayableAmount currencyID="RON">1190.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
</Invoice>
Key points for Power Automate:
cbc:, cac: prefixes and a default xmlns on the root).xml() function converts this into a JSON object where:
@ (e.g. @currencyID).Invoice) becomes the top-level property in the JSON.We’ll lean on this predictable structure to safely extract the fields we need.
We’ll implement the scenario with a single automated cloud flow.
Use the SharePoint connector:
Optional but recommended:
.xml:
endsWith(triggerOutputs()?['body/{FilenameWithExtension}'], '.xml')This avoids trying to parse PDFs or other attachments.
Add action:
Identifier from the trigger.This gives you a File content field which is the raw XML as text.
xml()Power Automate has a built-in xml() expression that parses XML into a JSON object.
Add a Compose action:
Parse XML to JSONxml(body('Get_file_content')?['$content'])
Notes:
$content property of the body; passing the entire body object to xml() will fail, so you must reference body('Get_file_content')?['$content'].xml() returns a JSON object. Downstream actions can access it via outputs('Parse_XML_to_JSON').If your flow uses a different connector (e.g. Outlook) you’d adapt the expression to the specific field that contains the XML string, but the pattern is the same.
Before you start writing expressions, run the flow once with a sample e-Factura file, then:
You should see a structure similar to:
{
"Invoice": {
"cbc:ID": "INV-2026-000123",
"cbc:IssueDate": "2026-10-15",
"cac:AccountingSupplierParty": {
"cac:Party": {
"cac:PartyLegalEntity": {
"cbc:RegistrationName": "Supplier SRL"
},
"cac:PartyTaxScheme": {
"cbc:CompanyID": "RO12345678"
}
}
},
"cac:LegalMonetaryTotal": {
"cbc:PayableAmount": {
"@currencyID": "RON",
"#text": "1190.00"
}
}
}
}
The exact namespaces may vary slightly, but you’ll see the same pattern:
Invoice.cac: components.@... and element text as #text when the element has attributes.We’ll use this JSON path in expressions to extract fields.
For the archiving use case, most teams care about:
We’ll create Compose actions for each field, then map them into a SharePoint list item.
Add a Compose action:
Invoice IDoutputs('Parse_XML_to_JSON')?['Invoice']?['cbc:ID']
This uses safe navigation (?) so a missing property returns null instead of failing the run.
Add Compose:
Issue Dateoutputs('Parse_XML_to_JSON')?['Invoice']?['cbc:IssueDate']
If you want to normalize to a specific format, you can wrap this in formatDateTime() later when writing to the list.
Add Compose:
Supplier Nameoutputs('Parse_XML_to_JSON')?['Invoice']?['cac:AccountingSupplierParty']?['cac:Party']?['cac:PartyLegalEntity']?['cbc:RegistrationName']
This path matches the typical UBL structure used by e-Factura.
Add Compose:
Supplier VAToutputs('Parse_XML_to_JSON')?['Invoice']?['cac:AccountingSupplierParty']?['cac:Party']?['cac:PartyTaxScheme']?['cbc:CompanyID']
If your sample XML uses a different element for the VAT ID, adjust the path based on your inspected JSON.
In UBL, monetary elements with attributes are represented as objects with @ and #text keys.
Add Compose:
Total Amountoutputs('Parse_XML_to_JSON')?['Invoice']?['cac:LegalMonetaryTotal']?['cbc:PayableAmount']?['#text']
Add Compose:
Currencyoutputs('Parse_XML_to_JSON')?['Invoice']?['cac:LegalMonetaryTotal']?['cbc:PayableAmount']?['@currencyID']
If your e-Factura files use a different element for totals (for example, if you need tax-exclusive amount instead), inspect the JSON and update the path accordingly.
Create a SharePoint list for your archive, e.g. e-Factura Archive, with columns:
Title (default) – use for invoice ID or a composite key.IssueDate (Date and Time).SupplierName (Single line of text).SupplierVAT (Single line of text).TotalAmount (Number).Currency (Single line of text).In the flow, add action:
Configure:
e-Factura Archive.Map fields:
Title:outputs('Invoice_ID')
IssueDate (if SharePoint expects a date string):formatDateTime(outputs('Issue_Date'), 'yyyy-MM-dd')
SupplierName:outputs('Supplier_Name')
SupplierVAT:outputs('Supplier_VAT')
TotalAmount:outputs('Total_Amount')
Currency:outputs('Currency')
Use the dynamic content picker or switch to expressions to reference the outputs of the Compose actions. The names in the expressions must match the action names in your flow.
At this point, every new e-Factura XML dropped into the SharePoint library produces one row in the archive list.
Real-world e-Factura files are not always identical. You’ll see:
Power Automate’s behaviour is deterministic here:
xml() fails if the input is not well‑formed XML.? causes a runtime error.Add a Scope around the parsing and extraction actions, and configure run after on a fallback path.
Example pattern:
Parse and extract invoice – contains Parse XML to JSON and all Compose actions.On parse failure – contains logging or notification actions.Set On parse failure scope to run after Parse and extract invoice with the has failed condition.
Within On parse failure, you can:
Using ? in expressions already prevents hard failures for missing fields. For example, if cbc:CompanyID is missing, outputs('Supplier_VAT') will be null.
If you want a default value, wrap the expression in coalesce():
coalesce(
outputs('Supplier_VAT'),
'UNKNOWN'
)
Use this in the Create item action instead of the raw output.
If you ever receive a batch file with multiple Invoice elements under a root, xml() will return an array for that property. In that case, you’d:
Invoices or multiple Invoice entries).Create item actions inside the loop, adjusting paths to the current item.The core pattern (JSON path extraction, safe navigation, writing rows) stays the same.
For typical monthly volumes of e-Factura XML in a mid‑size team, the described approach is well within Power Automate’s standard limits.
A few practical tips:
xml() output is already a JSON object; you can access it directly via expressions. Adding Parse JSON here adds maintenance overhead without functional benefit.In our scenario, this means the finance team can:
When you need to archive e-Factura invoices as structured data, you don’t need a BI stack; a single Power Automate flow that uses xml() and careful JSON path expressions is enough to reliably turn every XML invoice into a row in SharePoint or Dataverse, ready for whatever your finance team wants to do next.
This article reflects a growing pattern of finance and operations teams using Power Automate to turn Romania’s e-Factura XML streams into maintainable, row-based archives directly in SharePoint or Dataverse, without involving heavier BI tooling.
Professionals who want to apply these patterns to their own data can explore Excelgoodies' Power Automate Course programme - taught live by instructors, with certification awarded once a real project is running at work.
Insights compiled through ongoing industry research and discussions within the Excelgoodies Analytics Community.
Power Automate
New
Next Batches Now Live
Power BI
SQL
Power Apps
Power Automate
Microsoft Fabrics
Azure Data Engineering