跳到主要内容

AI收据解析器 Zapier

AI收据解析器 是一个 Zapier 采取行动 PDF4me 使用机器学习 OCR 交回收据 PDFs 并将图像转换为结构化图像 JSON包括商户名称、交易日期、明细项目和总计。当收到新的 Gmail 附件、云端硬盘上传文件或表单提交时,系统会自动触发此功能,无需手动输入数据即可记录费用。

相关博客文章(3)
还在为如何在 Zapier 中提取和映射发票数据而苦恼吗?使用 PDF4me AI,只需 3 个步骤即可搞定!
Zapier分步指南:在文件夹(Dropbox)中新建文件 → PDF4me AI - 发票解析器 → 上传文件。从PDF发票中提取供应商、发票编号、金额和日期,并以发票编号命名保存为.txt文件(例如:Pdf4me-202503-25041.txt)。根据Zapier用户界面截图核实。
阅读帖子
在 Zapier 中使用 AI 重命名供应商发票:Dropbox + PDF4me 的 5 步工作流程
五步 Zap:Dropbox 新建文件 → Dropbox 查找文件 → PDF4me AI 文档解析器 → Zapier 代码运行 JavaScript → Dropbox 上传文件。利用 AI 提取客户姓名并将其用作输出文件名。真实截图,精确字段值,除两行 JSON.parse 代码外,无需其他代码。
阅读帖子
在 Zapier 中按供应商名称重命名所有供应商发票:5 步 Dropbox + PDF4me AI 工作流程
五步搞定应付账款团队。Dropbox 监控您的发票接收文件夹,PDF4me AI 文档解析器从每个 PDF 文件中提取供应商名称,Zapier 代码将解析器的输出转换为可映射的标记,Dropbox 将文件上传回 Dropbox,并将供应商名称作为文件名。本教程中使用的示例供应商发票 (sample-vendor-invoice.pdf) 和实际截图、精确字段值均可下载。
阅读帖子

此操作的作用

此操作的作用:PDF4me AI收据解析器 操作采用机器学习 OCR 转换收据 PDFs 并将图像转换为结构化图像 JSON Zap 中包含的数据。通过 Gmail、Google Drive、OneDrive、Dropbox 发送收据,或上传表单,即可收到回复。 商户名称、交易日期、收据编号、明细项目、小计、税额、总计和付款方式 此外,还包括酒店、燃油、医疗保健、培训和订阅收据等特定类型的字段。下游步骤可以将解析后的数据写入 Google Sheets、QuickBooks、Xero、Airtable 或任何其他平台。 Zapier-一款可实现免手动费用管理的联网应用程序。

验证您的身份 API 要求

每一个 PDF4me 行动 Zapier 需要有效 API 密钥。添加时只需验证一次。 PDF4me 作为关联帐户 - Zapier 安全地存储密钥并在您的所有设备上重复使用。 PDF4me 自动启动。

您不容错过的重要事实

收据文件和收据名称均为必填项
收据文件包含二进制内容;收据名称告诉 AI 预期的文件格式。省略任一字段都会导致操作失败。务必在触发步骤中映射这两个字段——名称必须包含文件扩展名(.pdf、.png、.jpg、.jpeg)。
收据类型为可选,但可提高准确性
如果将“收据类型”留空,AI 会自动推断类别。如果您知道类别,请明确设置(例如酒店、燃油和能源、医疗保健、用品、餐饮等)——模型会优先处理特定类别的字段,并返回房间号、燃油量、医疗保健提供商或课程名称等信息,而不是将其留空。
三个开关控制要提取哪些数据组。
“分析商品”、“提取商家信息”和“计算总计”均为可选功能,默认情况下处于禁用状态。请仅启用所需的分组——这样可以减少处理时间,并使未使用的输出字段保持为空而不是部分填充,从而使后续映射更加清晰。

笔记:Zapier目前尚无此操作的具体屏幕截图。以下字段名称匹配。 Zapier's 自身的操作面板命名;底层数据架构与等效项共享并经过确认。 Power Automate AI收据解析器操作。

参数

⚠️ 标有“必填”的参数必须提供 要执行此操作,可选参数会展开返回的数据组——启用下游步骤实际需要的数据组即可。

范围必需的它的作用例子
Receipt FileRequiredThe source receipt file. Map the file output from a Zapier trigger or previous action - Gmail attachment, Google Drive / OneDrive / Dropbox file, or form upload. Accepts PDF, PNG, JPG, and JPEG.receipt_2024_03_15.pdf (from Gmail trigger)
Receipt NameRequiredFile name including the extension. Used by the AI to identify the receipt format and optimise extraction. Can be mapped dynamically from trigger metadata. Must end in .pdf, .png, .jpg, or .jpeg.office_supplies_receipt.pdf
Receipt TypeOptionalOptional category hint for the AI. Supported values: meal · supplies · hotel · fuel and energy · transportation · communication · subscriptions · entertainment · training · healthcare · generic. Leaving this blank triggers automatic type detection.hotel
Analyze ItemsOptionalEnable line-item extraction. When true, the analyzeItems array is populated with item name, quantity, unit price, total price, category, description, SKU, brand, size, and colour for each line on the receipt.true
Extract Merchant InfoOptionalEnable merchant information extraction. When true, the output includes merchantName, merchantAddress, merchantPhone, merchantWebsite, storeNumber, and cashierName from the receipt header.true
Calculate TotalsOptionalEnable financial totals extraction. When true, the output includes subtotal, taxAmount, totalAmount, paymentMethod, and cardLastFour. Disable to skip financial parsing when you only need metadata.true
Custom Field KeysOptionalOptional list of extra field names to extract beyond the standard set. Pass as a JSON array. Useful for domain-specific fields printed on internal or industry receipts not covered by standard extraction.["costCenter","projectCode"]

输出结果包含哪些字段?

此操作会返回结构化的收据数据。请在后续的 Zap 步骤中映射这些字段。

场地类型它包含什么
receiptTypeStringDetected or specified receipt category (e.g. supplies, hotel, fuel, healthcare, generic)
transactionDateStrStringTransaction date in ISO 8601 format (YYYY-MM-DD)
transactionTimeStringTransaction time (HH:MM:SS) when printed on the receipt
receiptNumberStringReceipt or transaction identifier extracted from the document
merchantNameStringName of the merchant - populated when Extract Merchant Info is enabled
merchantAddressStringFull merchant address - populated when Extract Merchant Info is enabled
merchantPhone / merchantWebsiteStringContact details extracted from the receipt header
storeNumber / cashierNameStringStore location code and cashier name when visible on the receipt
subtotal / taxAmount / totalAmountNumberFinancial figures extracted when Calculate Totals is enabled
paymentMethod / cardLastFourStringPayment type (Cash, Credit Card, etc.) and last 4 card digits
analyzeItems[]ArrayArray of line-item objects (name, qty, unitPrice, totalPrice, SKU, brand) - populated when Analyze Items is enabled
roomNumber / checkInDate / checkOutDateStringHotel-specific fields - populated when Receipt Type is hotel
fuelType / fuelQuantity / fuelUnit / vehicleNumberStringFuel-specific fields - populated when Receipt Type is fuel and energy
healthcareProvider / patientName / insuranceInfoStringHealthcare-specific fields - populated when Receipt Type is healthcare
trainingProvider / courseNameStringTraining-specific fields - populated when Receipt Type is training
warnings[]ArrayArray of extraction warning messages - flag these for manual review in your Zap
fallbackUsedBooleantrue when a secondary extraction method was used; consider routing to review queue
rawOcrTextStringFull OCR text from the receipt - useful for keyword search or audit logging
jobId / success / messageMixedProcessing job ID, boolean success flag, and descriptive result message

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

  1. 创建或打开一个 Zap 添加一个触发器,用于提供收据文件——Gmail 新附件、Google Drive 文件夹中的新文件、OneDrive、Dropbox 或 Typeform 文件上传。
  2. 添加操作步骤 → 搜索 PDF4me → 选择 AI收据解析器
  3. 认证 你的 PDF4me API 如果尚未连接,请输入密钥(在密钥中输入密钥)。 Zapier 帐户对话框)。
  4. 地图收据文件 来自触发输出(二进制文件字段,而不是 URL)。
  5. 地图收据名称 - 使用触发器中的文件名字段,以便文件扩展名始终正确。
  6. 设置收据类型 如果您知道类别,请填写;否则请留空,以便自动检测。
  7. 启用分析项目 如果需要行项目数据,请启用 提取商家信息计算总数 用于费用工作流程。
  8. 添加自定义字段键 作为一个 JSON 如果您的收据包含非标准字段,则需要使用数组。
  9. 测试该步骤 - Zapier 将运行一个示例并向您显示所有返回的输出字段。
  10. 添加下游步骤 将 merchantName、totalAmount、transactionDateStr 和其他字段写入 Google Sheets、QuickBooks、Xero 或您的数据库。

工作流程示例

工作流程示例Common Zapier patterns using AI-Receipt Parser.
电子邮件收据 → Google 表格费用记录

从 Gmail 捕获收据附件,并将解析后的费用行自动写入 Google 表格。

  1. Gmail:新建附件 - 按主题包含“收据”或发件人域进行筛选。
  2. PDF4me:AI收据解析器 - 映射文件和文件名;启用提取商户信息 + 计算总计。
  3. Google Sheets:追加行 - map merchantName、transactionDateStr、totalAmount、paymentMethod、receiptType。
  4. Gmail:发送电子邮件 - 向财务团队发送每张已处理收据的汇总行。
Google 云端硬盘上传 → QuickBooks 费用记录

当员工将收据放入共享驱动器文件夹时,解析该收据并自动创建 QuickBooks 费用。

  1. Google 云端硬盘:在文件夹中新建文件 - 监视共享的“收据”文件夹。
  2. PDF4me:AI收据解析器 - 启用分析商品 + 计算总额 + 提取商家信息。
  3. Zapier 筛选条件:仅当 success = true 且 totalAmount > 0 时继续。
  4. QuickBooks:创建费用 - 映射供应商(merchantName)、日期(transactionDateStr)、总计(totalAmount)。
  5. Google 云端硬盘:将文件移动到“已处理”子文件夹,以防止重复解析。
酒店和燃油收据路由

自动检测特殊类型的收据,并将酒店和燃油收据路由到单独的跟踪表。

  1. Dropbox:在文件夹中新建文件 - 团队差旅收据文件夹。
  2. PDF4me:AI收据解析器 - 将收据类型留空以进行自动检测;启用所有三个开关。
  3. Zapier 路径:分支 A → 酒店 → Google 表格“旅行”选项卡(房间号、入住日期、总金额);分支 B → 燃油 → “车队”选项卡(燃油类型、燃油数量、车辆编号);分支 C → 所有其他 → “一般费用”选项卡。
  4. Slack:向 #expenses 发布消息,汇总收据类型、商家和总额。

常见问题解答

What file formats does the AI-Receipt Parser accept in Zapier?+
The action accepts PDF, PNG, JPG, and JPEG receipt files. Always include the file extension in the Receipt Name field (e.g. receipt.pdf, scan.jpg) so the AI can apply format-specific OCR optimisation.
Is Receipt Type required for every Zap?+
No - Receipt Type is optional. Leave it blank and the model auto-detects the category. Providing it explicitly (e.g. hotel, fuel and energy, healthcare) tells the AI to prioritise type-specific fields and improves accuracy for structured receipt formats. See the <a href="https://www.irs.gov/businesses/small-businesses-self-employed/recordkeeping" target="_blank" rel="noopener noreferrer">IRS recordkeeping guidance</a> for what expense documentation should typically capture.
What happens when Analyze Items is disabled?+
The analyzeItems array in the output will be empty. Line-item details - names, quantities, unit prices, SKUs, brands - are only extracted when Analyze Items is enabled. Disable it when you only need totals or merchant data to reduce processing overhead.
How do I extract hotel or fuel receipt-specific fields?+
Set Receipt Type to hotel to populate roomNumber, checkInDate, and checkOutDate. Set it to fuel and energy to receive fuelType, fuelQuantity, fuelUnit, and vehicleNumber. These specialized fields remain empty for other receipt types regardless of the receipt content.
What does fallbackUsed: true mean in the output?+
fallbackUsed: true means the AI switched to a secondary extraction method because primary model confidence was below threshold. The output data is still valid, but you may want to add a Zapier filter to branch these receipts to a manual review queue or a Slack alert for a human check. See the <a href="https://www.consumerfinance.gov/consumer-tools/educator-tools/your-money-your-goals/expense-tracking/" target="_blank" rel="noopener noreferrer">CFPB's expense-tracking guidance</a> for what a healthy manual-review process should confirm.

相关操作

获取帮助