AI-Receipt Parser in Power Automate
AI-Receipt Parser is a Power Automate action by PDF4me that reads a receipt PDF or image and returns merchant details, line items, financial totals, and payment method as structured data. Use it to automate expense capture, feed Excel or Power BI expense tracking, or post transactions straight into Dynamics 365 without manual keying.
What this action does
PDF4me AI-Receipt Parser reads a receipt (PDF, PNG, JPG, or JPEG) and returns merchant information, line items, financial totals, and payment method as structured JSON. It also recognizes specialized fields for hotel, fuel and energy, healthcare, and training receipts, and can extract additional custom fields beyond the standard schema.
How Do I Authenticate My Power Automate Flow?
To call PDF4me through Power Automate, the flow needs a valid PDF4me API key on the PDF4me Connect connector. Authentication ensures secure communication and validates your identity as an authorized user.
Important Facts You Should Not Miss
File Content and Body/Document/Name, not "Receipt File Content" or "Receipt Name". Map the receipt bytes into File Content.Body/receiptType, Body/analyzeItems, Body/extractMerchantInfo, Body/calculateTotals, and Body/customFieldKeys are all under Advanced parameters, confirmed in the screenshot as "Showing 5 of 5".success: true with a populated warnings array or fallbackUsed: true. Branch these to manual review instead of auto-posting totals.
The main panel shows only File Content and Body/Document/Name; every extraction toggle is an Advanced parameter.
Parameters
Required in the action: File Content and Body/Document/Name. All other fields are Optional Advanced parameters with working defaults.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Required | Binary content of the receipt file, mapped from a previous action (Get file content, SharePoint, OneDrive, email attachment). Supports .pdf, .png, .jpg, .jpeg. | body('Get_file_content') |
| Body/Document/Name | Required | Filename of the receipt including its extension. Used for format detection and processing. | receipt_2026_07_07.pdf |
| Body/receiptType (Advanced) | Optional | Improves parsing accuracy for a known category: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, or generic. | hotel |
| Body/analyzeItems (Advanced) | Optional | Yes extracts individual line items with name, quantity, price, category, and item code. No skips line-item detail. | Yes |
| Body/extractMerchantInfo (Advanced) | Optional | Yes extracts merchant name, address, phone, website, store number, and cashier name. | Yes |
| Body/calculateTotals (Advanced) | Optional | Yes extracts and calculates subtotal, tax amount, total amount, and payment method. | Yes |
| Body/customFieldKeys (Advanced) | Optional | Array of additional field names to extract beyond the standard schema. Returned inside additionalInfo. | ['loyaltyNumber'] |
How Do I Set Up AI-Receipt Parser in Power Automate?
- Add AI-Receipt Parser to your flow as a new step.
- Sign in to PDF4me Connect with your API key.
- Map File Content from a previous action (Get file content from SharePoint, OneDrive, Dropbox, or an email attachment).
- Set Body/Document/Name with the matching extension (
.pdf,.png,.jpg, or.jpeg). - Under Advanced parameters, set Body/receiptType if you know the category, and toggle Body/analyzeItems, Body/extractMerchantInfo, Body/calculateTotals as needed.
- Run the flow. Check success before using the extracted fields downstream.
- Route merchantName, analyzeItems, totalAmount, and related fields to Excel, SharePoint, Dynamics 365, or Power BI.
Output
The response includes core transaction fields, nested arrays for items/merchant/financials, specialized fields per receipt type, and processing metadata.
| Field | Type | Description |
|---|---|---|
| receiptType | String | Type of receipt extracted (supplies, retail, restaurant, hotel, fuel, healthcare, training). |
| transactionDateStr | String | Transaction date in ISO 8601 (YYYY-MM-DD). |
| transactionTime | String | Transaction time (HH:MM:SS). |
| receiptNumber | String | Receipt number or transaction identifier. |
| analyzeItems | Array | Line items with name, quantity, unit price, total price, category, description, item code, brand, size, color, SKU. |
| merchantInfoList | Array | Merchant objects with name, address, phone, website, cashier name, store number. |
| financialInfoList | Array | Financial objects with subtotal, tax amount, total amount, payment method, card last four. |
| merchantName / merchantAddress / merchantPhone / merchantWebsite | String | Flattened merchant details for quick access without indexing into merchantInfoList. |
| subtotal / taxAmount / totalAmount | Number | Flattened financial totals with precise decimal handling. |
| paymentMethod / cardLastFour | String | Payment method used and last four digits of the card, if applicable. |
| roomNumber / checkInDate / checkOutDate | String | Hotel-specific fields, populated when receiptType is hotel. |
| fuelType / fuelQuantity / fuelUnit / vehicleNumber | String/Number | Fuel-specific fields, populated when receiptType is fuel and energy. |
| trainingProvider / courseName | String | Training-specific fields, populated when receiptType is training. |
| healthcareProvider / patientName / insuranceInfo | String | Healthcare-specific fields, populated when receiptType is healthcare. |
| additionalInfo | Object | Dictionary containing any Body/customFieldKeys values that were found. |
| warnings | Array | Warning messages for potential data-quality issues encountered during extraction. |
| fallbackUsed | Boolean | True when a fallback extraction method was used, a signal to review manually. |
| success | Boolean | True if extraction succeeded. |
| message | String | Descriptive result message. |
Typical Setups
- Trigger when a receipt is emailed or uploaded to SharePoint.
- Run AI-Receipt Parser with extractMerchantInfo and calculateTotals enabled.
- Append merchantName, totalAmount, and transactionDateStr as a new Excel row.
- Archive the original receipt with the extracted data linked.
- Trigger on receipt upload with analyzeItems enabled.
- Apply to each item in analyzeItems and categorize by the returned category field.
- Route items over a policy threshold to a manager approval.
- Post approved items to Dynamics 365 Finance.
- Trigger on receipt upload; set Body/receiptType if the category is known.
- Check the returned receiptType and branch on hotel, fuel and energy, or healthcare.
- Send roomNumber/checkInDate, fuelType/vehicleNumber, or patientName to the matching system.
- Log any warnings for manual review.
Practical Tips
A populated warnings array or fallbackUsed: true means the extraction had lower confidence. Route these to manual review instead of auto-posting into an expense or accounting system.
Leaving it unset still works via generic extraction, but a matching receiptType improves accuracy on category-specific fields like roomNumber or fuelType.
If you only need the total amount, set analyzeItems and extractMerchantInfo to No to keep the response smaller and processing focused.
A mismatched extension (for example naming a JPG file receipt.pdf) can affect format detection and extraction accuracy.
A loyalty number, a promo code, or an internal reference printed on the receipt can be captured via Body/customFieldKeys without waiting for a schema update.
Cheat Sheet
| Goal | receiptType | Key output fields |
|---|---|---|
| General expense capture | generic | merchantName, totalAmount, transactionDateStr |
| Line-item expense report | supplies or retail | analyzeItems (name, category, price) |
| Travel expense reconciliation | hotel | roomNumber, checkInDate, checkOutDate, totalAmount |
| Fleet fuel tracking | fuel and energy | fuelType, fuelQuantity, vehicleNumber |
| Healthcare expense/insurance | healthcare | healthcareProvider, patientName, insuranceInfo |