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

ドキュメントを生成する Make

PDF4me ドキュメントを生成する は Make マージするモジュール JSON または XML データを Word または HTML テンプレートを返し、完成した PDF、 Word、 または Excel ファイル。配置 {{fieldName}} テンプレート内のプレースホルダーに一致するキーと値のペアデータを指定すると、モジュールがサーバー側で置換処理を実行します。これは従来の文書生成モジュールです。複雑な条件ロジックを含む新しいシナリオでは、代わりに「Generate Document Single」を使用してください。

このモジュールの機能

PDF4meドキュメントを生成する マージ JSON または XML データを Word または HTML テンプレートを作成し、結果を完成品として返します。 PDF、 Word 文書、または Excel ファイルを、メール送信、保存、または処理の続行の準備ができています。 {{fieldName}} テンプレート内のプレースホルダーに一致するキーと値のデータを供給し、モジュールがサーバー側で置換を完全に実行します。 レガシー文書生成モジュール: 複雑な条件ロジックやループ構造を持つ新しいシナリオの場合は、 ドキュメントを生成 シングル 代わりに、完全なサポートを提供します PDF4me LINQ テンプレート構文。

関連ブログ記事
この機能に関するブログ記事はまだありません。近日公開予定です。
その間、PDF4me ブログを閲覧して、あらゆるプラットフォームのチュートリアルやワークフローをご覧ください。
ブログをご覧ください →

認証 API リクエスト​

毎 PDF4me モジュール Make 有効な 繋がり. 作成または選択して、 PDF4me API シナリオが文書生成要求を安全に認証できるようにするためのキー。

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

テンプレート名はファイル名であり、ダッシュボードテンプレートIDではありません。
の テンプレート名 フィールドにはテンプレート ファイルのファイル名 (例: invoice_template.docxDropbox、Google Drive、または OneDrive のダウンロード手順のファイル名出力からマッピングされます。これはテンプレート ID ではありません。 PDF4me ダッシュボードでは、実際のテンプレートバイナリは別々に提供されます 文書データファイル。
データはテキストでもファイルでも構いません。
マージデータを提供する方法は 2 つあります: 貼り付けまたはマップ JSON/XML 文字列を直接 文書データテキスト (以前のモジュール出力から構築された小さなペイロードに適しています)、またはバイナリをマッピングします JSON/XML ストレージモジュールからファイルを 文書データファイル (大容量データファイルや外部管理データファイルに適しています)。両方のファイルにデータが入力されている場合は、ファイルが優先されます。
複数のレコードの場合は、「ドキュメントの複数生成」を使用してください。
ドキュメント生成では、実行ごとに 1 つの出力ドキュメントが生成されます。データにレコードの配列 (たとえば、50 件の請求書レコード) が含まれており、レコードごとに 1 つのドキュメントが必要な場合は、 複数のドキュメントを生成するこれにより、配列を反復処理し、単一のモジュール呼び出しで生成されたすべてのファイルのZIPファイルを返すため、イテレータループが不要になります。
PDF4meの「ドキュメント生成」モジュールで、接続設定をtestuser01@pdf4me.com、テンプレートファイルタイプのドロップダウンをWord、出力タイプのドロップダウンをWord、ファイルをマップに設定し、テンプレート名を7.ファイル名から、ドキュメントデータファイルを7.データからマッピング、ドキュメントデータタイプをJson、ドキュメントデータテキストをJSON配列の例、メタデータJSONフィールドを表示するようにします。

セット テンプレートファイルの種類 そして 出力タイプ まず、次にワイヤー テンプレート名 そして テンプレート テンプレートをダウンロードした手順から。マージデータを提供するには、 文書データテキスト または 文書データファイル。

パラメータ​

必須: 繋がり、 テンプレートファイルの種類、 出力タイプ、 テンプレート名、 テンプレート、 そして ドキュメントデータ型。 セット ファイル に 地図 まず、テンプレート名とテンプレートを表示します。 オプション: 文書データテキスト、文書データファイル、およびメタデータJSON。

パラメータ必須その機能例
ConnectionRequiredPDF4me API connection. Click Add and paste your API key to create one.[email protected]
Template File TypeRequiredFormat of the template file. Options: Word, Html, Pdf. Defaults to Word. Has a Map toggle for dynamic scenarios. Hint: "Select Template file type."Word
Output TypeRequiredFormat of the generated document. The formats offered depend on the Template File Type: with Word it offers Pdf, Word, Excel and defaults to Word, with Html it offers Html only and defaults to Html, and with Pdf it offers Pdf, Word, Excel and defaults to Pdf.Pdf
Keep PDF EditableConditionalShown only when Template File Type is Pdf. Yes keeps the filled form fields editable in the results, No flattens the forms. Defaults to No.No
FileConditionalHow the template is supplied. Choose Map to wire Template Name and Template from a prior module. Choose Dropbox, Download a File for a direct Dropbox trigger.Map
Template NameRequiredFilename of the template including extension (e.g. invoice_template.docx). Hint: "Template file name." Map from the File Name output of your download step.7. File Name
TemplateRequiredBinary content of the template file used for generating the documents. Hint: "Template file for generating document." Map from the Data output of your download step.7. Data
Document DataTypeRequiredFormat of the data source. Options: Json, XML, Csv. Defaults to Json. Has a Map toggle. Hint: "Choose Document Data Type."Json
Document Data TextOptionalJSON, XML, or CSV data as a text string: paste a literal payload or map from a prior module output. Hint: "Input Data text to generate document." Example: [{"name":"John"},{"name":"Jane"}][{"name":"John"}]
Document Data FileOptionalBinary content of a data file from a storage module. Hint: "Map source document file content from the previous action." Use it instead of Document Data Text for larger payloads.8. Data
Meta Data JsonOptionalJSON for field formatting. Use FieldType 2 for date fields, FieldType 0 for checkboxes, FieldType 1 for HTML content. Hint: "MetaData for Fields."{"FieldsMetaData":[...]}

出力フィールド​

分野タイプ内容物
Generated DocumentsArrayThe generated documents, one per data record. Each item contains the file name and file content. Pass it to an Iterator to handle the items one by one.
Generated Documents[].File NameFile nameFile name of this item. Map into the file name field of your storage upload or email step.
Generated Documents[].DocumentFile (binary data)Content (binary data) of this item. Wire directly into a Create file action in SharePoint, Google Drive, Dropbox, or OneDrive, or attach it to a Gmail send action.

ドキュメント生成の設定方法 Make​

  1. 追加 PDF4me → ドキュメントを生成する あなたの Make シナリオ。
  2. 選択 繋がり (またはクリック) 追加 あなたと一緒に作成する API 鍵)。
  3. セット テンプレートファイルの種類 に Wordテンプレートの形式に合わせて、HTML、PDF、またはPDF形式で出力してください。
  4. セット 出力タイプ ご希望の形式に変換します。 Word また、PDF テンプレートは PDF を提供します。 Word、および Excel。HTML テンプレートは HTML のみを提供します。
  5. セット ファイル に 地図ワイヤー テンプレート名 ファイル名出力と 文書データファイル テンプレートのダウンロード手順に含まれるバイナリコンテンツへ。
  6. セット ドキュメントデータ型 JSON、XML、またはCSVに変換します。データを入力またはマッピングします。 文書データテキストまたは、データが既に文書データファイル経由で接続されている場合は、空欄のままにしてください。
  7. 保存 そしてクリック 1回実行. 生成されたドキュメント 配列にはデータレコードごとに1つの項目が保持され、それぞれに ファイル名 そして 書類:それをイテレータに渡し、各項目をストレージへのアップロードまたはメール送信のステップに接続します。

「文書生成」と「単一文書生成」の違いは何ですか?​

ドキュメントを生成する は、マスタッシュスタイルを使用するレガシーモジュールです。 {{fieldName}} プレースホルダー JSON または XML データ、サポート PDF、 Word、 または Excel 出力。 ドキュメントを生成 シングル フル交換が推奨されます LINQ レポートエンジンの構文: <<foreach>> ループ、 <<if>> 条件文、そして <<var>> 変数。既存の口ひげテンプレートにはドキュメントの生成を使用します。 XML データソース。複雑なロジックを持つ新しいテンプレートには「Generate Document Single」を使用します。 Make PDF4me 統合 そして PDF4me API ドキュメント 詳細については、こちらをご覧ください。

ワークフローの例​

ワークフローの例Common Make scenario patterns using Generate Documents.
新規注文 → 生成 PDF 請求書 → 顧客へのメール
  1. ShopifyまたはWooCommerceで新規注文が確定すると、Webhookが起動します。
  2. Google Drive は invoice_template.docx チームドライブに保存されています。
  3. ドキュメントを生成する テンプレート ファイル タイプを設定したテンプレートに、注文ペイロード (顧客名、明細項目、合計、支払期日) をマージします。 Word 出力タイプはPDFに設定されています。
  4. 生成された PDF 顧客に即座に送信されるGmailメッセージに添付されます。
  5. 別のGmailアカウントが、会計記録のためにGoogleドライブの「Invoices/2026」フォルダにコピーをアップロードします。
週次レポート → 生成 Word ドキュメント → チームに配布
  1. 毎週月曜日の朝にスケジュールされたシナリオが実行され、Googleスプレッドシートから前週のKPIデータが取得されます。
  2. A Make テキストモジュールはシートデータを組み立てて JSON レポートテンプレートのプレースホルダーに一致するフィールドを持つオブジェクト。
  3. ドキュメントを生成する を統合する JSON へ Word 出力タイプが設定されたレポートテンプレート Word。
  4. 生成された Word 午前9時の朝礼の前に、編集可能な添付ファイルとして文書が経営陣にメールで送信されます。
フォーム送信 → 証明書生成 PDF → アーカイブ
  1. Typeformのトレーニング完了フォームは、参加者の名前、コース、日付を含むシナリオをトリガーします。
  2. Dropboxはダウンロードします HTML チームアカウントに保存されている証明書テンプレート。
  3. ドキュメントを生成する 参加者データを統合して HTML テンプレートファイルタイプがhtml、出力タイプがPdfに設定されたテンプレート。
  4. 証明書 PDF 参加者にメールで送信され、 SharePoint コンプライアンス記録用の「証明書」ライブラリ。

よくある質問​

What is the difference between Generate Documents and Generate Document Single?+
Generate Documents is the legacy module supporting mustache-style {{fieldName}} placeholders with JSON or XML data, and can output PDF, Word, or Excel. Generate Document Single is the newer recommended module for the PDF4me LINQ Reporting Engine syntax, supporting <<foreach>> loops, <<if>> conditionals, <<var>> variables, and running totals. For new scenarios with complex template logic, use Generate Document Single. Use Generate Documents when you have existing mustache templates, need XML as the data source, or need Excel output.
Can I supply data as a file instead of pasting JSON into Document Data Text?+
Yes: use the Document Data File field and map the binary content of a JSON or XML file downloaded from Google Drive, Dropbox, OneDrive, or an HTTP request. This is the preferred approach for large data payloads or when the data file is managed separately from the Make scenario. If both Document Data File and Document Data Text are populated in the same module run, the file takes precedence and the text field is ignored.
What template syntax does this module support?+
For Word templates, use double-brace mustache placeholders: {{fieldName}} for text substitution. For HTML templates, use the same {{fieldName}} syntax inside HTML elements. The module does not support the PDF4me LINQ Reporting Engine syntax used by Generate Document Single, tags like <<foreach>>, <<if>>, and <<var>> are not processed by this legacy module. Keep templates to simple flat field substitution; for loops and conditionals, switch to Generate Document Single.
What is Meta Data Json used for?+
Meta Data Json is an optional parameter for controlling how specific template fields are formatted during the merge. Set FieldType to 2 with a FieldFormat string (e.g. "yyyyMMdd") for date fields, FieldType 0 for checkbox fields that should render as ticks or checkboxes, and FieldType 1 for fields that contain raw HTML content. The structure is {"FieldsMetaData":[{"FieldName":"dueDate","FieldType":2,"FieldFormat":"yyyyMMdd"}]}. Leave the field empty for plain text substitution with no special formatting.
Can I output Excel from a Word template, and what are the limitations?+
Yes. Set Template File Type to Word and Output Type to Excel to receive an Excel workbook as output. The module converts the merged Word document to XLSX. This works well for tabular data where the Word template is laid out as a table: each row maps to an Excel row. Complex Word formatting such as multi-column sections, text boxes, and advanced styles may not translate cleanly to Excel cells. Test your specific template before deploying to production.

関連モジュール​

ヘルプが必要な場合​