Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
The "Add Attachment To PDF" operation allows users to add one or more file attachments to an existing PDF document. This node is useful in scenarios where you want to bundle supplementary files (such as text documents, images, or other PDFs) inside a PDF container for distribution or archiving purposes. For example, attaching a user manual or related documentation directly into a product specification PDF.
Users can provide the source PDF in multiple ways: as binary data from a previous node, as a base64-encoded string, or via a URL. Similarly, attachments can be supplied in these formats. The node processes the input PDF and embeds the specified attachments, outputting a new PDF file with the attachments included.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | How the source PDF is provided. Options: Binary Data (from previous node), Base64 String (base64 encoded content), URL (link to PDF file). |
| Input Binary Field | Name of the binary property containing the PDF file when using Binary Data input type (default: "data"). |
| Base64 PDF Content | Base64 encoded content of the PDF document when using Base64 String input type. |
| PDF URL | URL to the PDF file when using URL input type. |
| Output File Name | Desired filename for the resulting PDF with attachments (default: "document_with_attachments.pdf"). |
| Document Name | Reference name for the source PDF file (default: "document.pdf"). |
| Attachments | Collection of files to attach to the PDF. Each attachment includes: - Attachment Content Type: How the attachment content is provided (Binary Data, Base64 String, or URL). - Attachment Name: Filename for the attachment (required). - Base64 Content: Base64 encoded attachment content. - Binary Field Name: Binary property name containing the attachment file. - File URL: URL to the attachment file. |
| Advanced Options | Additional settings: - Custom Profiles: JSON string to customize API call properties. - Use Async Processing: Boolean to enable asynchronous processing (recommended for large files or high volume). |
| Debug Options | Debugging controls: - Enable Debug Mode: Turn on detailed logging. - Debug Log Level: Choose between Basic or Detailed logs. - Log to Console: Whether to output debug logs to console. |
Output
The node outputs a JSON object containing the processed PDF file with the added attachments. The main output field is:
binary: Contains the resulting PDF file data, typically under a binary property named according to the node's configuration.json: Metadata about the operation result may be included but primarily the binary data holds the updated PDF.
If debug mode is enabled, additional logging information may be available in the output or console.
Dependencies
- Requires access to an external PDF processing service API that supports adding attachments to PDFs.
- Needs proper API authentication credentials configured in n8n (e.g., an API key or token).
- Network access to fetch PDFs or attachments if URLs are used.
- Optional: JSON profiles for advanced customization of the API calls.
Troubleshooting
Common Issues:
- Incorrect binary property names leading to missing input files.
- Invalid base64 strings causing decoding errors.
- Unreachable URLs or network issues when fetching PDFs or attachments.
- Missing required fields such as attachment names.
- Large files causing timeouts or memory issues if async processing is disabled.
Error Messages:
- Errors related to invalid input format usually indicate mismatched inputDataType and provided data.
- API errors might mention authentication failures; ensure API credentials are valid.
- Timeout or server errors suggest enabling async processing or reducing file sizes.
Resolutions:
- Verify all required fields are correctly set.
- Use async processing for large files.
- Check network connectivity for URL inputs.
- Enable debug mode to get detailed logs for troubleshooting.
Links and References
- PDF4me API Documentation
- General info on PDF attachments: https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf (search for "File Attachments")