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

データ文字列リストを使用したメールマージでドキュメントを Power Automate

PDF4me データ文字列を使用したドキュメントリストのメールマージ は Power Automate 1つの単語または PDF テンプレートプラス JSON データ配列を、1回の呼び出しでパーソナライズされたドキュメントのバッチに変換します。これを使用すると、マージテンプレートをフロー内でレコードごとにループさせることなく、受信者リスト全体に対してオファーレター、証明書、またはアカウント通知を生成できます。

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

PDF4me データ文字列を使用したドキュメントリストのメールマージ ワードをマッピングしますまたは PDF マージテンプレートプラス JSON データ配列を返し、データ行ごとに1つの生成されたドキュメントの配列を返します。配列の配列とオブジェクトの配列の両方のデータ文字列形状がサポートされています。

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

認証 API リクエスト​

アクセスするには PDF4me ウェブ API を通して Power Automateすべてのリクエストには有効な API キー。認証はあなたの身元を検証し、コネクタがアクセスできるようにします。 PDF4meフローからメールマージサービスを実行します。

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

1回の呼び出しで、データ行ごとに1つのドキュメント
単一のアクション呼び出しで出力ドキュメントの配列全体が返されるため、受信者ごとにテンプレートマッピングをループする必要はありません。
サポートされている2つのデータ文字列形状
ヘッダー行を含む配列の配列、またはフィールド/値オブジェクトの配列のいずれか、前のアクションの出力から構築しやすい方を使用してください。
テンプレートは Word または PDF
テンプレートファイルデータは、データ文字列の列名またはフィールド名に一致する差し込みフィールドが含まれている限り、.docxファイルまたは.pdfファイルのどちらでも受け入れます。
Power Automate の PDF4me メールマージ(データ文字列付き)アクションで、テンプレートファイルデータ、テンプレートファイル名、およびデータ文字列フィールドが表示されます。

マップテンプレートファイルデータとテンプレートファイル名、次にデータ文字列を構築します JSON 生成するドキュメントごとに1つのエントリを持つ配列。

パラメータ​

必須: アクションを実行するには、テンプレートファイルデータ、テンプレートファイル名、データ文字列の3つのフィールドすべてを指定する必要があります。

パラメータ必須その機能例
Template File DataRequiredContent of the merge template, mapped from a prior action such as SharePoint or OneDrive Get File Content. Must be a .docx or .pdf file containing merge fields.[Template Content]
Template File NameRequiredName of the template file including its extension, used for processing identification.LetterTemplate.docx
Data stringRequiredJSON data to merge into the template. Accepts an array-of-arrays with a header row followed by value rows, or an array of field/value objects. Each row or object after the header generates one document.[["Name","Email"],["John","[email protected]"]]

データ文字列を使用したメールマージでは何が返されますか?​

分野タイプ内容物
Output DocumentsArray of ObjectsOne entry per generated document, directly iterable with Apply to each.
File ContentBinaryBinary content of each generated document, nested inside each Output Documents entry.
File NameStringFile name of each generated document, nested inside each Output Documents entry.
{
"Output Documents": [
{ "File Content": "[Binary Content]", "File Name": "Letter_001.pdf" },
{ "File Content": "[Binary Content]", "File Name": "Letter_002.pdf" }
]
}

データ文字列を使用したメールマージの設定方法 Power Automate?​

  1. 追加 PDF4me → データ文字列を使用したドキュメントリストのメールマージ あなたの Power Automate 流れ。
  2. 地図 テンプレートファイルデータ そして テンプレートファイル名 テンプレートから保存されています SharePoint または、データ列と一致する差し込みフィールドを含むOneDrive。
  3. 建てる データ文字列 として JSON 配列。ヘッダー行の後に値行が続く形式、またはフィールド/値オブジェクトの配列のいずれかで、生成するドキュメントごとに1つのエントリを指定します。
  4. フローを実行する。 PDF4me リターン 出力文書データ行ごとに生成されたドキュメントが1つ含まれる配列。
  5. 追加する それぞれに適用する 出力ドキュメントに対して、生成された各ドキュメントを個別にメール送信、アップロード、またはアーカイブする操作を実行します。

どのデータ文字列形式を使用すべきですか?​

使用する 配列の配列 ソースデータが既に出力されている場合、ヘッダー行の後に値行が続く形式です。 Excel または、行と列に直接マッピングされるため、テーブル形状のコネクタを並列配列として使用します。 オブジェクトの配列 ソースデータが次のようなシステムから来る場合のフォーマット CRM または、各オブジェクトのキーがテンプレートのマージフィールド名と既に一致しているため、レコードごとに名前付きフィールドを自然に返すフォームコネクタ。

典型的な構成​

ワークフローの例Common Power Automate flow patterns using Mail Merge with Data String List of Docs.
証明書の一括生成
  1. LMSでトレーニングコースが完了とマークされると、フローがトリガーされます。
  2. 参加者リストを取得すると、コースを修了したすべての参加者の名前と修了日が取得されます。
  3. Composeアクションは、名前/コース/日付オブジェクトの配列としてデータ文字列を構築します。
  4. データ文字列を使用したメールマージでは、1回の呼び出しで参加者ごとに1つの証明書が生成され、各証明書を「各参加者に適用」ループによって受信者にメールで送信されます。
パーソナライズされたオファーレター
  1. 採用担当者がATS(採用管理システム)で候補者の一括承認を行うと、選考プロセスが開始されます。
  2. 候補者データを取得すると、承認された各候補者の名前、役職、給与が取得されます。
  3. データ文字列を使用したメールマージ機能は、オファーレターのテンプレートをマッピングし、候補者ごとに1通のレターを生成します。
  4. 出力文書の配列は、個別に配布される前に人事部に送られ、レビューされます。
定期アカウント通知
  1. 繰り返しトリガーは、毎月の請求通知フローを実行します。
  2. 顧客データを取得するには、その月に通知が必要なすべてのアカウントについて、請求システムに問い合わせてください。
  3. データ文字列を使用したメールマージ機能は、単一の通知テンプレートからアカウントごとにパーソナライズされた通知を生成します。
  4. 「各項目に適用」ループは、各通知を顧客のサイトにアップロードします。 SharePoint フォルダに保存し、概要メールを送信します。

実践的なヒント​

Match merge field names to Data string keys exactly
The template's merge fields must line up with the Data string's column headers or object keys, character for character, or those fields render blank in the output.
Pick one Data string shape and stick with it
Mixing array-of-arrays and array-of-objects rows in the same request is not supported. Choose whichever shape your upstream data source already produces to avoid an extra transform step.
Use Compose to build the Data string before the action
Building the JSON array in a Compose action makes it easy to inspect and debug the exact payload before it reaches Mail Merge with Data String.
Always follow with Apply to each
Output Documents is an array by design, so downstream email, SharePoint, or archive steps need an Apply to each loop rather than a single-item reference.
Keep the template in the same PDF4me account you authenticate with
A template that renders correctly when tested manually can still fail from a flow if the connection used to run the flow points at a different PDF4me account than the one that owns the template file.

チートシート​

分野価値
ActionMail Merge with Data String List of Docs
Template File Data.docx or .pdf, mapped from a prior action
Template File Namee.g. LetterTemplate.docx
Data stringArray-of-arrays (header + rows) or array-of-objects
Documents generatedOne per data row/object
OutputOutput Documents array, each with File Content + File Name
Next stepApply to each over Output Documents

よくある質問​

How do I generate multiple documents from one template in Power Automate?+
Add the PDF4me Mail Merge with Data String List of Docs action, map Template File Data and Template File Name from a Word or PDF template containing merge fields, then build the Data string as a JSON array with one entry per document. The action returns Output Documents, an array ready for an Apply to each loop.
What format does the Data string need?+
Data string accepts two JSON shapes: an array-of-arrays with a header row followed by value rows, for example [["Name","Email"],["John","[email protected]"]], or an array of field/value objects. Each additional row or object after the header produces one generated document.
Can the template be a PDF instead of a Word document?+
Yes. Template File Data accepts both .docx and .pdf templates, as long as the template contains the merge fields referenced by the Data string's column or field names.
How do I process each generated document afterward?+
Feed the action's Output Documents array into an Apply to each control. Inside the loop, each item exposes its own File Content and File Name, which can be emailed, uploaded to SharePoint, or zipped into an archive. See <a href="https://learn.microsoft.com/en-us/power-automate/apply-to-each" target="_blank" rel="noopener noreferrer">Microsoft's Apply to each documentation</a> for loop configuration details.
Is there a single-document version of this action?+
Yes. For a one-template, one-record merge, use the PDF4me Generate Document Single action, linked under Related Actions below. See <a href="https://learn.microsoft.com/en-us/connectors/pdf4me/" target="_blank" rel="noopener noreferrer">the PDF4me Power Automate connector reference</a> for the full action list.

業界におけるユースケースとアプリケーション​

人事・給与計算の活用事例

  • 内定通知書1回の通話で、採用候補者全員にパーソナライズされた雇用オファーを生成する
  • 入社手続き書類新規採用者全員分の入社書類を一度に作成する
  • 業績評価単一のレビューサイクルから全スタッフのレビュー文書を生成する
  • 給付内容説明書:加入期間に合わせて、個々のニーズに合わせた福利厚生概要を作成する

関連アクション​

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

ヘルプが必要な場合​