Olmec Dynamics
H
·8 min read

How to Auto-Generate Tailored PandaDoc Proposals from HubSpot Deals Using Make.com and OpenAI

Generate tailored PandaDoc proposals from HubSpot deals using Make.com and OpenAI. Draft custom sections, populate pricing tables, validate, and send for signature.

Introduction

Sales teams lose momentum when deals stagnate on generic proposals. You copy deal fields into a template, hand-craft a bespoke paragraph, paste pricing into a table, then upload and send. That takes time, introduces errors, and makes it hard to produce consistent, audit-ready proposals at scale.

This guide shows how to build an advanced Make.com scenario that: reads a HubSpot deal, enriches and normalises the data, asks OpenAI to draft tailored proposal sections (scope, executive summary, recommended options) in a strict JSON format, maps line items into a PandaDoc dynamic table, validates the model output, creates the PandaDoc document from a template, and optionally sends it for signature. By the end you will have a production-ready pattern with idempotency, validation gates, and Slack alerts for exceptions.

What you will know by the end: how to wire HubSpot 126 Make.com 126 OpenAI 126 PandaDoc, how to map HubSpot deal properties to PandaDoc merge fields and dynamic tables, and how to build safety checks so LLM output never becomes a blind write to a contract template.

What You'll Need

  • Accounts and permissions:

    • Make.com account with access to HubSpot, PandaDoc, OpenAI, Google Drive, and Slack modules (paid Make.com tier recommended for long-running scenarios and retries)
    • HubSpot account with API access and a deal pipeline you can read from. You will need permission to read deal properties and associated line items
    • PandaDoc account with API access and a prepared template that includes merge fields and a dynamic pricing table placeholder
    • OpenAI API key with access to structured outputs (use deterministic settings, temperature=0)
    • Google Drive for storing raw artifacts and model prompts for auditability
    • Slack workspace for ops alerts
  • Prerequisites and notes:

    • PandaDoc templates must define the table structure and recipient roles you will use. Confirm the exact merge keys and table keys in PandaDoc before mapping.
    • HubSpot deal properties use field keys and may require referencing internal IDs for some enums. Pull your deal property list with the HubSpot Properties API to confirm names.
    • OpenAI structured outputs should return strict JSON. Plan to validate the JSON schema in Make and require confidence thresholds.

How It Works (The Logic)

Trigger: Deal stage moves to "Proposal" in HubSpot or a button is clicked on the deal record.

  1. Make.com pulls the full HubSpot deal record, owner, contact info, and associated line items.
  2. Make.com normalises dates, currencies, and item rows into a compact payload.
  3. Make.com calls OpenAI with a prompt that requests a JSON object with keys: executive_summary, scope_paragraphs (array), options (array), confidence. OpenAI must return only JSON, temperature=0.
  4. Make.com validates the JSON schema and ensures confidence >= threshold. If low confidence, route to manual review in Slack.
  5. Build PandaDoc payload: map simple merge fields, and map the line items array into the PandaDoc table structure expected by your template (tables.data 126 rows).
  6. Call PandaDoc API to create the document from the template and pass fields and table data.
  7. Optionally call PandaDoc to send the document to recipients, or leave as draft and notify the owner to review.
  8. Store raw prompt, model output, and PandaDoc response in Google Drive. Update the HubSpot deal with document id and status. Post Slack notifications for success or for manual review cases.

Step-by-Step Setup

  1. Decide trigger and idempotency key
  • Trigger options: HubSpot webhook on deal property change (recommended) or scheduled polling. Use the HubSpot deal ID as your idempotency key.
  • In Make.com start with the HubSpot module "Watch deal property changes" (or webhook), configured to trigger when stage = "Proposal" or when a custom boolean "generate_proposal" flips true.

Gotcha: always check the deal's existing pandadoc_document_id before creating a new document to avoid duplicates.

  1. Pull deal details and line items
  • Module: HubSpot "Get deal" and then "Get associated line items". Map essential fields:
    • deal_name, amount, currency, close_date, owner_email, primary_contact_email
    • line_items: each item should supply description, qty, unit_price, and SKU or code if present

Normalization: convert amounts to numbers, format dates to RFC3339, and ensure currency codes match PandaDoc expectations.

  1. Build a compact payload and save an audit snapshot
  • Module: Tools "Set variables" to build payload: {deal_id, owner, contact, amount, items[]}.
  • Save the raw payload to Google Drive as a JSON file named with the deal ID and timestamp. Keep a copy of the prompt mapping.

Why: You need a replayable artifact for audits and to debug model drift.

  1. Call OpenAI for proposal text in a strict JSON schema
  • Module: OpenAI (or HTTP to OpenAI). Prompt must request JSON only and include examples. Example JSON schema keys:
    • executive_summary: string
    • scope_paragraphs: array of strings
    • options: array of objects {title, description, monthly_price, one_off}
    • confidence: number 0.0-1.0

Prompt guidance: include three brief examples showing exact JSON output. Set temperature=0 and max_tokens to a value that covers your outputs.

Validation: parse the JSON. If parsing fails or confidence < 0.7, route to manual review. Do not let raw text into the template without validation.

  1. Map model outputs to PandaDoc merge fields and the dynamic table
  • Merge fields: map the executive_summary into a merge field like {{EXEC_SUMMARY}} and map the top-level deal fields (deal_name, owner_name, total) to their respective PandaDoc fields.
  • Table mapping: transform items[] plus any OpenAI options into the PandaDoc table payload. PandaDoc expects something like: { "tables": [{ "id": "pricing_table_1", "rows": [ {"cells": [{"content":"Item"}, {"content":"Qty"}, {"content":"Unit"}, {"content":"Total"}]}, ... ] }] }

Make.com must build this JSON exactly as PandaDoc requires. Use the PandaDoc module or HTTP POST to /public/v1/documents with template_uuid plus fields and tables structure.

Gotcha: table field names and template IDs must match exactly the template. If your template defines column keys, match them.

  1. Create the PandaDoc document and capture IDs
  • Module: PandaDoc "Create document from template". Include recipients mapped from deal contact and owner. If you want auto-send, either include send=true or call the send endpoint as a follow-up.
  • Capture document_id, view_url, and download_url in the scenario output.
  1. Save artifacts, update HubSpot, and notify
  • Save the PandaDoc response JSON and final document PDF to Google Drive under a folder for the deal.
  • Update the HubSpot deal with pandadoc_document_id and a proposal_sent_at timestamp via HubSpot update deal module.
  • Post a Slack message to the deal owner channel with the PandaDoc preview link and a short excerpt of the executive_summary.
  1. Manual review path and approvals
  • If OpenAI confidence is low or required fields are null, create a ClickUp/Notion task or post into a Slack review channel with a link to the Google Drive prompt and the parsed JSON, and set the HubSpot deal property proposal_status=manual_review.
  • Approver can either click a webhook action to resume the scenario (Make webhook) or edit the PandaDoc draft manually.

Real-World Business Scenario

A professional services firm used this pattern to speed proposal generation. When an opportunity entered the Proposal stage, the automation pulled the deal and line items, used OpenAI to craft a short executive summary and two commercial options, and populated the PandaDoc pricing table. The sales rep reviewed the draft in PandaDoc and sent it. The team reduced proposal turnaround by three days on average and produced a consistent audit trail for each proposal.

We implemented similar document generation flows in other contexts, including PDF export from Google Docs and routing to PandaDoc for signature; see our guide on How to Generate a PDF from a Google Docs Template and Email It Using Make.com and PandaDoc for related patterns.

Common Variations

  • Replace OpenAI with deterministic templates and a rules engine when compliance forbids LLM-generated text.
  • Use OpenAI only for optional addenda or optional pricing justification paragraphs, keeping the critical legal text static in the template.
  • Send PandaDoc drafts to a manager for approval first, using Slack interactive buttons tied to Make.com webhooks to either move to send or mark for edits.

A practical next step for your team

You have a production-ready architecture for automatic, auditable proposal generation: HubSpot deal 126 OpenAI draft 126 PandaDoc template + table population 126 HubSpot update and Slack notify. If you want this built or tuned for your exact HubSpot schema, PandaDoc templates, and compliance constraints, Olmec Dynamics implements these automations for real businesses. See how we work at https://olmecdynamics.com. For contract triage and model-based classification patterns that integrate with PandaDoc and Notion, our contract triage guide is a relevant companion: How to Auto-Triage Contract Emails Using Gmail, OpenAI, PandaDoc, Notion and Slack with Make.com.