Agent setup guide
Won Deal → PandaDoc Proposal
When a HubSpot deal reaches your proposal stage, a PandaDoc document is prepared from your template for the deal's contact and sent once you approve.
What it does
When a HubSpot deal reaches your proposal stage, a PandaDoc document is prepared from your template for the deal's contact and sent once you approve.
- Starts when a HubSpot deal moves into the stage you pick.
- Lists the deal's contacts; AI picks the recipient by your rules, fills your PandaDoc template's variables from the deal (values copied as written) and writes the email.
- A person approves every document in Reviews and can correct any of it; nothing reaches PandaDoc before that.
- Code checks there is exactly one valid recipient email and no placeholders left; anything else is held.
- Creates the document from your template (with the HubSpot deal id in its metadata, for PandaDoc Signed → Onboarding), sends it from PandaDoc and notes it on the deal.
What it needs
- A paid plan (agents run live on paid plans).
- An AI provider key (Settings → AI Providers).
- HubSpot, connected in Settings → Integrations.
- A PandaDoc API key (production keys come with PandaDoc's Enterprise plan; sandbox keys work for testing).
- A PandaDoc template with a recipient role and variables for the deal's details.
What it doesn't do
- It doesn't write or change proposal or contract text, and doesn't fill pricing tables: prices come from your template or the deal amount as written.
- It sends to one recipient; other parties (e.g. your countersigner) are set up in the PandaDoc template.
- It doesn't send reminders (see PandaDoc Unsigned Reminder) or follow the document after sending.
Availability and plans
Available
Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.
Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.
Before you start
- A paid plan: agents run live, and the Free plan only runs Dry Runs.
- An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
- These apps, connected in Settings → Integrations: HubSpot and PandaDoc.
- The app it watches, connected in Settings → Integrations (the agent starts from an app event).
- About 20 minutes.
Set it up step by step
Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.
1. Connect your AI provider
The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.
2. Connect HubSpot
Connect the HubSpot account your deals live in (Settings → Integrations → HubSpot).
3. Connect PandaDoc
Connect PandaDoc with an API key (Settings → Integrations → PandaDoc).
4. Pick the proposal stage
Open the trigger and pick your HubSpot account, the pipeline and the stage that means “send the proposal”.
| Setting | What to enter | In step |
|---|---|---|
| HubSpot account (deal trigger) | The HubSpot account whose deals start the agent. Pick your connected HubSpot account. | “Deal reached your proposal stage” |
| Deal pipeline | The HubSpot pipeline your deals move through. | “Deal reached your proposal stage” |
| Proposal stage | The stage that means “send the proposal”, e.g. Proposal or Closed won. | “Deal reached your proposal stage” |
5. Describe your proposals
Open “Find the deal's contacts” and pick your HubSpot account, then replace the placeholder in “Prepare the document” with your rules and template variable names.
| Setting | What to enter | In step |
|---|---|---|
| HubSpot account (contacts) | The same HubSpot account, to read the deal's contacts. Pick your connected HubSpot account. | “Find the deal's contacts” |
| Your proposal rules | Replace the placeholder with who receives proposals, your template's variable names and what goes in each, your email subject and message, and what must be true before sending. It starts as “[WHO RECEIVES YOUR PROPOSALS (E.G. THE CONTACT WHOSE TITLE INCLUDES CEO OR DIRECTOR), THE VARIABLE NAMES IN YOUR PANDADOC TEMPLATE AND WHAT GOES IN EACH (E.G. Client.Company = the company, Deal.Amount = the deal amount as written), YOUR EMAIL SUBJECT AND MESSAGE, AND WHAT MUST BE TRUE BEFORE ONE IS SENT]” until you replace it. | “Prepare the document” |
6. Pick your PandaDoc template
Open “Create it from your template” and pick your account, the template and the recipient role name, then the account on “Send it from PandaDoc”.
| Setting | What to enter | In step |
|---|---|---|
| PandaDoc account | The PandaDoc workspace the template is in. Pick your connected PandaDoc account. | “Create it from your template” |
| PandaDoc template | Pick the template to send (e.g. your proposal or quote). | “Create it from your template” |
| Recipient role name | The role name exactly as in the template (e.g. Client). | “Create it from your template” |
| PandaDoc account (send) | The same PandaDoc account. Pick your connected PandaDoc account. | “Send it from PandaDoc” |
7. Note it in HubSpot
Open “Note it on the deal” and pick your HubSpot account.
| Setting | What to enter | In step |
|---|---|---|
| HubSpot account (note) | The same HubSpot account, to note the document on the deal. Pick your connected HubSpot account. | “Note it on the deal” |
8. Test it with Dry Run
Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.
9. Switch the trigger on
Open the trigger and click “Activate app trigger”: deals that move into the stage from now on start the agent.
How it works
The agent is a normal workflow with 14 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.
- Deal reached your proposal stage — Starts on “Deal entered a stage” in HubSpot (an app event). Starts when a HubSpot deal moves into the stage you pick (e.g. “Proposal” or “Closed won”), with the deal's name, amount and close date.
- Find the deal's contacts — HubSpot: Find records. Lists the HubSpot contacts linked to the deal: name, email, job title and company.
- Prepare the document — AI step (runs on your AI provider key). AI picks the recipient from the deal's contacts using your rules, fills your template's variables from the deal, writes the email and lists anything to check.
- Approve the document — A person approves or rejects it in Reviews (the run waits). A person checks the recipient, the variables and the email in Reviews, corrects them if needed and approves. Nothing is created in PandaDoc without this approval.
- Not approved — Kept in the run history. Branch: Rejected. Rejected: nothing was created in PandaDoc.
- Check before sending — Step. Branch: Approved. In code, after approval: exactly one valid recipient email, a document name, and no placeholders left in the subject or message. Anything that fails is held.
- Passes the checks? — Decision: picks the branch to follow. Documents that pass go to PandaDoc; the rest are held for a person.
- Held — Kept in the run history. Branch: Held. The approved document failed a check (recipient email, name or leftover placeholders); nothing was created. The reason is in the run history.
- Create it from your template — PandaDoc: Create a document from a template. Branch: Passes. Creates the document from your PandaDoc template for the recipient, in your template's role, with the variables and the HubSpot deal id saved in its metadata. Waits until PandaDoc has built it.
- Ready to send? — Decision: picks the branch to follow. In code, from PandaDoc's answer: only a finished draft can be sent.
- Still being built — Kept in the run history. Branch: Not ready. PandaDoc was still building the document; it's in your PandaDoc drafts to send from there.
- Send it from PandaDoc — PandaDoc: Send a document. Branch: Ready. PandaDoc emails the document to the recipient with the approved subject and message.
- Note it on the deal — HubSpot: Add a note. Logs the document, the recipient and its status on the HubSpot deal's timeline.
- Sent — Kept in the run history. The run history keeps the deal, the approved document and PandaDoc's ids.
Test it with Dry Run
Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live. The sample has the same shape as a real event from the app.
Sample data fields
id, dealname, amount, pipeline, dealstage, closedate, owner_id, createdate, properties.
- Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
- Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.
Go live
- Open the trigger and click “Activate app trigger”: deals that move into the stage from now on start the agent.
- Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
- The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
- When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.
Questions
Does it write the proposal?
No. It uses your own PandaDoc template and only fills in its variables (company, names, the deal amount as written) and the recipient.
Can the AI change a price?
No. Variable values are copied from the deal exactly as written, and a person approves every document before it's created.
Who signs on our side?
Set up any countersigner in the PandaDoc template itself; the agent adds the client as the template's recipient role.
Troubleshooting
- “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
- A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
- An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
- No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
- A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
- A step failed: open the run in History and check that step in the Trace tab for the error and what it received.
Generated from the agent's own workflow, so it always matches what the agent does. Last updated .