Integrations / PandaDoc
PandaDoc
Document automation and e-signature: templates, documents and sending for signature.
5 actions
API key
3 read2 write
Calls api.pandadoc.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "pandadoc" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Create document from templatewritepandadoc.create_document_from_templateCreate a draft document from a template, filling recipients (by role), merge variables (tokens), fields and metadata. It is created as a draft; PandaDoc processes it asynchronously, so poll get_document until status is document.draft before sending.
| Input | Type | Description | |
|---|---|---|---|
template_uuid | string | Required | Template id from list_templates |
name | string | Optional | Document name |
recipients | array of object | Required | Recipients: [{email, first_name, last_name, role}] where role matches a template role |
tokens | array of object | Optional | Template variables: [{name, value}] |
fields | object | Optional | Field name to {value}, e.g. {"Delivery": {"value": "Same Day"}} |
metadata | object | Optional | Your own key-value data stored on the document |
tags | array of string | Optional | Tags |
await setu.execute({
userId: "user_1",
action: "pandadoc.create_document_from_template",
input: {
"template_uuid": "<template_uuid>",
"recipients": []
},
});Get documentreadpandadoc.get_documentGet a document's details: status, dates, recipients, total and template.
| Input | Type | Description | |
|---|---|---|---|
id | string | Required | Document id |
await setu.execute({
userId: "user_1",
action: "pandadoc.get_document",
input: {
"id": "<id>"
},
});List documentsreadpandadoc.list_documentsList and search documents with id, name and status. Filter by name, status number (0 draft, 1 sent, 2 completed...), template or tag.
| Input | Type | Description | |
|---|---|---|---|
q | string | Optional | Match on name or reference number |
status | integer | Optional | 0 draft, 1 sent, 2 completed, 5 viewed, 6 waiting approval, 11 voided, 12 declined |
template_id | string | Optional | Only documents made from this template |
tag | string | Optional | Only documents with this tag |
order_by | string | Optional | Sort field, prefix with - for descending, e.g. -date_created |
count | integer | Optional | Results per page (max 100, default 50) |
page | integer | Optional | Page number |
await setu.execute({
userId: "user_1",
action: "pandadoc.list_documents",
input: {},
});List templatesreadpandadoc.list_templatesList document templates with ids and names; search by name or tag.
| Input | Type | Description | |
|---|---|---|---|
q | string | Optional | Match on template name |
tag | string | Optional | Only templates with this tag |
count | integer | Optional | Results per page |
page | integer | Optional | Page number |
await setu.execute({
userId: "user_1",
action: "pandadoc.list_templates",
input: {},
});Send documentwritepandadoc.send_documentSend a draft document to its recipients by email for signature. This emails external people; the document must be in draft status. With a sandbox key, sending is limited.
| Input | Type | Description | |
|---|---|---|---|
id | string | Required | Document id |
subject | string | Optional | Email subject |
message | string | Optional | Email message with the signing link |
silent | boolean | Optional | Send no email notifications; recipients use a shared link instead |
await setu.execute({
userId: "user_1",
action: "pandadoc.send_document",
input: {
"id": "<id>"
},
});