1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

files → Encrypt a PDF

AI-generated

Overview

The "Encrypt a PDF" operation in the files resource of this n8n node allows you to securely lock a PDF file with a password. This is useful for automating workflows where sensitive documents need to be protected before sharing or storage. For example, you might use this node to encrypt invoices, contracts, or reports before emailing them to clients or uploading them to cloud storage.

Properties

Name Meaning
Password A string containing the secret password which will be used to lock (encrypt) the PDF.
PDF file The PDF file to be encrypted.
Binary Property Name of the binary property to which the encrypted PDF data will be written (default: "data").

Output

  • The output contains a binary field whose name matches the value provided in Binary Property (default: data).
  • This binary field holds the encrypted PDF file.
  • Any existing binary data on the input item is preserved and merged into the output.
  • The json field is passed through from the input item unchanged unless an error occurs.

Dependencies

  • External Service: Requires access to the 1001fx API.
  • Credentials: You must configure the 1001fxApi credential in n8n.
  • Environment: No special environment variables are required beyond standard n8n configuration.

Troubleshooting

  • Common Issues:

    • Missing Credentials: If the 1001fxApi credential is not set up, the node will fail to connect to the service.
    • Invalid PDF File: If the input file is not a valid PDF, encryption will fail.
    • Empty Password: The password property is required; leaving it blank will result in an error.
    • Binary Data Not Found: If the specified binary property does not exist on the input item, the node will throw an error.
  • Error Messages:

    • "error": "Request failed with status code 400": Indicates invalid input parameters (e.g., missing or incorrect file/password).
    • "error": "Cannot read property 'fileName' of undefined": The specified binary property was not found on the input item.
    • "error": "Unexpected token ... in JSON at position ...": The response from the API could not be parsed as JSON, possibly due to a server-side issue.

    How to resolve:

    • Double-check that all required properties are filled in correctly.
    • Ensure the input file is a valid PDF and exists under the correct binary property.
    • Verify your API credentials are correct and active.

Links and References

Discussion