PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node provides an interface to upload files to the Pdf4me service. It supports multiple input methods for providing the file content: binary data from a previous node, a base64 encoded string, or a URL pointing to the file. Users can specify how long (in hours) the uploaded file should be retained and available on the Pdf4me platform.

This node is beneficial in workflows where documents need to be processed or manipulated by Pdf4me's PDF tools after uploading. For example, you might upload scanned invoices as binary data, or provide a URL to a document stored online, then use subsequent nodes to convert, compress, or extract data from those PDFs.

Practical examples:

  • Uploading a PDF received as binary data from an email attachment for further processing.
  • Uploading a base64 encoded document generated dynamically within the workflow.
  • Uploading a publicly accessible PDF via URL to integrate with Pdf4me's PDF manipulation features.

Properties

Name Meaning
Input Data Type Choose how to provide the file to upload. Options: Binary Data, Base64 String, URL
Input Binary Field Name of the binary property containing the file (used only if Input Data Type is Binary Data)
Base64 File Content Base64 encoded file content (used only if Input Data Type is Base64 String)
File URL URL to the file to upload (used only if Input Data Type is URL)
File Retention Hours Number of hours to keep the file available on Pdf4me (range 1-24 hours)

Output

The node outputs JSON data representing the result of the file upload operation to Pdf4me. This typically includes metadata about the uploaded file such as its identifier, status, and possibly URLs or tokens for accessing the file on Pdf4me.

If the node supports binary output (not explicitly shown here), it would represent the uploaded file or related data in binary form, but based on the provided code and properties, the main output is JSON metadata about the uploaded file.

Dependencies

  • Requires an active connection to the Pdf4me API service.
  • Needs appropriate API authentication credentials configured in n8n (e.g., an API key or token).
  • The node depends on the Pdf4me service being reachable and operational.
  • No additional environment variables are explicitly required beyond standard API credential configuration.

Troubleshooting

  • Common issues:

    • Providing an invalid or inaccessible URL when using the URL input type may cause upload failures.
    • Incorrectly specifying the binary property name when using binary data input will result in missing file data.
    • Base64 content must be correctly encoded; malformed strings will cause errors.
    • Specifying a retention time outside the allowed range (1-24 hours) may lead to validation errors.
  • Error messages:

    • Errors related to authentication usually indicate missing or invalid API credentials.
    • Network errors suggest connectivity problems to the Pdf4me API endpoint.
    • Validation errors often point to incorrect input parameters like file format, size, or retention hours.
  • Resolutions:

    • Verify API credentials and permissions.
    • Check that URLs are accessible and correct.
    • Confirm binary field names match the actual input data.
    • Ensure base64 strings are properly encoded.
    • Use retention hours within the specified limits.

Links and References

Discussion