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

添付ファイルを追加 PDF で n8n

添付ファイルを追加 PDF は PDF4me ノードアクション n8n 1つ以上のファイルを PDFスプレッドシート、画像、アーカイブ、または2番目の PDF 書類と並行してではなく、書類と一緒に輸送されます。契約書に裏付けとなる証拠書類を添付したり、報告書の隣に生データを送付したり、コンプライアンス申請書類に証明書を同梱したりする際に使用できます。

このノードの機能

PDF4me: 添付ファイルを追加 PDF ホストを取る PDF バイナリデータから、 Base64 Stringまたは URLすると、リストした各ファイルが埋め込まれます。 添付ファイル 添付ファイルは、別個のオブジェクトとして内部に格納されます。マージとは異なり、添付ファイルは独自のフォーマットとファイル名を保持し、受信者は個別に開いたり保存したりできます。各添付ファイルは異なるソースから取得できるため、前のノードからのバイナリファイルと、次のノードから取得したファイルなどが含まれます。 URL 同じ実行に組み込むことができます。

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

認証 API リクエスト​

毎 PDF4me ノード n8n 有効な 接続するための認証情報. 作成または選択して、 PDF4me API ワークフローが添付ファイル要求を安全に認証できるようにするためのキー。

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

添付はマージではありません
添付ファイルは独立したオブジェクトとして保持され、閲覧者はそれを保存することができます。一方、結合するとページの内容が1つの連続したドキュメントに統合されます。
添付ファイルは繰り返し可能なコレクションです
クリック 添付ファイルを追加 ファイルごとに1回。各エントリには独自のコンテンツタイプ、名前、ソースが含まれているため、バイナリ、base64、 URL 1回の実行で複数のソースを処理。
ファイル拡張子が重要
添付ファイル名は、読み取りアプリケーションが抽出されたファイルを開く方法を示すものなので、必ず.xlsxや.zipなどの正しい拡張子を含めてください。
n8n の PDF4me ノードは、アクションを「PDF に添付ファイルを追加」、入力データタイプを「バイナリデータ」、入力バイナリフィールドを「データ」、出力ファイル名を「document_with_attachments.pdf」、ドキュメント名を「document.pdf」に設定し、添付ファイルを追加ボタン付きの空の添付ファイルコレクションを作成します。

PDF4me 添付ファイルを追加 PDF パラメーターパネル n8n最初のエントリが追加される前に添付ファイルコレクションが空になっている

添付 vs 結合 vs 圧縮​

複数のファイルを1つのファイルとして送信する方法は3つあり、それぞれ受信者にとって異なる影響があります。

アプローチ受取人が受け取るもの最適なフィット感
Add Attachment to PDFOne PDF that opens normally, with the extra files available in the attachments panelSupporting material that must stay in its original format, such as a spreadsheet or an archive
Merge PDFsOne continuous document where all pages read in sequenceContent that genuinely belongs together as a single readable document
Zip the files togetherAn archive that must be unpacked before anything can be readBulk transfer where nothing needs to be readable without extracting first

添付ファイルを追加するパラメータは何ですか PDF 必要?​

必須: アクション、入力データタイプ、その入力タイプに一致するフィールド、出力ファイル名、ドキュメント名、および添付ファイルの下に少なくとも1つのエントリが必要です。バイナリデータ出力名とカスタムプロファイルには、動作するデフォルト値が設定されています。

パラメータ必須その機能例
Input Data TypeRequiredChoose how to provide the PDF file to add attachments to. Options: Binary Data, Base64 String, URL. Default is `Binary Data`.Binary Data
Input Binary FieldConditionalName of the binary property that contains the PDF file (usually "data" for file uploads). Shown when Input Data Type is Binary Data. Default is `data`.data
Base64 PDF ContentConditionalBase64 encoded PDF document content. Shown when Input Data Type is Base64 String.SGVsbG8gV29ybGQ=
PDF URLConditionalURL to the PDF file to add attachments to. Shown when Input Data Type is URL.
Output File NameOptionalName for the output PDF file with attachments. Default is `document_with_attachments.pdf`.document_with_attachments.pdf
Document NameOptionalName of the source PDF file for reference. Default is `document.pdf`.document.pdf
AttachmentsOptionalFiles to attach to the PDF document.One entry per embedded file
Advanced OptionsOptionalOptional settings, collapsed behind Add Option.Add Option
Custom ProfilesOptionalUse "JSON" to adjust custom properties. Review Profiles at https://dev.pdf4me.com/apiv2/documentation/ to set extra options for API calls.{ "preserveMetadata": true }
Binary Data Output NameOptionalCustom name for the binary data in n8n output. Default is `data`.data

各添付ファイルエントリ内のフィールド​

あなたが作成するすべてのエントリ 添付ファイルを追加 独自のフィールドセットを公開します。

出力フィールド​

成功したランは1 n8n アイテム PDF 埋め込みファイルを含む。

出力​

ノードが返すフィールド。

分野タイプ内容物
successBooleanTrue when the operation succeeded.
messageStringStatus message, `PDF with attachments created successfully`.
fileNameStringOutput File Name; `.pdf` is set as extension when it does not end in .pdf.
mimeTypeStringMIME type of the resulting file, for example `application/pdf`.
fileSizeNumberSize of the resulting file in bytes.
attachmentCountNumberNumber of attachments that were added.
dataBinaryThe PDF with the attachments.

添付ファイルを追加するにはどうすればいいですか? PDF で n8n?​

  1. 追加 PDF4me あなたの n8n ワークフローを選択し、 添付ファイルを追加 PDF アクション。
  2. で 接続するための認証情報選択してください PDF4me 認証情報またはクリック 新しい認証情報を作成する そしてあなたの API 鍵。
  3. セット 入力データタイプ に バイナリデータ (デフォルト)、 Base64 String、 または URL 対応するホストを提供する PDF 分野。
  4. 下 添付ファイル、 クリック 添付ファイルを追加 ファイルごとに一度設定し、 添付ファイルコンテンツタイプ、 添付ファイル名、および一致するソースフィールド。
  5. セット 出力ファイル名 (必ず .pdf) そして 文書名 ソースファイルの場合。
  6. ノードを実行し、返されたデータをルーティングします。 PDF 前進、確認中 attachmentCount 予想していたファイル数と比較して。

典型的な構成​

ワークフローの例Common n8n workflow patterns using Add Attachment to PDF.
領収書を添付した請求書
  1. 請求書 PDF 請求データから生成されます。
  2. 添付ファイルを追加 PDF 対応する領収書と承認記録を埋め込みます。
  3. 1つのファイルは、すべての証拠書類を同梱した状態で、買掛金担当部署に送られます。
ソースデータを含むレポート
  1. スケジュールされた分析レポートは、 PDF。
  2. 添付ファイルを追加 PDF 基盤となるものを埋め込む CSV 名前付き添付ファイルとしてエクスポートします。
  3. 読者は物語の流れを理解でき、必要に応じて生の数値を取り出して検証することができる。
付属書類付き契約書
  1. 署名依頼に応じて、テンプレートに基づいて契約書が作成されます。
  2. 添付ファイルを追加 PDF 証明書とスケジュールを埋め込む URLs。
  3. 相手方は、署名するための単一の完結した文書を受け取ります。
監査のためのコンプライアンスパッケージ
  1. アイテムループノードは、提出期間の証拠ファイルを収集します。
  2. 添付ファイルを追加 PDF それぞれを表紙書類に埋め込む。
  3. バンドルはアーカイブされており、添付ファイルを抽出します PDF ご要望があれば、後ほど解凍いたします。

実践的なヒント​

Always include the file extension in Attachment Name
The extension is what tells a reader application how to open the extracted file. A name without one leaves the recipient guessing.
Check attachmentCount against what you sent
Comparing the returned count to the number of entries you configured is the quickest way to catch a file that failed to embed.
Mention the attachments in the document body
Not every viewer surfaces the attachments panel, so a line of visible text telling the reader that supporting files are embedded prevents them being missed.
Mix sources freely within one run
Each entry has its own content type, so a binary file from an earlier node and a URL-hosted certificate can be embedded together.
Attach when format must survive, merge when it should not
A spreadsheet stays usable as a spreadsheet only if it is attached. Merging would flatten it into page content.
Watch the total size on outbound email
Embedded files count toward the PDF size, so a bundle of large attachments can push the document past a mail gateway limit.

チートシート​

分野価値
ActionAdd Attachment To PDF
Input Data TypeBinary Data
Input Binary Fielddata
Output File Namedocument_with_attachments.pdf
Document Namedocument.pdf
AttachmentsOne entry per file, added with Add Attachment
Attachment Content TypeBinary Data
Attachment Namesupporting_data.xlsx
Binary Data Output Namedata
CredentialsPDF4me API credential

よくある質問​

What is the difference between attaching a file to a PDF and merging PDFs?+
Merging combines page content into one continuous document, so the source files stop existing as separate items. Attaching embeds a file inside the PDF as a discrete object that a reader can open or save back out on its own, keeping the original format intact. Use merge when everything should read as one document, and attach when a spreadsheet, archive, or certificate needs to stay a separate file.
Can I attach more than one file in a single run?+
Yes. Attachments is a collection, so click Add Attachment once per file you want to embed. Each entry gets its own Attachment Content Type, Attachment Name, and source field, which means you can mix a binary file from a previous node with another pulled from a URL in the same request.
What file types can be attached to a PDF?+
Attachments are stored as embedded file objects rather than being converted, a mechanism defined in the ISO 32000 PDF specification, so common document, image, spreadsheet, presentation, archive, and data formats can all be carried. What matters is that Attachment Name includes the correct extension, because that is what tells a reader application how to open the file once extracted.
Will everyone be able to see the attachments?+
Embedded files are exposed through the attachments or bookmarks panel of a full PDF reader. Lightweight in-browser or mobile viewers sometimes do not surface that panel, so if attachments are essential to the recipient, mention in the document body that supporting files are embedded.
How do I get the attachments back out of a PDF later?+
Use the Extract Attachment From PDF action, which is the inverse operation. A common pattern is one n8n workflow that bundles supporting files into an outgoing PDF, and a second that extracts them again when the document comes back.

関連アクション​

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

ヘルプが必要な場合​