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 unique identifier of the generated document to get details, download, or delete it. |
(Note: For the "Delete Document" operation, only the "Document ID" property is required.)
Output
The node outputs JSON data representing the response from the PDFMonkey API for each operation:
- Delete Document: Outputs a JSON object indicating success status, a message confirming deletion, and the
documentIdof the deleted document.
Example output JSON:
{
"success": true,
"message": "Document deleted successfully",
"documentId": "abc123"
}
No binary data is output for the "Delete Document" operation since it only performs deletion.
Dependencies
- Requires an active PDFMonkey API key credential configured in n8n.
- Makes HTTP requests to the PDFMonkey API endpoints (
https://api.pdfmonkey.io/api/v1/documents). - Uses standard HTTP methods (DELETE) for document deletion.
Troubleshooting
- Missing API Key: If no API key is provided, the node throws an error indicating that authentication credentials are missing.
- Failed Deletion: If the document cannot be deleted (e.g., invalid document ID or network issues), the node logs an error and throws an operation error with the failure message.
- Invalid Document ID: Providing an incorrect or non-existent document ID will cause the deletion request to fail.
- Network Issues: Connectivity problems with the PDFMonkey API will result in request failures.
To resolve errors:
- Ensure the API key credential is correctly set up.
- Verify the document ID is correct and the document exists.
- Check network connectivity and API availability.