Skip to main content

PDF Generation

The system generates proposal PDFs by integrating with Google Docs/Slides via Google Apps Script.

Generation Flow

  1. The service creates a temporary data token (valid for 10 minutes)
  2. Builds the secure URL with the proposal data
  3. Calls the Google Apps Script with the data
  4. The Apps Script populates the template in Google Drive
  5. Returns the document ID and URLs

Data Sent to the Template

Basic Information

  • Generation and expiration dates
  • Proposal code, title, and description

Customer Data

  • Name, document number, legal name
  • Contact (email, phone)
  • Responsible person (portal user)

Products

For each item:

  • Name, description, quantity
  • Unit price and total
  • Setup per unit and total
  • Recurring per unit and total
  • Whether it is a one-time product

Prices by Cycle

For each cycle (monthly, quarterly, semiannual, annual):

  • Cycle total
  • Discount and percentage
  • First payment
  • Equivalent monthly amount

Coupon

  • Code, type, and discount value

Setup

  • Whether there is a setup fee, total and first payment

Organization

  • Organization name and document number

Generated URLs

TypeFormat
Google Docshttps://docs.google.com/document/d/{id}/edit
Google Slideshttps://docs.google.com/presentation/d/{id}/edit
PDF (Docs)https://docs.google.com/document/d/{id}/export?format=pdf
PDF (Slides)https://docs.google.com/presentation/d/{id}/export/pdf

Security

Proposal data is accessed via a temporary 10-minute token. After use or expiration, the token is invalidated.