跳到主要内容

AI - 文档解析器 Zapier

此操作的作用

PDF4me AI - 文档解析器 运行已保存的 AI分析器PDF4me 仪表盘可针对任何文档进行操作,并将提取的数据动态返回。 JSON 在 Zap 内部。一个操作涵盖发票、采购订单、收据、合同、自定义表单、实验室报告或您在架构中描述的任何内容。从以下位置选择分析器: AI 分析器 ID 下拉菜单(解析单个模式,分类多个文档变体)。字段在下游 6000 多个步骤中均以可单独映射的标记形式出现。 Zapier 应用程序。

相关博客文章(3)
在 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) 和实际截图、精确字段值均可下载。
阅读帖子
还在为如何在 Zapier 中提取和映射发票数据而苦恼吗?使用 PDF4me AI,只需 3 个步骤即可搞定!
Zapier分步指南:在文件夹(Dropbox)中新建文件 → PDF4me AI - 发票解析器 → 上传文件。从PDF发票中提取供应商、发票编号、金额和日期,并以发票编号命名保存为.txt文件(例如:Pdf4me-202503-25041.txt)。根据Zapier用户界面截图核实。
阅读帖子

测试发票样本

在将 Zap 指向真实数据之前,请使用此示例发票确认操作端到端运行正常。将其上传到 Dropbox、Google Drive 或任何存储连接器,并将文件映射到 文件连接 文件名 + 文件扩展名 (例如 sample_invoice + .pdf),并选择 default_invoice_extractionAI 分析器 ID 下拉菜单。该操作返回一个已填充的下拉菜单。 文档文本 JSON 您可以向下游解析。

验证您的身份 API 要求

要访问 PDF4me 网站 API 通过 Zapier每个 Zap 操作都需要一个有效的 PDF4me API 关键在于 PDF4me 连接。从开发者控制面板获取或轮换您的密钥。

首先设置分析器

本指南中将使用的仪表盘网址:
首先创建您的分析器(所有平台均需此步骤)
AI - 文档解析器会在 PDF4me 开发者仪表盘中运行一个已保存的分析器。 选择“解析”可处理单一文档模式,或选择“分类”可在单次调用中对多种变体(如客户ABC、客户XYZ、通用发票)进行路由。同一分析器ID可在Make、Zapier、Power Automate、n8n以及REST API中使用。

您不容错过的重要事实

分析器位于 PDF4me 仪表盘,Zap 只是引用了它。
只需在文档中定义一次模式(字段、类型、描述)即可。 分析器列表分析器详情 页。 Zapier 行动内容 AI 分析器 ID 从下拉菜单中选择要运行的分析器。稍后编辑架构后,所有指向同一 ID 的 Zap 都会自动应用该架构,无需重建 Zap。
文件或文件 URL,二者不可兼得。
地图 文件 当文档已存在于已连接的应用程序中时,可从上一步(Dropbox / Google Drive / Gmail 附件 / Webhook)获取。 文件 URL 当文档托管在公共平台上时 HTTPS 链接。无需同时设置两者,操作会优先选择“文件”(如果存在)。
解析还是分类由分析器决定,而不是由操作决定。
相同的操作,两种分析模式。 解析 分析器返回其单一模式中的字段。 分类 分析器将文档路由到最匹配的模式,并返回其分类名称。 匹配的模式提取字段。通过切换 ID 来切换行为。
请使用 AI 分析器 ID,而不是 AI 分析器名称(已弃用)
Zapier 演出 AI 分析器 ID 作为分析器下拉菜单的一部分 PDF4me 账户。较老的 AI 分析器名称 文本字段已标记 (已弃用)将其留空,然后选择分析器。 AI 分析器 ID
Zapier PDF4me AI - 文档解析器配置选项卡:文件映射来自 Dropbox 步骤 2,文件 URL 为空,文件名映射为 sample_invoice 后缀 .pdf,AI 分析器 ID 下拉菜单设置为 default_invoice_extraction,AI 分析器名称已弃用,留空。

配置选项卡:地图 文件 从上一步出发,离开 文件 URL 空,建造 文件名 从文件名 + 文件扩展名标记中选择 AI 分析器 ID然后离开 AI 分析器名称(已弃用) 空的。

参数

本指南中将使用的仪表盘网址:

操作中需要: 文件 或者 文件 URL (两者之一),文件名(带扩展名),以及 AI 分析器 ID。 离开 AI 分析器名称(已弃用) 空的。

场地必需的它的作用例子
FileConditionalBinary file from a previous Zap step. Map a file token from Dropbox, Google Drive, OneDrive, Gmail attachment, Slack file, Webhooks by Zapier, or any connector that exposes a file output. Required when File URL is not provided. In the screenshot, step 2 File is mapped from Dropbox.2. File
File URLConditionalPublicly reachable HTTPS URL to the document. Required when File is not provided. Use when the document lives on a public CDN, S3 bucket, or content host. Leave empty when File is mapped.https://example.com/document.pdf
File NameYesSource document filename with extension. Best practice is to concatenate the previous step File Name and File Ext tokens (for example sample_invoice + .pdf becomes sample_invoice.pdf).sample_invoice.pdf
AI Analyzer IdYesDropdown of Analyzers saved in your PDF4me account. Create Analyzers at https://dev.pdf4me.com/dashboard/#/ai-document-parser/ (+ Add), then edit schemas on https://dev.pdf4me.com/ai-document-parser/?id=<analyzer-guid>. Sent to the API as customisationNote. Pick Parse for one schema or Classify for many variants.default_invoice_extraction
AI Analyzer Name (Deprecated)NoLegacy free-text field. Zapier marks this as deprecated. Leave empty and use AI Analyzer Id instead.-

AI 分析器 ID:分析器 ID 如何映射到行为

解析分析器 ID一种模式,提取您定义的字段
最佳效果是处理的每个文档都采用相同的布局系列。 JSON 包含您所描述的所有属性 字段 在分析仪上,包括 桌子 用于存储订单项的数组。
分类分析器 ID一次调用中包含多个模式、路由和提取。
当一个 Zap 需要处理多个变体(例如客户 ABC、客户 XYZ、通用发票)时,此方法最为有效。人工智能会根据分类提示将传入文档与最合适的模式进行匹配,然后返回匹配的分类名称以及该模式提取的字段。
默认发票提取内置发票模板
这是一个即用型的供应商发票分析器。如果您需要立即提取发票信息而无需构建自定义架构,请选择此分析器。如果您需要默认分析器未涵盖的特定字段、供应商逻辑或表列,请改用自定义解析分析器。

输出

该操作返回动态 JSON分析器架构中定义的每个属性都会显示在 Zapier测试结果会作为可单独映射的标记,用于每个下游步骤。具体形式取决于您的分析器:

  • 顶级键 匹配 fieldName 您的模式中的值(字符串、数字、日期或 table 行项目数组)。
  • 分类分析器 同时返回匹配的分类名称,以便您可以根据匹配的架构进行下游分支。
  • 没有二进制文件 返回结果,AI解析器是一个 JSON仅行动。

根据模式的不同,您可能会看到以下一些常见的令牌名称:

令牌类型典型内容
invoiceNumber细绳发票/账单/收据编号
invoiceDate日期标准化日期(当 fieldMethod: "generate" 已设置)
vendorName细绳供应商或厂商名称(来自标题)
totalAmount数字以单据货币计价的总计
lineItems大批重复行数据(每行一个对象,字段为您在嵌套中描述的字段)。 fields 大批)

快速设置

  1. 首先构建分析器。打开 分析器列表, 点击 + 添加输入一个清晰的分析器 ID,选择 解析 或者 分类保存该行,然后在该行上添加文档架构。 分析器详情 请参阅页面。 解析设置指南 或者 分类设置指南 完整的模式规则(包括) fieldType: "table" 对于嵌套行和 fieldMethod: "generate" 对于导出值)。
  2. 在您的 Zap 点击中 +, 搜索 PDF4me, 挑选 AI - 文档解析器
  3. 连接或重复使用您的 PDF4me 帐户。
  4. 地图 文件 来自上一步(Dropbox / Google Drive / Gmail 附件 / Webhook), 或者 粘贴公共 HTTPS 链接到 文件 URL
  5. 地图 文件名 将上一步的文件名标记连接起来 文件名 + 文件扩展名 保留原名称及其正确的扩展名)。
  6. AI 分析器 ID 选择你的分析器(例如) default_invoice_extractionclient_invoices或者自定义解析器或分类分析器)。离开 AI 分析器名称(已弃用) 空的。
  7. 点击 测试操作检查退回的商品 JSONZapier 测试面板。
  8. 将返回的字段映射到下一个操作(Google Sheets 创建行、Airtable 创建记录、Gmail 发送电子邮件、Slack 发送频道消息,或 6000 多个其他操作)。 Zapier 应用程序)。

工作流程示例

工作流程示例Open by default. Four common AI - Document Parser patterns inside Zaps.
将供应商发票导入 Google 表格
  1. 触发器:Gmail 新附件 在美联社收件箱中。
  2. AI文档解析器,文件映射来自附件,文件名来自Gmail令牌,AI分析器ID 默认发票提取 (或您自定义的解析分析器)。
  3. Google 表格 创建行将发票号、供应商名称、总金额、发票日期映射到应付账款跟踪器中。
  4. 可选:Slack 发送频道消息 以价值观为导向进行融资,以提高知名度。

影响: 任何供应商均不得干预 AP 收款。

带分类功能的多供应商收件箱
  1. 触发因素:Dropbox 文件夹中的新文件 在混合供应商文件夹上。
  2. AI - 文档解析器,带有指向分类分析器的 AI 分析器 ID(客户发票每个供应商对应一个模式。
  3. Zapier 路径 根据返回的分类名称进行分支,并将每个结果发送到匹配的 Airtable 数据库。

影响: 一个 Zap 即可处理所有客户,无需单独的流程。

通过 URL 访问托管文档
  1. 触发器:Webhooks Zapier 钩钩 收到来自您门户网站的文档链接。
  2. AI - 文件解析器 URL 设置为链接,AI 分析器 ID 设置为您的自定义表单分析器。
  3. Airtable 创建记录 通过映射字段创建 CRM 联系人。

影响: 通过门户网站上传的表单无需手动输入即可成为 CRM 数据。

智能文件重命名 + 归档
  1. 触发器:Dropbox 新建文件 收件箱
  2. AI - 文档解析器从架构中返回 vendorName 和 invoiceNumber。
  3. Dropbox 移动文件档案/{{vendorName}} 并重命名为 {{vendorName}}_{{invoiceNumber}}.pdf

影响: 干净、可搜索的存档,无需任何人工文件处理。

常见问题解答

What is the difference between AI - Document Parser and AI-Invoice Parser?+
AI-Invoice Parser uses a fixed schema tuned for invoices (vendor, line items, totals, dates). AI - Document Parser is schema-driven: it runs whatever Analyzer you pick from AI Analyzer Id, built once in the PDF4me dashboard. The same action handles purchase orders, receipts, contracts, custom forms, lab reports, ID cards, or anything else you describe in a schema. Pick AI - Document Parser whenever you need flexibility or a non-invoice document type.
Where do I build the Analyzer?+
At https://dev.pdf4me.com/dashboard/#/ai-document-parser/ (Analyzer list, + Add) and https://dev.pdf4me.com/ai-document-parser/?id=<analyzer-guid> (Analyzer detail for schemas). Two analyzer types: Parse (one schema) and Classify (many variants). Pick the Analyzer from the AI Analyzer Id dropdown in Zapier.
What happened to AI Analyzer Name?+
AI Analyzer Name is deprecated in Zapier. Use the AI Analyzer Id dropdown instead. Leave the deprecated text field empty.
Should I provide File or File URL?+
Provide one or the other. Map File from a previous Dropbox / Google Drive / Gmail / Webhook step when the document lives inside another connected app. Use File URL when the document is hosted at a public HTTPS link. Setting both is unnecessary; the action prefers File when present.
What format is the output and how do I map fields downstream?+
The response is dynamic JSON with one property per field defined in your Analyzer schema (for example customerName, invoiceNumber, totalAmount, lineItems). Zapier exposes those properties in the Test result of this step. Pick the matching property from the dynamic dropdown in any downstream action.
Which file types does the action accept?+
PDF, PNG, JPG, and JPEG. The AI engine handles OCR internally, so scanned PDFs and image formats work the same as native PDFs.
What does default_invoice_extraction give me?+
A built-in Analyzer for typical vendor invoices. Pick it when you need invoice extraction immediately without building a custom schema. Move to your own Parse Analyzer when you need specific fields, vendor logic, or table columns the default does not cover.
Can one Zap process several document variants in one run?+
Yes, with a Classify Analyzer. Build one Classify Analyzer in the dashboard with one Schema per variant (Client ABC, Client XYZ, generic invoice). The AI picks the best-matching Schema at runtime and the action returns its fields plus the Classification Name. Use a Zapier Paths step to branch on the Classification Name and send each variant to the right downstream app.
Will the same Analyzer work from Make, Power Automate, n8n, or the REST API?+
Yes. The Analyzer Id is shared across every platform. Save it once in the dashboard and call it from Zapier, Make, Power Automate, n8n, or the REST API by passing the same Id. Schema changes propagate to every platform without rewiring.

相关操作

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

获取帮助