Pandadoc

Learn how to use Pandadoc with Composio

Overview

SLUG: PANDADOC

Description

PandaDoc offers document creation, e-signatures, and workflow automation, helping sales teams and businesses streamline proposals, contracts, and agreement processes

Authentication Details

full
stringDefaults to https://api.pandadoc.com/public/v1Required
generic_api_key
stringRequired

Connecting to Pandadoc

Create an auth config

Use the dashboard to create an auth config for the Pandadoc toolkit. This allows you to connect multiple Pandadoc accounts to Composio for agents to use.

1

Select App

Navigate to Pandadoc.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Pandadoc Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4pandadoc_auth_config_id = "ac_YOUR_PANDADOC_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": user_api_key}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Pandadoc for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, pandadoc_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Pandadoc toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["PANDADOC"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Contact

Description

This tool creates a new contact in pandadoc. it allows you to add a new contact with their personal and professional information to your pandadoc account. the tool is completely independent and doesn't require any external resource ids or dependencies.

Action Parameters

city
string
company
string
country
string
email
stringRequired
first_name
string
job_title
string
last_name
string
phone
string
postal_code
string
state
string
street_address
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Document Attachment

Description

Creates and adds an attachment to a pandadoc document. this tool allows you to attach downloadable files such as supplemental materials, excel spreadsheets, or other content without embedding them directly into the document. attachments can be added only to documents in 'document.draft' status, with a maximum of 10 files per document and a size limit of 50mb per file.

Action Parameters

document_id
stringRequired
file
stringRequired
name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Document from File Upload

Description

Creates a new document in pandadoc by uploading a file (pdf, docx, etc.). this tool converts existing documents into pandadoc documents for processing, signing, and tracking through the pandadoc system.

Action Parameters

file_path
stringRequired
name
stringRequired
owner
object
parse_form_fields
boolean
recipients
arrayRequired
tags
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Document Folder

Description

Creates a new folder in pandadoc to organize documents. this action allows users to create a new folder with a specified name and optionally set a parent folder to create a nested folder structure.

Action Parameters

name
stringRequired
parent_uuid
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Template

Description

This tool allows users to create a new template in pandadoc from a pdf file or from scratch. it handles file upload validation, parameter checks, proper error handling, and authentication with the pandadoc api. the template can be created either by uploading a pdf file or by providing a structured content object that defines the template layout and elements.

Action Parameters

content
object
description
string
file_path
string
name
stringRequired
tags
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create PandaDoc Webhook

Description

Creates a new webhook subscription in pandadoc to receive notifications about specific events. this action allows you to set up webhook notifications for various document-related events such as status changes, recipient completions, and updates. the webhook will send http notifications to your specified endpoint when the configured events occur.

Action Parameters

active
booleanDefaults to True
name
stringRequired
payload
array
triggers
arrayRequired
url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Contact

Description

This tool allows you to delete a contact from your pandadoc account. the action is permanent and cannot be undone.

Action Parameters

contact_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Template

Description

This tool deletes a specific template from pandadoc. once a template is deleted, it cannot be recovered. this action is permanent and should be used with caution.

Action Parameters

template_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Contacts

Description

A tool to list and search contacts in pandadoc. it retrieves a list of contacts with various options including filtering by email, search query, pagination, and shared status. all parameters are optional and it supports flexible queries to get contacts.

Action Parameters

count
integer
email
string
page
integer
query
string
shared
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Document Folders

Description

This tool retrieves a list of all document folders in pandadoc. it's a standalone action that doesn't require any external dependencies or resource ids. the tool will return a list of folders containing documents, with each folder containing information about its id, name, and parent folder relationship.

Action Parameters

count
integer
page
integer
parent_uuid
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Templates

Description

This tool retrieves a list of all templates available in the pandadoc account. it supports parameters to filter templates by name, shared status, deleted status, pagination, and tag filtering, and returns detailed template information.

Action Parameters

count
integer
deleted
boolean
fields
array
folder_uuid
string
page
integer
q
string
shared
boolean
tag
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Move Document to Folder

Description

This tool allows users to move a document to a specific folder within their pandadoc account. it performs a post request to move the document to the specified folder. both the document and the destination folder must exist.

Action Parameters

document_id
stringRequired
folder_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create or Update Contact

Description

This tool creates a new contact or updates an existing one in pandadoc based on the email address. if a contact with the provided email exists, it will be updated; otherwise, a new contact will be created.

Action Parameters

city
string
company
string
country
string
email
stringRequired
first_name
string
job_title
string
last_name
string
phone
string
postal_code
string
state
string
street_address
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Template Details

Description

This tool retrieves detailed information about a specific template by its id. the endpoint returns comprehensive template details including metadata, content details, and sharing settings.

Action Parameters

template_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired