Salesforce5 min read

How to Generate PDFs from Salesforce Without Writing Apex Code

Published on December 15, 2024

As a Salesforce Admin, you've probably been asked to automate document generation - quotes, invoices, contracts, or proposals. The traditional answer? "We need a developer to write Apex." But what if you could do it yourself, using only clicks?

The Challenge: Document Generation Without Developers

Many Salesforce orgs struggle with document automation. The built-in options are limited, and most third-party solutions either require Apex coding or come with enterprise-level pricing that doesn't fit smaller teams.

The good news? With Salesforce Flow and External Services, you can now connect to PDF generation APIs without writing a single line of code.

Method 1: Using the Browser Extension (Easiest)

The quickest way to generate PDFs from Salesforce is using a browser extension. Here's how it works:

  1. Install the Data to PDF browser extension
  2. Connect your Salesforce org via OAuth
  3. Navigate to any record in Salesforce
  4. Click the extension icon and select a template
  5. Download or attach the PDF to the record

This method is perfect for on-demand document generation - when sales reps need to quickly create a quote or proposal while on a call with a customer.

Method 2: Automating with Salesforce Flow

For automated document generation (like creating an invoice when an Opportunity closes), you can use Salesforce Flow with External Services:

Step 1: Set Up External Services

External Services allows Flow to call REST APIs. You'll need to:

  • Go to Setup → External Services
  • Create a new External Service using the OpenAPI specification
  • Configure authentication with your API credentials

Step 2: Create Your Flow

Build a Record-Triggered Flow that fires when your conditions are met:

  • Trigger: When Opportunity Stage changes to "Closed Won"
  • Action: Call the External Service to generate PDF
  • Action: Create a ContentVersion to attach the file

Step 3: Test and Deploy

Test your Flow in a sandbox, then deploy to production. Your sales team will now have documents generated automatically!

What Documents Can You Generate?

With this approach, you can generate any document that pulls data from Salesforce:

  • Quotes & Proposals - From Opportunities with line items
  • Invoices - From Orders or custom objects
  • Contracts - With dynamic clauses based on record data
  • Case Summaries - For customer handoff
  • Account Reports - Executive briefings with related data

Tips for Success

  • Start simple - Begin with a single document type before expanding
  • Use merge fields - Design templates with placeholders like {{Account.Name}}
  • Test with real data - Make sure your templates handle edge cases
  • Consider file storage - Decide whether to attach files to records or store externally

Conclusion

Document automation doesn't have to require developers or expensive enterprise tools. With the right approach, Salesforce Admins can implement professional PDF generation using clicks, not code.

Ready to try it yourself? Start with a 14-day free trial and generate your first PDF in minutes.

Ready to Automate Your Documents?

Start generating professional PDFs from your data in minutes.

Start Free Trial