Zum Hauptinhalt springen

Anhang hinzufügen PDF In n8n

Anhang hinzufügen PDF ist ein PDF4me Knotenaktion in n8n das eine oder mehrere Dateien in ein PDFalso eine Tabellenkalkulation, ein Bild, ein Archiv oder eine zweite PDF Es wird zusammen mit dem Dokument transportiert, anstatt daneben. Verwenden Sie es, um Belege mit einem Vertrag zu bündeln, Rohdaten neben einem Bericht zu versenden oder Zertifikate mit einer Konformitätsmeldung zu verpacken.

Was dieser Knoten bewirkt

PDF4meAnhang hinzufügen PDF nimmt einen Gastgeber PDF aus Binärdaten, ein Base64 Stringoder ein URL, bettet dann jede Datei ein, die Sie unter auflisten Anlagen Darin befindet sich ein separates Objekt. Anders als beim Zusammenführen behalten die angehängten Dateien ihr Format und ihren Dateinamen und können vom Empfänger einzeln geöffnet oder gespeichert werden. Jeder Anhang kann aus einer anderen Quelle stammen, beispielsweise eine Binärdatei von einem vorherigen Knoten und eine Datei, die von einem anderen Knoten abgerufen wurde. URL kann in denselben Durchlauf eingebettet werden.

Verwandte Blog-Beiträge
Zu dieser Funktion gibt es noch keinen Blogbeitrag – folgt in Kürze.
Schauen Sie sich in der Zwischenzeit im PDF4me-Blog Tutorials und Arbeitsabläufe für alle Plattformen an.
Besuchen Sie den Blog

Authentifizierung Ihres API Anfrage

Jeder PDF4me Knoten in n8n erfordert eine gültige Anmeldeinformationen zum Verbinden mitErstellen oder wählen Sie einen Eintrag aus, der Ihre Daten enthält. PDF4me API Schlüssel, damit der Workflow Anhangsanfragen sicher authentifizieren kann.

Wichtige Fakten, die Sie nicht verpassen sollten

Anhängen ist nicht gleich Zusammenführen
Eine angehängte Datei bleibt ein separates Objekt, das der Leser speichern kann. Beim Zusammenführen wird der Seiteninhalt hingegen zu einem einzigen, durchgehenden Dokument zusammengefasst.
Anhänge ist eine wiederholbare Sammlung
Klicken Anhang hinzufügen Einmal pro Datei. Jeder Eintrag enthält seinen eigenen Inhaltstyp, Namen und Quellcode, sodass Sie Binär-, Base64- und andere Datentypen mischen können. URL Quellen in einem Durchlauf.
Die Dateiendung ist wichtig.
Der Dateiname gibt der Reader-Anwendung die Anweisung, wie die extrahierte Datei geöffnet werden soll. Geben Sie daher immer die korrekte Dateiendung wie .xlsx oder .zip an.
Der PDF4me-Knoten in n8n ist wie folgt konfiguriert: Aktion „Anhang zu PDF hinzufügen“, Eingabedatentyp „Binärdaten“, Eingabefeld „Daten“, Ausgabedateiname „document_with_attachments.pdf“, Dokumentname „document.pdf“ und eine leere Sammlung „Anhänge“ mit einer Schaltfläche „Anhang hinzufügen“.

PDF4me Anhang hinzufügen zu PDF Parameterbereich in n8nDie Sammlung „Anhänge“ ist leer, bevor der erste Eintrag hinzugefügt wird.

Anhängen vs. Zusammenführen vs. Zippen

Drei Möglichkeiten, mehrere Dateien als eine einzige Sendung zu übermitteln, mit unterschiedlichen Konsequenzen für den Empfänger.

AnsatzWas der Empfänger erhältOptimale Passform
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

Welchen Parametern fügt „Anhang hinzufügen“ hinzu? PDF Brauchen?

Erforderlich: Aktion, Eingabedatentyp, das Feld, das diesem Eingabetyp entspricht, Ausgabedateiname, Dokumentname und mindestens ein Eintrag unter Anhänge. Ausgabename für Binärdaten und benutzerdefinierte Profile enthalten standardmäßige Arbeitswerte.

ParameterErforderlichWas es tutBeispiel
ActionRequiredSelects the PDF4me node action to run. Choose Add Attachment To PDF.Add Attachment To PDF
Input Data TypeRequiredFormat of the host PDF input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName of the binary property on the incoming n8n item that holds the host PDF. Required when Input Data Type is Binary Data. Defaults to data.data
Base64 Document ContentConditionalBase64-encoded content of the host PDF. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
File URLConditionalPublicly reachable HTTPS URL to the host PDF. Required when Input Data Type is URL.https://example.com/contract.pdf
Output File NameRequiredFilename for the PDF returned with the files embedded. Include the .pdf extension.document_with_attachments.pdf
Document NameRequiredFilename of the source PDF, used for reference and tracking on the request.document.pdf
AttachmentsRequiredCollection of files to embed. Click Add Attachment once per file, then fill in the per-attachment fields listed below.One entry per embedded file
Binary Data Output NameOptionalName of the binary property the output item exposes. Defaults to data.data
Custom ProfilesOptionalAdvanced Options field for extra processing settings, supplied in a JSON-like format. Leave blank unless you have a specific profile to apply.{ "preserveMetadata": true }

Felder innerhalb jedes Anhangseintrags

Jeder Eintrag, den Sie erstellen mit Anhang hinzufügen legt seine eigenen Felder offen.

ParameterErforderlichWas es tutBeispiel
Attachment Content TypeRequiredHow this particular attachment is supplied. Choose Binary Data, Base64 Content, or File URL. Each entry can differ.Binary Data
Attachment NameRequiredFilename the embedded file will carry inside the PDF. Include the correct extension so readers can open it after extraction.supporting_data.xlsx
Binary Field NameConditionalName of the binary property holding this attachment. Required when Attachment Content Type is Binary Data.data
Base64 ContentConditionalBase64-encoded content of this attachment. Required when Attachment Content Type is Base64 Content.SGVsbG8gV29ybGQ=
File URLConditionalPublicly reachable HTTPS URL to this attachment. Required when Attachment Content Type is File URL.https://example.com/certificate.pdf

Ausgabefelder

Ein erfolgreicher Lauf bringt eins zurück n8n Gegenstand, der den PDF mit seinen eingebetteten Dateien.

FeldTypWas es enthält
Binary (data)BinaryThe PDF with all listed files embedded, under Binary Data Output Name (default data).
fileNameStringGenerated filename, matching Output File Name.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the returned PDF in bytes, including the embedded files.
attachmentCountNumberNumber of attachments successfully embedded. Compare it against your expected count to catch a silently skipped file.
successBooleanTrue when the attachment operation completed, false on failure. Use it to branch error handling.
messageStringHuman-readable status message, carrying success confirmation or error detail.

Wie richte ich das Hinzufügen von Anhängen ein? PDF In n8n?

  1. Hinzufügen PDF4me zu Ihrem n8n Workflow und wählen Sie den Anhang hinzufügen zu PDF Aktion.
  2. In Anmeldeinformationen zum Verbinden mit, wählen Sie Ihre PDF4me Anmeldeinformationen oder klicken Neue Anmeldeinformationen erstellen und fügen Sie Ihren ein API Schlüssel.
  3. Satz Eingabedatentyp Zu Binärdaten (Standard), Base64 String, oder URL und den passenden Host bereitstellen PDF Feld.
  4. Unter Anlagen, klicken Anhang hinzufügen Einmal für jede Datei, dann setzen Sie es Anhangsinhaltstyp, Name der Anlageund passendes Quellfeld.
  5. Satz Name der Ausgabedatei (muss enden in .pdf) Und Dokumentname für die Quelldatei.
  6. Führe den Knoten aus und leite die zurückgegebenen Daten weiter. PDF weiter, Überprüfung attachmentCount im Vergleich zur Anzahl der von Ihnen erwarteten Dateien.

Typische Konfigurationen

Workflow-BeispieleCommon n8n workflow patterns using Add Attachment to PDF.
Rechnung mit entsprechenden Belegen
  1. Eine Rechnung PDF wird aus Abrechnungsdaten generiert.
  2. Anhang hinzufügen PDF bindet die entsprechenden Belege und den Genehmigungsnachweis ein.
  3. Eine Akte geht an die Kreditorenbuchhaltung und enthält den gesamten Beweisablauf.
Bericht mit seinen Quelldaten
  1. Ein geplanter Analysebericht wird gerendert an PDFDie
  2. Anhang hinzufügen PDF bettet die zugrunde liegende CSV Als benannten Anhang exportieren.
  3. Die Leser erhalten den Sachverhalt und können die Rohdaten bei Bedarf zur Überprüfung abrufen.
Vertrag mit Anhängen
  1. Auf Anfrage zur Unterschrift wird ein Vertrag anhand einer Vorlage erstellt.
  2. Anhang hinzufügen PDF bettet Zertifikate und Zeitpläne ein, die von URLsDie
  3. Die Gegenpartei erhält ein einzelnes, in sich abgeschlossenes Dokument zur Unterzeichnung.
Compliance-Paket für die Prüfung
  1. Ein Loop-Over-Items-Knoten sammelt Beweisdateien für einen Ablagezeitraum.
  2. Anhang hinzufügen PDF bettet jedes einzelne in das Deckblatt ein.
  3. Das Paket ist archiviert, und Anhang extrahieren von PDF Kann auf Anfrage später ausgepackt werden.

Praktische Tipps

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.

Spickzettel

FeldWert
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

Häufig gestellte Fragen

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.

Verwandte Aktionen

Dieselbe Aufgabe auf anderen Plattformen

Hilfe erhalten