メインコンテンツへスキップ

ドキュメントを1つ生成 Power Automate

このアクションが何をするか

PDF4me ドキュメントを生成 シングル Word を結合し、 HTML、 または PDF テンプレート JSON または XML 内部のデータ Power Automate フローを生成し、パーソナライズされた PDFWord、Excel、または HTML ファイルを1つのアクションで処理します。複数ステップの作業を置き換えます。 Microsoft 365 単一の設定可能なステップでメールマージフローを実行します。任意のテンプレートファイルをマッピングします。 Microsoft 365 ストレージアクション(SharePoint、 OneDriveデータバース、 Outlook 添付ファイル)、動的コンテンツまたはマップされたファイルからデータを提供し、生成されたデータをパイプします ファイルの内容 ファイルの作成、メールの送信、またはその他の後続アクションに直接実行します。

関連ブログ記事(3)
Power Automateでパーソナライズされた招待状を作成し、1つのPDFに結合する:Dropboxを使った7ステップのワークフロー
Power Automate の 7 ステップのフロー。手動トリガー、Dropbox でファイルコンテンツを取得、PDF4me でドキュメントを生成 (複数)、変数を初期化、各項目に適用、配列に追加、PDF4me で複数の PDF を結合、Dropbox でファイルを作成。1 つの DOCX テンプレートと受信者の JSON 配列から、1 つの統合 PDF が生成されます。実際のスクリーンショット、正確な式、テンプレート、JSON、出力はすべてダウンロード可能です。
投稿を読む →
Power Automate を使用した SharePoint リストからの PDF 生成: Handlebars テンプレートと HTML から PDF への請求書ワークフロー
Power Automate を使って SharePoint リストから PDF を生成します。Handlebars の請求書テンプレートと Convert HTML to PDF を組み合わせることで、各行が Dropbox にレンダリングされます。追加料金は不要です。
投稿を読む →
Power Automate の要求書テンプレート: PDF4me を使用して SharePoint のすべての準備完了案件に対して PDF レターを生成します
PDF4meを使った催告状テンプレートの自動化。準備完了とマークされたSharePoint案件ごとに、WordテンプレートからPDF形式の催告状が作成され、該当フォルダに保存され、ステータスが更新されます。
投稿を読む →

認証 API リクエスト​

の PDF4me コネクタを接続します Power Automate 有効な 繋がり あなたの PDF4me API キー。フロー設計時に一度接続を作成し、その後は PDF4me テナント内のアクションがそれを再利用します。

見逃してはならない重要な事実​

テンプレートファイルの種類は、テンプレートの拡張子と一致する必要があります。
テンプレートファイルタイプのドロップダウン(PDF4me ワードテンプレート、 PDF4me HTML テンプレート、 PDF4me PDF テンプレート) は、テンプレートの下にマッピングされたファイルと一致する必要があります。 HTML 選択されたタイプは実行時に失敗します。Word テンプレートでは、次のような口ひげスタイルのプレースホルダーを使用します。 {{顧客名}}。
文書データテキストまたは文書データファイルのいずれかを提供してください。
ドキュメントデータテキストはインラインを受け付けます JSON または XML 動的コンテンツから構築されます。ドキュメントデータファイルは、前のバイナリデータファイルを受け入れます。 Microsoft 365 ステップ。各フローでは、どちらか一方のみを指定し、両方を指定しないでください。
ファイルコンテンツは動的コンテンツの出力です
生成されたファイルは次のように表示されます。 ファイルの内容 動的コンテンツ フィールド。直接渡します。 SharePoint ファイルを作成し、 Outlook 添付ファイル付きのメールを送信します。 OneDrive ファイルの作成、Dataverse で新しい行の追加、または Teams でファイル付きのメッセージの投稿。
PDF4me ドキュメント生成シングルアクションは、テンプレートファイルタイプが PDF4me Word テンプレート、出力タイプが PDF に設定され、SharePoint からマッピングされた Word テンプレートが Power Automate フローで構成されています。

ドキュメント生成シングルアクション Power Automate フロー。テンプレート ファイル タイプ、出力タイプ、テンプレート名、テンプレート、ドキュメント データ タイプ、およびドキュメント データ テキスト (またはドキュメント データ ファイル) は、一般的な Word からPDF 走る。

パラメータ​

必須: テンプレートファイルの種類、出力の種類、テンプレート名、テンプレート、ドキュメントのデータ型。 条件付き: 文書データテキストまたは文書データファイル(どちらか一方にデータペイロードが含まれている必要があります)。 オプション: メタデータJSON。

パラメータ必須その機能例
Template File TypeRequiredType of the template and the syntax its placeholders use. Options: Docx (PDF4me Template Syntax), Html (Handlebars Syntax), Pdf Form, Docx (Mail Merge), Google Docs. Defaults to `Docx (PDF4me Template Syntax)`.Docx (PDF4me Template Syntax)
Template File NameRequiredName of the template file, including its extension (for example `invoice-template.docx`).invoice-template.docx
Template File DataRequiredContent of the template file. Map it from the file content returned by a previous action.@{body('Get_file_content')?['$content']}
Document Data TypeRequiredFormat of the data: Json or XML. Options: Json, XML. Defaults to `Json`.Json
Document Data FileOptionalContent of a file with the data to fill the template with, in the format chosen in Document Data Type.@{body('Get_file_content')?['$content']}
Document Data TextOptionalData to fill the template with, as JSON or XML text. Required only if Document Data File is not mapped.your value
Field MetadataOptionalMetadata for fields in JSON format.your value
Output TypeRequiredFormat of the generated document. Options: PDF, Docx, Html. Defaults to `Docx`.Docx
Keep Pdf template EditableOptionalIf Yes, the form fields of a PDF template stay editable after they are filled with data. Default: No. Defaults to `No`.No

テンプレートファイルタイプのオプション​

PDF4me Wordテンプレート口ひげのプレースホルダー付き.docxファイル
最も柔軟なオプション。プレースホルダーをサポートします。 {{顧客名}}ループ、条件分岐、表、インライン画像などに対応。Wordで作成する請求書、契約書、証明書、手紙などに最適です。
PDF4me HTMLテンプレートインラインCSSを含む.html
チームがメールやウェブテンプレートを管理している場合に使用します。マーケティングにも適しています。 PDF既存のブランドスタイルの請求書から生成された HTML。
PDF4me PDFテンプレート入力可能 PDF フォームフィールドの置換
固定レイアウトの入力可能なデータがある場合に使用します。 PDF (政府、規制、またはコンプライアンスフォーム)。このアクションは、指定されたフォームフィールドにデータを入力し、入力済みのフォームを返します。 PDF。

出力タイプのオプション​

PDFPrint-ready locked layout
Standard choice for invoices, contracts, certificates, and statements. Attach to an Outlook email, save to a SharePoint document library, or store in a Dataverse file column.
WordEditable .docx output
Use when recipients need to edit the document (draft contracts going back for review, HR letters requiring a manual signature line).
ExcelSpreadsheet .xlsx output
Use for data-heavy templates such as financial reports. The template must be designed in Excel.
HTMLWeb-ready HTML
Use for emails or web previews. Output is a single HTML file you can embed or send through Outlook.

出力​

このアクションは動的コンテンツのバンドルを1つ返します。生成されたファイルは次の場所にあります。 ファイルの内容下流へ送る準備が整いました Microsoft 365 行動。

分野タイプ内容物
File ContentFile contentContent of the generated document. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file.
File NameTextFile name of the generated document, as returned by PDF4me. Use it as the file name when saving the file.
Page CountTextPage count reported by PDF4me for the processed document. Returned as text; wrap it in int() to use it as a number.

フローの例​

Power Automateの一般的なワークフローパターンTypical ways to chain Generate Document Single into a flow.
SharePoint メールリスト PDF
  1. SharePoint アイテムが作成または変更されると、請求書リスト上でトリガーが作動します。
  2. SharePoint ファイルコンテンツを取得すると、テンプレートライブラリから請求書のWordテンプレートが読み込まれます。
  3. リスト項目列を含む単一のマージテンプレートを生成する JSON出力タイプ PDF。
  4. Outlook 顧客へのメール送信時に、感謝のメッセージとともにファイルコンテンツを添付します。
証明書に対する回答フォーム
  1. Microsoft Formsでは、新しい回答が送信されると、コース完了のトリガーが作動します。
  2. OneDrive ファイルコンテンツを取得すると、証明書のWordテンプレートが読み込まれます。
  3. ドキュメントを生成 シングルは証明書を次のようにレンダリングします PDF Formsの応答を JSON。
  4. SharePoint ファイルの作成は証明書を証明書ドキュメントライブラリに保存し、 Outlook メールを送ると、それが学生に届きます。
Dataverseとの契約からTeamsの承認まで
  1. Dataverse は、取引に行が追加されると、成約済みの商談に対してトリガーを発生させます。
  2. SharePoint ファイルコンテンツを取得すると、契約テンプレートが読み込まれます。
  3. ドキュメントシングルを生成すると契約書が作成されます PDF 取引データから。
  4. Teams 承認ルート付きの適応型カードを投稿します。コンテンツを法的所有者に送って承認を得ます。

よくある質問​

What template file types does Generate Document Single accept in Power Automate?+
Three options under Template File Type: PDF4me Word Template (.docx with mustache template variables, most common), PDF4me HTML Template (.html for browser-rendered layouts), and PDF4me PDF Template (.pdf for form field replacement on a fillable PDF). Match the type to the extension of the file mapped under Template.
What output formats can the action produce?+
Output Type supports Word (.docx for editable output), PDF (locked layout, most common for invoices and contracts), Excel (.xlsx for spreadsheet output), and HTML for web embedding. The output format is independent of the template type, so a Word template can produce a PDF and vice versa.
How do I pass JSON data to the template in a flow?+
Set Document DataType to Json, then either paste the JSON object directly into Document Data Text (with dynamic content expressions for SharePoint columns or Forms responses) or map a data file from a previous step into Document Data File. Document Data Text is best for short payloads built inline, Document Data File for larger pre-built data documents.
Where does the generated file appear in dynamic content?+
The output is on the File Content dynamic-content field of the action. Pass File Content into SharePoint Create file, Outlook Send an email with attachment, OneDrive Create file, Dataverse Add a new row with file column, or Teams Post a message with file. The filename uses Template Name with the extension matching Output Type.
Does this work with Power Automate Desktop or only Power Automate (cloud)?+
The PDF4me Connect connector is a cloud connector available in Power Automate (the web flow designer). For desktop automation, call the same Generate Document Single REST endpoint with the HTTP action.
Can I generate multiple documents in a loop?+
Yes. Wrap Generate Document Single in an Apply to each loop over an array of records (Dataverse rows, SharePoint list items, Forms responses). The action runs once per record and returns one file per iteration. For true multi-record output in a single call use Generate Documents Multiple.
Is Meta Data Json required?+
No. Meta Data Json is optional. Use it when your template references document metadata (title, author, subject) at render time. Leave it empty for most invoice and contract templates.
How is this different from the Make, n8n, or Zapier version?+
All four platforms call the same PDF4me Generate Document Single backend. Power Automate is the Microsoft 365 native option with built-in SharePoint, Outlook, Teams, and Dataverse connectors. Make is the visual scenario builder, n8n is the developer-friendly self-hosted option, Zapier triggers from any of 6,000+ SaaS apps. The template logic and output formats are identical across platforms.

関連アクション​

他のプラットフォームでも同じタスクを実行​

ヘルプが必要な場合​