跳到主要内容

AI收据解析器 Power Automate

AI收据解析器 是一个 Power Automate 采取行动 PDF4me 上面写着收据 PDF 或者将图像和退货商家详情、明细项目、财务总额和支付方式作为结构化数据。使用它来自动捕获费用、馈送 Excel 或者使用 Power BI 进行费用跟踪,或者直接将交易记入 Dynamics 365 无手动输入。

此操作的作用

PDF4me AI收据解析器 阅读收据(PDFPNGJPG, 或者 JPEG)并返回 商家信息明细项目财务总额, 和 付款方式 结构化 JSON它还认可专业领域。 酒店燃料和能源卫生保健, 和 训练 收据,并可提取额外信息 自定义字段 超出标准模式。

相关博客文章(1)

我如何验证我的身份 Power Automate 流动?

致电 PDF4me 通过 Power Automate流程需要一个有效的 PDF4me API 关键在于 PDF4me 连接 连接器。身份验证可确保通信安全,并验证您作为授权用户的身份。

您不容错过的重要事实

实际字段名称为“文件内容”和“正文/文档/名称”。
连接器用户界面标记了两个主要字段 文件内容主体/文件/名称不是“收据文件内容”或“收据名称”。将收据字节映射到 文件内容
所有 5 个可选字段都位于“高级参数”下
正文/收据类型正文/分析项目正文/提取商户信息正文/计算总计, 和 正文/自定义字段键 全部都在高级参数下,截图中显示“显示 5/5”。
检查警告和回退机制。在信任低置信度的读取结果之前,请使用这些机制。
模糊的照片或不寻常的布局仍然可以带来回报。 成功:是 人口稠密 警告 数组或 fallbackUsed: true将这些分支改为人工审核,而不是自动发布总计。
Power Automate 中的 AI 收据解析器操作显示了文件内容和正文/文档/名称字段,高级参数部分显示了 5 个参数中的 5 个,其中正文/收据类型、正文/分析项目、正文/提取商户信息、正文/计算总计设置为“是”,正文/自定义字段键也设置为“是”。

主面板仅显示 文件内容主体/文件/名称; 每个提取开关都是一个高级参数。

参数

操作中需要: 文件内容主体/文件/名称其他所有字段均为可选的高级参数,并具有默认值。

范围必需的它的作用例子
File ContentRequiredBinary 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/NameRequiredFilename of the receipt including its extension. Used for format detection and processing.receipt_2026_07_07.pdf
Body/receiptType (Advanced)OptionalImproves parsing accuracy for a known category: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, or generic.hotel
Body/analyzeItems (Advanced)OptionalYes extracts individual line items with name, quantity, price, category, and item code. No skips line-item detail.Yes
Body/extractMerchantInfo (Advanced)OptionalYes extracts merchant name, address, phone, website, store number, and cashier name.Yes
Body/calculateTotals (Advanced)OptionalYes extracts and calculates subtotal, tax amount, total amount, and payment method.Yes
Body/customFieldKeys (Advanced)OptionalArray of additional field names to extract beyond the standard schema. Returned inside additionalInfo.['loyaltyNumber']

如何在 AI 收据解析器中设置 AI 收据解析器 Power Automate

  1. 添加 AI收据解析器 将你的工作流程增加一个新的步骤。
  2. 登录 PDF4me 连接 你的 API 钥匙。
  3. 地图 文件内容 从之前的操作(从……获取文件内容) SharePointOneDrive(例如 Dropbox 或电子邮件附件)。
  4. 主体/文件/名称 带有匹配的扩展名(.pdf.png.jpg, 或者 .jpeg)。
  5. 在下面 高级参数, 放 正文/收据类型 如果你知道类别,然后切换 正文/分析项目正文/提取商户信息正文/计算总计 根据需要。
  6. 运行流程。检查 成功 在下游使用提取的字段之前。
  7. 路线 商家名称分析项目总金额以及相关领域 ExcelSharePointDynamics 365 或 Power BI。

输出

响应包括核心交易字段、用于项目/商家/财务的嵌套数组、每种收据类型的专用字段以及处理元数据。

场地类型描述
receiptTypeStringType of receipt extracted (supplies, retail, restaurant, hotel, fuel, healthcare, training).
transactionDateStrStringTransaction date in ISO 8601 (YYYY-MM-DD).
transactionTimeStringTransaction time (HH:MM:SS).
receiptNumberStringReceipt number or transaction identifier.
analyzeItemsArrayLine items with name, quantity, unit price, total price, category, description, item code, brand, size, color, SKU.
merchantInfoListArrayMerchant objects with name, address, phone, website, cashier name, store number.
financialInfoListArrayFinancial objects with subtotal, tax amount, total amount, payment method, card last four.
merchantName / merchantAddress / merchantPhone / merchantWebsiteStringFlattened merchant details for quick access without indexing into merchantInfoList.
subtotal / taxAmount / totalAmountNumberFlattened financial totals with precise decimal handling.
paymentMethod / cardLastFourStringPayment method used and last four digits of the card, if applicable.
roomNumber / checkInDate / checkOutDateStringHotel-specific fields, populated when receiptType is hotel.
fuelType / fuelQuantity / fuelUnit / vehicleNumberString/NumberFuel-specific fields, populated when receiptType is fuel and energy.
trainingProvider / courseNameStringTraining-specific fields, populated when receiptType is training.
healthcareProvider / patientName / insuranceInfoStringHealthcare-specific fields, populated when receiptType is healthcare.
additionalInfoObjectDictionary containing any Body/customFieldKeys values that were found.
warningsArrayWarning messages for potential data-quality issues encountered during extraction.
fallbackUsedBooleanTrue when a fallback extraction method was used, a signal to review manually.
successBooleanTrue if extraction succeeded.
messageStringDescriptive result message.

典型配置

费用记录 Excel
  1. 当收据通过电子邮件发送或上传时触发 SharePoint
  2. 运行 AI-Receipt Parser,启用 extractMerchantInfo 和 calculateTotals 功能。
  3. 将 merchantName、totalAmount 和 transactionDateStr 追加为新项 Excel 排。
  4. 将原始收据与提取的数据关联存档。
费用明细分类
  1. 启用 analyzeItems 功能后,在收据上传时触发。
  2. 对 analyzeItems 中的每个项目应用此操作,并按返回的 category 字段进行分类。
  3. 将超过政策阈值的项目提交给经理审批。
  4. 已批准的物品将发布到 Dynamics 365 金融。
特殊收据处理流程(酒店、加油站、医疗保健)
  1. 上传收据时触发;如果类别已知,则设置 Body/receiptType。
  2. 检查退回的收据类型和分支,例如酒店、燃料和能源或医疗保健。
  3. 将房间号/入住日期、燃料类型/车辆编号或病人姓名发送到匹配系统。
  4. 记录所有警告信息以供人工审核。

实用技巧

在发布总数之前,务必先根据成功和警告情况进行分支。

如果警告数组已填充或 fallbackUsed: true,则表示提取结果的置信度较低。应将这些结果提交人工审核,而不是自动发布到费用或会计系统中。

当您知道类别时,请设置 Body/receiptType

即使不设置,通用提取仍然有效,但匹配 receiptType 可以提高房间号或燃料类型等特定类别字段的准确性。

关闭不需要的提取标志

如果您只需要总金额,请将 analyzeItems 和 extractMerchantInfo 设置为 No,以减少响应大小并集中处理。

将正文/文档/名称的扩展名与实际文件格式匹配

扩展名不匹配(例如,将一个扩展名命名为“a”) JPG 文件 receipt.pdf)可能会影响格式检测和提取的准确性。

对于标准架构中缺失的任何内容,请使用自定义字段键 (customFieldKeys)。

收据上打印的会员编号、促销代码或内部参考信息可以通过 Body/customFieldKeys 捕获,而无需等待架构更新。

速查表

目标收据类型关键输出字段
General expense capturegenericmerchantName, totalAmount, transactionDateStr
Line-item expense reportsupplies or retailanalyzeItems (name, category, price)
Travel expense reconciliationhotelroomNumber, checkInDate, checkOutDate, totalAmount
Fleet fuel trackingfuel and energyfuelType, fuelQuantity, vehicleNumber
Healthcare expense/insurancehealthcarehealthcareProvider, patientName, insuranceInfo

常见问题

Body/receiptType 支持哪些收据类型?+
餐饮、用品、酒店、燃料和能源、交通、通讯、订阅、娱乐、培训、医疗保健和通用项目。设置正确的类型是可选的,但可以提高该类别专用字段的识别准确率,例如酒店房间号或燃料和能源燃料类型。有关合规收据应包含哪些内容的通用记录保存指南,请参阅[此处应插入相关文档]。 美国国税局对企业的记录保存要求
analyzeItems、extractMerchantInfo 和 calculateTotals 之间有什么区别?+
这三个高级参数独立控制提取深度。`analyzeItems` 提取单个商品项(名称、数量、价格、类别)。`extractMerchantInfo` 提取商户名称、地址、电话和收银员信息。`calculateTotals` 提取小计、税额和总计。禁用任何不需要的参数,以减少处理量并保持响应简洁。
我可以提取标准架构中未涵盖的自定义字段吗?+
是的。Body/customFieldKeys 接受一个超出标准架构的字段名称数组。AI 引擎会尝试在响应的 additionalInfo 对象中查找并返回每个字段名称。
如何处理解析器无法准确读取的收据?+
检查响应中的警告数组和 fallbackUsed 标志。非空的警告数组或 fallbackUsed: true 表示提取置信度较低,例如从模糊照片中提取的信息。应将这些情况路由到人工审核步骤,而不是自动发布提取的总数,这与一般做法一致。 美国消费者金融保护局关于准确追踪费用的指导意见

相关操作

在其他平台上执行相同任务

获取帮助