跳到主要内容

AI处理收据 n8n

AI处理收据 是一个 n8n 节点 PDF4me 从收据中提取商户详细信息、交易数据、明细项目和总计。 PDFs 以及使用的图像 AI. 使用它可以自动完成费用采集、收据数字化或费用报告数据录入,无需手动输入,涵盖 11 个专门的收据类别。

此节点的功能

PDF4me:AI处理收据 解析收据 PDF 或者,图像和返回结构化的商户信息,包括交易日期/时间、明细项目和财务总额,以及酒店、燃料和能源、培训和医疗保健收据等类别特定字段。接受通过二进制数据输入。 Base64 字符串,或 URL非常适合费用自动化、支出分析和收据数字化工作流程。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

验证您的身份 API 要求

每一个 PDF4me 节点 n8n 需要有效 用于连接的凭证创建或选择一个可以容纳您的 PDF4me API 关键在于工作流程能够进行身份验证 AI 安全地处理提取请求。

您不容错过的重要事实

收据名称驱动格式检测
与许多情况不同 PDF4me 操作时,无论输入类型如何,收据名称都是必填项,其文件扩展名(.pdf、.png、.jpg、.jpeg)用于指示文件类型。 AI 引擎如何解码文件才能达到最佳准确率。
收据类型仅供参考,并非硬性筛选条件。
将收据类型设置为酒店、燃料和能源、培训或医疗保健,可以提高该类别专用字段(房间号、燃料量、课程名称、病人姓名)的准确性,但如果保留为通用字段,节点仍返回标准字段。
这是提款,不是记账。
该节点从收据图像中返回结构化数据或 PDF它本身不会将条目记入会计系统或与预算进行核对。将输出结果计入您的费用或 ERP 下游工具。

AI处理收据需要哪些参数?

必需的: 输入数据类型和收据名称,以及与您选择的输入类型匹配的字段(输入二进制字段, Base64 收据内容,或收据 URL收据类型、分析商品、提取商家信息、计算总计和自定义字段键都是可选的,请仅启用工作流程所需的功能。

范围必需的它的作用例子
Input Data TypeRequiredFormat of the receipt input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName of the binary property on the incoming n8n item that holds the receipt. Required when Input Data Type is Binary Data.data
Base64 Receipt ContentConditionalBase64-encoded receipt content. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
Receipt URLConditionalPublicly reachable HTTPS URL to the receipt file. Required when Input Data Type is URL.https://example.com/receipt.pdf
Receipt NameRequiredFilename of the input receipt with the correct extension (.pdf, .png, .jpg, .jpeg), used for format detection and processing accuracy.receipt_2026_03_15.pdf
Receipt TypeOptionalCategory hint for the AI: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, or generic.supplies
Analyze ItemsOptionalSet to true to extract individual line items with name, quantity, unit price, and category. Default false.true
Extract Merchant InfoOptionalSet to true to extract merchant name, address, phone, website, and store number. Default false.true
Calculate TotalsOptionalSet to true to extract subtotal, tax amount, and total amount. Default false.true
Custom Field KeysOptionalArray of extra field names to extract beyond standard receipt data, returned in additionalInfo.["loyaltyPoints"]

输出字段

场地类型它包含什么
successBooleanTrue when extraction succeeded. Use to route error-handling branches.
receiptTypeStringThe receipt type extracted or supplied, e.g. supplies, hotel, fuel and energy.
transactionDateStrStringTransaction date in ISO 8601 format (YYYY-MM-DD).
transactionTimeStringTransaction time (HH:MM:SS format), when present on the receipt.
receiptNumberStringReceipt or transaction identifier printed on the receipt.
analyzeItemsArrayLine item objects with name, quantity, unit price, total price, and category, present when Analyze Items is enabled.
merchantInfoListArrayMerchant name, address, phone, website, cashier name, and store number, present when Extract Merchant Info is enabled.
financialInfoListArraySubtotal, tax amount, total amount, payment method, and card last four digits, present when Calculate Totals is enabled.
roomNumber, checkInDate, checkOutDateStringHotel-specific fields, populated when Receipt Type is hotel.
fuelType, fuelQuantity, fuelUnit, vehicleNumberMixedFuel and energy-specific fields, populated when Receipt Type is fuel and energy.
trainingProvider, courseNameStringTraining-specific fields, populated when Receipt Type is training.
healthcareProvider, patientName, insuranceInfoStringHealthcare-specific fields, populated when Receipt Type is healthcare.
additionalInfoObjectValues for any Custom Field Keys requested beyond standard receipt data.
warningsArrayData-quality warnings encountered during extraction, empty array when none.
fallbackUsedBooleanTrue when a fallback extraction method was needed, useful for flagging low-confidence results.
jobIdStringUnique identifier for the AI processing job, used for tracking and debugging.

如何在 AI 处理收据中设置 n8n

  1. 添加 PDF4me 致你 n8n 工作流程并选择 AI处理收据 行动。
  2. 用于连接的凭证请选择您的 PDF4me 凭证或点击 创建新凭证 并粘贴你的 API 钥匙。
  3. 输入数据类型二进制数据 (默认), Base64 细绳, 或者 URL 并提供匹配的源字段。
  4. 收据名称 使用正确的扩展名(.pdf.png.jpg.jpeg)。
  5. (可选) 收据类型 将酒店、燃料和能源、培训或医疗保健收据归入特定类别,以提高准确性。
  6. 使能够 分析项目提取商家信息, 和 计算总数 根据需要添加 自定义字段键 适用于标准字段以外的任何内容。
  7. 执行该节点并将提取的字段映射到您的费用管理工具、电子表格或会计系统中。

典型配置

工作流程示例Common n8n workflow patterns using AI-Process Receipt.
通过电子邮件将收据录入费用表
  1. Gmail 会在收到带有收据附件的电子邮件时触发一个触发器。
  2. PDF4me AI-Process Receipt 运行时启用了“提取商户信息”和“计算总计”功能。
  3. merchantName、totalAmount 和 transactionDateStr 被添加到 Google Sheets 费用日志中。
用于车队跟踪的详细燃料和能源收据
  1. 移动上传 webhook 会接收司机上传的燃油收据照片。
  2. PDF4me AI-Process Receipt 以 Receipt Type fuel and energy 运行,提取 fuelQuantity、fuelUnit 和 vehicleNumber。
  3. 该记录被写入以车辆编号为键的车队管理数据库。
酒店账单解析,用于差旅费用报告
  1. 一位旅行者上传了酒店账单 PDF 通过表格。
  2. PDF4me AI-Process Receipt 以酒店收据类型运行,提取房间号、入住日期和退房日期以及标准总计。
  3. 解析后的数据流入公司的差旅费用报销工作流程。
基于批量收据上传的明细支出分析
  1. “循环遍历项目”节点会遍历共享驱动器文件夹中的一批收据文件。
  2. PDF4me AI-Process Receipt 运行时启用了“分析项目”功能,以拆分单个行项目。
  3. analyzeItems 被扁平化并附加到 BigQuery 表中,以便进行类别级别的支出分析。

实用技巧

Set Receipt Name even with Binary Data
The extension drives format detection regardless of input type; a mismatched or missing extension can reduce accuracy.
Only enable the toggles you need
Analyze Items, Extract Merchant Info, and Calculate Totals each add processing and payload size; skip any your downstream workflow does not consume.
Check warnings and fallbackUsed
Route items with a non-empty warnings array or fallbackUsed true to a manual-review queue instead of trusting the extraction blindly.
Match Receipt Type to unlock specialized fields
roomNumber, fuelQuantity, courseName, and patientName only populate when Receipt Type matches the corresponding category.
Custom Field Keys is additive, not a filter
It adds extra fields to additionalInfo; it does not restrict or replace the standard merchant, item, or financial fields.
This is extraction, not reconciliation
Pair the output with your accounting or expense system for matching against budgets, policies, or approvals.

速查表

场地价值
ActionAI-Process Receipt
Input Data TypeBinary Data
Input Binary Fielddata
Receipt Namereceipt.pdf
Receipt Typegeneric (or a specific category)
Analyze Itemstrue
Extract Merchant Infotrue
Calculate Totalstrue
Custom Field Keys[] (optional)
CredentialsPDF4me API credential

常见问题

Which fields are required for AI-Process Receipt?+
Four: the receipt input (via Input Data Type), Receipt Name, and the field matching your chosen input type. Receipt Type, Analyze Items, Extract Merchant Info, Calculate Totals, and Custom Field Keys are all optional.
What receipt types does this node support?+
Eleven categories: meal, supplies, hotel, fuel and energy, transportation, communication, subscriptions, entertainment, training, healthcare, and generic. Setting Receipt Type helps the AI engine target the right fields, such as room number for hotel or fuel quantity for fuel and energy.
Can I extract custom fields beyond the standard receipt data?+
Yes. Custom Field Keys accepts an array of additional field names the AI should look for beyond the standard merchant, line-item, and financial fields, returned in the additionalInfo object.
Does the output tell me if extraction was uncertain?+
Yes. The warnings array flags data-quality issues, and fallbackUsed indicates whether a fallback extraction method was needed, useful for routing low-confidence results to manual review, similar in spirit to the confidence-scoring approach described in Microsoft's Document Intelligence receipt model documentation.
Can I process image receipts, not just PDFs?+
Yes. The node accepts .pdf, .png, .jpg, and .jpeg receipt files. Set Receipt Name with the matching extension so the AI engine can apply the correct format handling.
Is this a bookkeeping or reconciliation tool?+
No, it extracts structured data from the receipt; matching that data against a budget, policy, or ledger is a separate step in your expense or accounting system, the same division of labor described in general receipt-automation guides such as DocuClipper's receipt data extraction overview.

相关操作

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

获取帮助