@robinpath/pandadoc
0.1.2Node.jsPublicPandaDoc module for RobinPath.
PandaDoc
PandaDoc module for RobinPath.
Package: @robinpath/pandadoc | Category: Documents | Type: Integration
Authentication
pandadoc.setCredentials "your-credentials"
Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.
Use Cases
Use the pandadoc module when you need to:
- listDocuments -- Use
pandadoc.listDocumentsto perform this operation - getDocument -- Use
pandadoc.getDocumentto perform this operation - createDocument -- Use
pandadoc.createDocumentto perform this operation - createDocumentFromTemplate -- Use
pandadoc.createDocumentFromTemplateto perform this operation - sendDocument -- Use
pandadoc.sendDocumentto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure pandadoc credentials. | object |
listDocuments | listDocuments | object |
getDocument | getDocument | object |
createDocument | createDocument | object |
createDocumentFromTemplate | createDocumentFromTemplate | object |
sendDocument | sendDocument | object |
getDocumentStatus | getDocumentStatus | object |
downloadDocument | downloadDocument | object |
deleteDocument | deleteDocument | object |
listTemplates | listTemplates | object |
getTemplate | getTemplate | object |
listContacts | listContacts | object |
createContact | createContact | object |
getDocumentDetails | getDocumentDetails | object |
listLinkedObjects | listLinkedObjects | object |
Functions
setCredentials
Configure pandadoc credentials.
Module: pandadoc | Returns: object -- API response.
pandadoc.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | apiKey |
listDocuments
listDocuments
Module: pandadoc | Returns: object -- API response.
pandadoc.listDocuments
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getDocument
getDocument
Module: pandadoc | Returns: object -- API response.
pandadoc.getDocument
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createDocument
createDocument
Module: pandadoc | Returns: object -- API response.
pandadoc.createDocument
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createDocumentFromTemplate
createDocumentFromTemplate
Module: pandadoc | Returns: object -- API response.
pandadoc.createDocumentFromTemplate
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
sendDocument
sendDocument
Module: pandadoc | Returns: object -- API response.
pandadoc.sendDocument
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getDocumentStatus
getDocumentStatus
Module: pandadoc | Returns: object -- API response.
pandadoc.getDocumentStatus
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
downloadDocument
downloadDocument
Module: pandadoc | Returns: object -- API response.
pandadoc.downloadDocument
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteDocument
deleteDocument
Module: pandadoc | Returns: object -- API response.
pandadoc.deleteDocument
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listTemplates
listTemplates
Module: pandadoc | Returns: object -- API response.
pandadoc.listTemplates
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getTemplate
getTemplate
Module: pandadoc | Returns: object -- API response.
pandadoc.getTemplate
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listContacts
listContacts
Module: pandadoc | Returns: object -- API response.
pandadoc.listContacts
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createContact
createContact
Module: pandadoc | Returns: object -- API response.
pandadoc.createContact
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getDocumentDetails
getDocumentDetails
Module: pandadoc | Returns: object -- API response.
pandadoc.getDocumentDetails
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listLinkedObjects
listLinkedObjects
Module: pandadoc | Returns: object -- API response.
pandadoc.listLinkedObjects
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Pandadoc API error (${res.status}): ${t} | Check the error message for details |
pandadoc.setCredentials requires apiKey. | Check the error message for details |
pandadoc.deleteDocument requires an ID. | Check the error message for details |
Pandadoc: "..." not configured. Call pandadoc.setCredentials first. | Check the error message for details |
@desc "List documents and validate result"
do
set $result as pandadoc.listDocuments
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Documents
Retrieve all items and loop through them.
@desc "Setup authentication"
do
pandadoc.setCredentials $token
enddo
@desc "List documents and iterate results"
do
set $result as pandadoc.listDocuments
each $item in $result
print $item
end
enddo
2. Create a new item with createDocument
Create a new resource and capture the result.
@desc "Setup authentication"
do
pandadoc.setCredentials $token
enddo
@desc "Create document"
do
set $result as pandadoc.createDocument
print "Created: " + $result
enddo
3. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
pandadoc.setCredentials $token
enddo
@desc "List documents and create document"
do
set $existing as pandadoc.listDocuments
if $existing == null
pandadoc.createDocument
print "Item created"
else
print "Item already exists"
end
enddo
4. Multi-step PandaDoc workflow
Chain multiple pandadoc operations together.
@desc "Setup authentication"
do
pandadoc.setCredentials $token
enddo
@desc "List documents, get document, and more"
do
set $r_listDocuments as pandadoc.listDocuments
set $r_getDocument as pandadoc.getDocument
set $r_createDocument as pandadoc.createDocument
print "All operations complete"
enddo
5. Safe listDocuments with validation
Check results before proceeding.
@desc "Setup authentication"
do
pandadoc.setCredentials $token
enddo
@desc "List documents and validate result"
do
set $result as pandadoc.listDocuments
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- pdf -- PDF module for complementary functionality
- excel -- Excel module for complementary functionality
- office -- Office module for complementary functionality
- docusign -- DocuSign module for complementary functionality
- hellosign -- HelloSign module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.2 | latest | 1 months ago |
Related Modules
rightplace
JS@robinpathv0.1.3
RightPlace integration — 130 functions for projects, WordPress, WooCommerce, email, files, git, spreadsheets, stages, docs, automations via rightplace-cli
asana
JS@robinpathv0.1.2
Asana module for RobinPath.
google-sheets
JS@robinpathv0.1.1
Google Sheets module for RobinPath.
airtable
JS@robinpathv0.1.2
Airtable module for RobinPath.
$ robinpath add @robinpath/pandadoc
