PDFMonkey icon

PDFMonkey

Generate PDFs using PDFMonkey API

Overview

This node integrates with the PDFMonkey API to manage PDF documents. It supports generating PDFs from templates, retrieving document details, downloading generated PDFs, and deleting documents. This is useful in workflows where automated PDF creation and management are needed, such as generating invoices, reports, contracts, or certificates dynamically based on input data.

For example:

  • Automatically generate a PDF invoice from order data.
  • Check the status of a PDF generation job.
  • Download the completed PDF for further processing or storage.
  • Delete obsolete or test documents from PDFMonkey.

Properties

Name Meaning
Document ID The ID of the generated document to get details, download, or delete.

Note: The "Document ID" property is required for operations: Get Document, Download PDF, and Delete Document.

Output

The node outputs JSON data containing the response from the PDFMonkey API for each operation:

  • Download PDF operation outputs:

    • json: Contains a message about the download status, the document ID, current status, and filename.
    • binary.data: The actual PDF file content downloaded from PDFMonkey, prepared as binary data with MIME type application/pdf.
  • For other operations like Generate Document, Get Document, and Delete Document, the output JSON contains the API response including document metadata and status information.

If the document is not ready for download (status not "success"), the node returns a JSON message indicating this state without binary data.

Dependencies

  • Requires an active PDFMonkey API key credential configured in n8n.
  • Uses the PDFMonkey REST API endpoints (https://api.pdfmonkey.io/api/v1/documents).
  • Network access to PDFMonkey API must be available.

Troubleshooting

  • No API Key Provided: The node will throw an error if the API key credential is missing or invalid. Ensure the API key is correctly set up in n8n credentials.
  • Document Not Ready for Download: If attempting to download a PDF before it is generated successfully, the node warns and returns a message instead of the file. Wait until the document status is "success".
  • Document Generation Failure: If PDFMonkey reports failure during generation, the node logs the failure cause. Check the template and payload data for correctness.
  • Delete Document Errors: Deletion failures return an error message. Verify the document ID and API permissions.
  • Rate Limits or Network Issues: API requests may fail due to rate limits or connectivity problems. Implement retry logic or check network settings.

Links and References

Discussion