PandaDoc icon

PandaDoc

Consume PandaDoc API

Overview

This node integrates with the PandaDoc API to manage documents programmatically. Specifically, the Delete Document operation allows users to delete a specified document from their PandaDoc account. This is useful in scenarios where documents are no longer needed, need to be removed for compliance reasons, or to keep the document repository clean.

Practical examples include:

  • Automatically deleting draft documents after a certain period.
  • Removing documents that were created erroneously.
  • Cleaning up documents after processing them in a workflow.

Properties

Name Meaning
Authentication Method of authenticating with PandaDoc API. Options: API Key, OAuth2.
Document The document to delete. Can be selected from a list of existing documents or specified by its ID (a string of at least 16 alphanumeric characters).

Output

The output JSON contains the response from the PandaDoc API after attempting to delete the document. Typically, this will confirm whether the deletion was successful or provide error details if it failed.

No binary data is output by this operation.

Example output structure (simplified):

{
  "json": {
    "id": "document_id",
    "status": "deleted",
    "message": "Document deleted successfully"
  }
}

If an error occurs, the output may contain an error message like:

{
  "json": {
    "error": "PandaDoc API error: <error message>"
  }
}

Dependencies

  • Requires a valid PandaDoc API authentication token, either via an API key or OAuth2 credentials.
  • The node uses the PandaDoc REST API endpoints to perform operations.
  • Proper configuration of the API credentials in n8n is necessary.
  • Network access to the PandaDoc API service is required.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials can cause authentication failures.
    • Providing an invalid document ID (less than 16 alphanumeric characters) will result in validation errors.
    • Attempting to delete a non-existent or already deleted document will return an error from the API.
    • Network connectivity problems can prevent the node from reaching the PandaDoc API.
  • Error messages and resolutions:

    • "Not a valid Document ID": Ensure the document ID matches the required format (at least 16 alphanumeric characters).
    • "PandaDoc API error: <message>": Check the API key or OAuth2 token validity, permissions, and network connectivity.
    • "The operation "delete" is not supported for resource "document"!": This should not occur if the node is used correctly; verify the resource and operation parameters.

Links and References

Discussion