Power Automateでメール本文とすべての添付ファイルを1つの統合PDFに変換する:OutlookとPDF4meを使った7ステップのワークフロー
· 1分で読める
メール主導のワークフローで苦痛なのはメールそのものではなく、 それに伴うすべて本文にはコンテキスト(送信者、送信理由、実行方法)が含まれ、添付ファイルには成果物(請求書、フォーム、署名済み契約書)が含まれます。これらを別々に保存すると、後でメッセージを再構築するのに将来の自分が3回クリックする必要が生じます。このチュートリアルでは、正確なパターンを構築します。 パワーオートマタ と PDF4meでPDFに変換、 PDF4meで複数のPDFファイルを結合する、 見通し、 Dropbox、そして「各ループに適用」が1つ。フローアクションは7つ。受信メールが1通届きます。統合されたPDFが1つ送信され、本文が先に、次に添付ファイルが1つずつ、タイムスタンプ付きで自動的にアーカイブフォルダに保存されます。
流れの概要
1. When a new email arrives (V3)
Outlook trigger on To [email protected]. Include Attachments Yes, Only with Attachments Yes.
2. Initialize variable
Name email, Type Array. Buffer for every PDF binary the flow produces.
3. Convert to PDF Body
PDF4me action. Content triggerOutputs body/body (the HTML body), File Name email-body.html. Returns the body as PDF.
4. Append to array (email body)
Push base64ToBinary on the converted body PDF onto the email array. This is page 1 of the final document.
5. Apply to each attachment
Loop triggerOutputs body/attachments. Convert each to PDF, then Append to array with base64ToBinary.
6. Merge multiple PDFs
PDF4me action. Body/docContent the email array, Output File Name Email Attachment Merge Output.pdf.
7. Create file
Dropbox /blog data/merge blog template/output. File Name concat(merge-, formatDateTime(utcNow(), yyyyMMdd-HHmmss), .pdf).