Actions13
Overview
The node integrates with a PDF Generator API to manage PDF templates and perform various PDF-related operations. Specifically, for the Template - Open Editor operation, it retrieves a URL or session information that allows users to open an online editor interface for a selected PDF template. This editor can be used to preview and modify the template interactively.
This node is beneficial in scenarios where you want to programmatically access and edit PDF templates stored in the PDF Generator service without manually navigating the web interface. For example, automating template updates or integrating template editing into a larger workflow.
Practical example:
- You have a set of invoice templates and want to open the editor for a specific template to preview it with sample data before generating PDFs.
- Automate opening the editor with preloaded data and language preferences for different regional teams.
Properties
| Name | Meaning |
|---|---|
| Template | Select the template to work with. Can be chosen from a searchable list or entered by ID (number). |
| Editor Options | Collection of options for the editor: |
| Data | JSON data used to preview the template in the editor. |
| Language | UI language of the editor. Options: Czech, English, Estonian, German, Russian, Slovak. |
Output
The output JSON contains the response from the API endpoint that provides the editor URL or session details for the specified template. The exact structure depends on the API but typically includes:
- A URL or token to open the template editor.
- Possibly metadata about the template or editor session.
No binary data is output for this operation.
Example output JSON snippet (conceptual):
{
"editorUrl": "https://pdfgeneratorapi.com/editor/session/abc123",
"templateId": "12345",
"language": "en"
}
Dependencies
- Requires an API key credential for the PDF Generator API.
- The node uses authenticated HTTP requests to the PDF Generator API base URL (default:
https://us1.pdfgeneratorapi.com/api/v4). - No additional environment variables are needed beyond the API credential.
Troubleshooting
- Invalid Template ID: If the template ID is missing or not a number, the node will throw an error. Ensure the template ID is correctly provided.
- API Authentication Errors: If the API key is invalid or missing, requests will fail. Verify the API credential configuration.
- Malformed JSON in Editor Data: The
datafield must be valid JSON. Invalid JSON will cause errors. - Unsupported Language Option: Only the listed languages are supported. Using unsupported values may cause unexpected behavior.
- Network Issues: Connectivity problems to the API endpoint will result in request failures.
Links and References
- PDF Generator API Documentation — Official API docs for templates and editor usage.
- n8n Resource Locator Documentation — Explanation of resource locator input type used for selecting templates.