在 Power Automate 中创建 ZUGFeRD 发票
创建 ZUGFeRD 发票 是一个 Power Automate 采取行动 PDF4me 生成符合 ZUGFeRD 标准的混合电子发票,单个 PDF/A-3 文件结构化 XML 内置于系统中。可用于满足德国B2B电子发票要求,并可与任何系统交换符合EN 16931标准的电子发票。 ERP或者将一个文件存档,该文件既可供人类读取,也可供机器读取。
此操作的作用
PDF4me 创建 ZUGFeRD 发票 构建 符合 ZUGFeRD 标准的混合电子发票单个 PDF/A-3 档案 PDF 带有结构化发票 XML 嵌入内部,直接嵌入 Power Automate 流程。人类解读 PDF; ERPs 和清算平台解析 XML该行为满足了 德国的B2B电子发票强制令 (自2025年1月1日起生效,2028年之前全部寄出)以及相关内容 16931年 欧洲标准。将发票数据映射为 XML, JSON, 或者 CSV 从 SharePoint, OneDrive, Outlook或者 Dataverse,并将混合输出路由到您的归档,您的 ERP或者一步到位地满足您的客户需求。
如何验证我的 Power Automate 流程?
致电 PDF4me 通过 Power Automate流程需要一个有效的 PDF4me API 关键在于 PDF4me 连接 连接器。身份验证可确保通信安全,并验证您的身份是否为授权用户。您可以从开发者控制面板获取或轮换密钥。
您不容错过的重要事实
XmlWithPdf 输出结果为一个文件:一个归档文件 PDF/A-3 具有结构化的 ZUGFeRD XML 附着在里面。人类打开 PDFAP系统解析 XML。 放 XmlOnly 只有当接收系统消耗纯净物时 XML。发票 XML 数据, 发票 JSON 数据, 或者 发票 CSV 数据 根据组合下拉菜单的格式部分进行匹配。仅映射匹配项。在同一次运行中填充两个数据字段是导致验证失败的最常见原因。
主要的 参数 标签。 ZUGFeRD 版本和输入格式 是一个组合下拉菜单(此处)。 2.0-XML)。

高级参数。 语言 默认值 的也接受 英语、法语、意大利语、西班牙语、荷兰语、波兰语、葡萄牙语、捷克语。
ZUGFeRD、Factur-X 和 XRechnung:选择合适的配置文件
| 格式 | 它的使用场景 | 输出类型 | 何时选择 |
|---|---|---|---|
| ZUGFeRD | Germany, EU B2B, supplier-to-buyer invoicing | Hybrid PDF/A-3 + embedded XML | General B2B; you want one file for humans and machines. |
| Factur-X | France (sister format, technically identical to ZUGFeRD 2.x) | Hybrid PDF/A-3 + embedded XML | Cross-border FR<>DE invoicing; the same hybrid file works on both sides. |
| XRechnung | German public sector (federal, state, municipal) | Strict pure XML profile | You invoice a German public-sector authority; switch to an XRechnung-aligned profile when the receiver demands pure XML. |
参数
操作中需要: ZUGFeRD 版本和输入格式、输出模式的匹配 发票 XML / JSON / CSV 数据 字段和一致性级别。 PDF 文件内容 和 文件名 仅当输出模式为 XmlWithPdf。 输出文件名 设置生成的混合文件的文件名。 开具发票 PDF 默认值为真。 语言 生活在 高级参数 并默认为 的。
| 范围 | 必需的 | 它的作用 | 例子 |
|---|---|---|---|
| ZUGFeRD version and Input Format | Required | Combined dropdown that picks both the ZUGFeRD specification version (1.0, 2.0, etc.) and the shape of your invoice data (XML, JSON, CSV) in a single setting. The value drives which Invoice Data field appears below and which Conformance Level set is offered. | 2.0-XML |
| Output Mode | Required | XmlWithPdf returns the canonical hybrid PDF/A-3 file with the XML embedded inside. XmlOnly returns the XML invoice file alone. PDF File Content and File Name are only required for XmlWithPdf. | XmlWithPdf |
| Invoice XML Data | Conditional | Required when the Input Format part of the combined dropdown is XML. Map your ZUGFeRD XML payload from a previous action (Get file content, Compose, etc.). | File Content |
| Invoice JSON Data | Conditional | Required when the Input Format part is JSON. Map a structured invoice JSON object that PDF4me converts to the ZUGFeRD XML schema before embedding. | File Content |
| Invoice CSV Data | Conditional | Required when the Input Format part is CSV. Map a tabular CSV row that PDF4me converts to the ZUGFeRD XML schema before embedding. | File Content |
| Conformance Level | Required | Profile that controls how rich the invoice data must be. BASIC is the entry-level profile with line items, suitable for most B2B receivers. COMFORT adds additional fields for richer content. EXTENDED is the largest set, used for industry-specific scenarios beyond the EN 16931 baseline. | BASIC |
| Render Invoice on PDF | Required | When set to Yes (default), PDF4me visually renders the invoice content on the PDF pages using your invoice data. Set to No when you supply a pre-designed background PDF and only need the XML embedded without redrawing the content. | Yes |
| PDF File Content | Conditional | Required when Output Mode is XmlWithPdf. Map the background PDF bytes from a previous action (Get file content from SharePoint / OneDrive / Outlook / Dataverse). Skip for XmlOnly. | File Content |
| File Name | Conditional | Required when Output Mode is XmlWithPdf. The source PDF filename with extension. Used for trace and naming context. | abc.pdf |
| Output File Name | Optional | Filename of the generated hybrid file or XML. Use .pdf for XmlWithPdf and .xml for XmlOnly. Helps when the downstream Create file action expects an explicit name. | Zugferd-output.pdf |
| Language | Optional | Advanced parameter. Locale used for invoice labels in the rendered PDF. Default de. Accepted codes: de, en, fr, it, es, nl, pl, pt, cs. The XML data itself stays language-neutral. | de |
输出模式选项
XmlWithPdf默认的规范 ZUGFeRD 混合文件XmlOnly独立版 XML 发票符合性等级阶梯
基本的默认值。最广泛的接收器兼容性舒适更丰富的发票内容扩展规模最大的行业特定套装语言选项(高级)
“高级参数”部分仅显示一个字段, 语言它仅控制绘制在视觉元素上的标签所使用的语言环境。 PDF; 这 XML 数据保持语言中立。默认值为 de。
| 代码 | 语言 | 典型用途 |
|---|---|---|
de | German | Default. German domestic invoicing. |
en | English | Cross-border B2B in English-speaking markets. |
fr | French | France or French-speaking Switzerland (also pairs with Factur-X workflows). |
it | Italian | Italy or Italian-speaking Switzerland. |
es | Spanish | Spain and Spanish-speaking partners. |
nl | Dutch | Netherlands and Flemish Belgium. |
pl | Polish | Poland. |
pt | Portuguese | Portugal and Portuguese-speaking partners. |
cs | Czech | Czechia. |
发票样本文件
在连接实际数据源之前,请使用这些工具测试每种输入格式的流程。对于符合 2025 年要求的德国 B2B 生产工作流程,请从以下方面开始: JSON 2.0 EN16931 样本。
ZUGFeRD-invoice-sample.xmlZUGFeRD-invoice-sample-2.0.xmlsample-invoice-zugferd-2.0-en16931.json示例发票.json测试发票.csvzugferd-invoice-2.0.csv输入输出决策矩阵
| 如果您选择 | 然后地图 | 你得到 |
|---|---|---|
| ZUGFeRD version and Input Format = 2.0-XML | Invoice XML Data | ZUGFeRD 2.0 hybrid output (or XML-only) from your existing XML payload |
| ZUGFeRD version and Input Format = 2.0-JSON | Invoice JSON Data | ZUGFeRD 2.0 hybrid from a structured JSON object converted to the schema |
| ZUGFeRD version and Input Format = 2.0-CSV | Invoice CSV Data | ZUGFeRD 2.0 hybrid from a flat CSV row converted to the schema |
| Output Mode = XmlWithPdf | PDF File Content + File Name (background PDF) | PDF/A-3 hybrid file with embedded XML |
| Output Mode = XmlOnly | Invoice data only (no PDF bytes needed) | Standalone ZUGFeRD XML invoice |
如何在 Power Automate 中设置创建 ZUGFeRD 发票?
- 添加 创建 ZUGFeRD 发票 将你的工作流程增加一个新的步骤。
- 登录 PDF4me 与您的 API 钥匙。
- 挑选 ZUGFeRD 版本和输入格式 (例如 2.0-XML, 2.0-JSON, 或者 2.0-CSV)。
- 放 输出模式 到 XmlWithPdf 对于混合文件或 XmlOnly 纯粹 XML。
- 地图 仅有的 匹配的发票数据字段(XML, JSON, 或者 CSV)来自之前的操作。
- 放 符合性级别 (基本的 用于兼容性测试, 舒适 或者 扩展 当您的接收器确认支持时)。
- 离开 以 PDF 格式渲染发票 作为 是的 除非你提供预先设计好的背景。 PDF。
- 为了 XmlWithPdf, 地图 PDF 文件内容 和 文件名 来自之前的操作(获取文件内容)。
- 放 输出文件名 (
Zugferd-output.pdf或者Zugferd-output.xml)。 - 在下面 高级参数, 放 语言 如果您需要非德语语言环境下的标签。
- 路线 文件内容 输出到 SharePoint 创建文件, OneDrive 创建文件, Outlook 发送电子邮件或 Dataverse 记录。可选择链接 证实 PDF/一个 存档之前。
输出
该操作会返回生成的文件内容以及您的流程可以向下游传递的元数据。
| 场地 | 类型 | 描述 |
|---|---|---|
| File Content | Binary | The generated PDF/A-3 hybrid file (XmlWithPdf) or the standalone XML invoice (XmlOnly). |
| FileName (header) | String | Suggested output filename returned in the response headers. |
| PageCount (header) | String | Page count of the generated PDF, returned when Output Mode is XmlWithPdf. |
故障排除
如果组合下拉菜单中的“输入格式”部分是 CSV仅地图 发票 CSV 数据不要填写 XML / JSON 同一运行中的字段。每次调用选择一种格式。
PDF 文件内容 必须来自返回完整文件字节的步骤(从……获取文件内容) SharePoint / OneDrive / Outlook 附件),而不是仅包含元数据的引用,例如缺少文件有效负载的 GET 请求。
首先 基本的 进行兼容性测试后,只有在接收系统确认支持后才能升级。 扩展 特别是对于针对 EN 16931 基线调谐的接收器,可能无法通过验证。
ZUGFeRD 1.0 不符合 2025 年德国 B2B 指令的要求。请选择 2.0 对于任何对强制性要求敏感的工作流程,请在 ZUGFeRD 版本和输入格式下拉菜单中选择 family(或更高版本)。
工作流程示例
工作流程示例Open by default. Four common ZUGFeRD automation patterns in a 2x2 grid.
- 当 Dataverse 中发票行被标记为“已批准”时触发(或 ERP)。
- 撰写发票 JSON 从行列和子行项目表中。
- 获取布局 PDF 一个 SharePoint 文档库模板。
- 跑步 创建 ZUGFeRD 发票 和
2.0-JSON,XmlWithPdf,16931年对齐一致性。 - 将返回的文件内容保存到记录库中;链 证实 PDF/一个 保留前。
影响: 一个文件,既适用于人也适用于机器,非常适合审计和长期存储。
- 触发新文件到达 SharePoint 舞台 文件夹。
- 阅读 CSV 发票行文件内容。
- 挑选
2.0-CSV在组合下拉菜单中;地图发票 CSV 数据。 - 放
XmlWithPdf将结果路由到 已批准的发票 图书馆。
影响: 无需手动桌面工具即可重复批量生成。
- 上游系统生成发票 JSON。
- 运行该操作
XmlOnly; 跳过 PDF 文件内容。 - POST 返回 XML 发送至 SAP、EDI 经纪商或电子发票清算机构。
- 用于支持追溯的日志关联 ID。
影响: 交接顺利进行 PDF shell 是在其他地方生成的。
- 在您的计费系统中完成发票的生成。
- 生成 ZUGFeRD 混合文件(
XmlWithPdf)。 - Outlook 发送一封包含以下内容的电子邮件 PDF/A-3 附在客户身上。
- SharePoint 在记录库中创建包含元数据列(发票编号、金额、到期日)的文件。
影响: 客户自助服务,减少“格式错误”的支持工单。
行业应用案例及应用
行业应用案例及应用Expand to see manufacturing, finance, public sector, and SaaS scenarios.
- 供应商发票适用于有严格应付账款规定的买家的混合 PDF/A-3 + XML 格式
- 订单到收款. 从 ERP 事件自动生成发票包
- 审计跟踪每次发货或里程碑交付一件产品
- 应收账款符合2025年要求的合规出境电子发票
- 月末从合并发票数据批量输出混合输出
- 存档在记录保留之前,请配合 PDF/A 验证。
- 结构化交易所.XmlOnly 仅用于强制清算通道
- 透明度嵌入式 XML 支持自动验证
- 保留符合内部记录政策
- 账单导出从您已发布的 JSON/CSV 文件生成 ZUGFeRD
- 多租户在您的流程中,为每个客户单独生成 JSON/XML/CSV 格式或模板的发票。
- 客户成功减少手动“再次发送发票”的循环