Actions21
Overview
This node integrates with the PandaDoc API to create a new document based on an existing template. It is useful for automating document generation workflows where standardized templates are used, such as contracts, proposals, or agreements. By selecting a template and providing necessary details like recipients and content placeholders, users can quickly generate customized documents ready for review or signing.
Practical examples include:
- Automatically generating sales proposals from a predefined template and sending them to clients.
- Creating contract documents with pre-filled recipient information and pricing tables.
- Producing onboarding documents personalized with metadata and tags for organizational purposes.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with the PandaDoc API. Options: "API Key" or "OAuth2". |
| Template | The template to use for creating the document. Can be selected from a list of available templates or specified by its ID. |
| Name | The name to assign to the newly created document. |
| Recipients | List of recipients who will receive the document. Each recipient includes: Email (required), First Name, Last Name, Role (must match a role in the template), and Signing Order (the sequence in which recipients sign). |
| Options | Additional options for the document: |
| - Tags | Comma-separated tags to categorize or label the document. |
| - Metadata | Key-value pairs of metadata to attach to the document for custom data tracking. |
| - Pricing Tables | One or more pricing tables, each with a name and multiple items specifying name, description, price, and quantity. |
| Content Placeholders | Content blocks to insert into specific placeholder blocks within the template, identified by Block ID and containing JSON content. |
| Folder UUID | UUID of the folder where the document should be stored. If empty, the document is not placed in any folder. |
Output
The node outputs an array of JSON objects representing the created document(s). Each output item contains the full response from the PandaDoc API about the newly created document, including its unique identifier, status, creation date, and other relevant metadata.
If the operation fails for any input item and "Continue On Fail" is enabled, the output will include an error object describing the failure for that particular item.
No binary data is produced by this operation.
Dependencies
- Requires access to the PandaDoc API.
- Requires either an API key credential or OAuth2 authentication configured in n8n.
- The node uses internal helper functions to make authenticated HTTP requests to PandaDoc endpoints.
- No additional external dependencies beyond the PandaDoc API and n8n credentials.
Troubleshooting
Common issues:
- Invalid or missing template ID: Ensure the template exists and the ID matches the required format.
- Recipient roles not matching template roles: The role assigned to each recipient must correspond exactly to a role defined in the selected template.
- Authentication errors: Verify that the API key or OAuth2 token is valid and has sufficient permissions.
- Incorrect folder UUID: If specifying a folder, ensure the UUID corresponds to an existing folder accessible by the API user.
Error messages:
"PandaDoc API error: <message>"indicates an issue returned by the PandaDoc API, such as invalid parameters or permission issues."The operation 'createFromTemplate' is not supported for resource 'document'!"suggests a misconfiguration or unsupported operation selection.
To resolve errors, check the input parameters carefully, confirm API credentials, and consult PandaDoc API documentation for detailed error explanations.