New: PDF to E-Invoice for Factur-X/ZUGFeRD, and PDF to PDF/A for archive-ready PDF/A-3b.

Add HubSpot Contact Data to a PDF and Email It Through Gmail Using Zapier

6 Minutes Read

Automatically personalize a PDF with a new HubSpot contact’s name and send it to them as a Gmail attachment.

Step 1: Set Up the HubSpot Trigger

Create a Zap and select HubSpot → New Contact.

Connect your HubSpot account and test the trigger. Select a sample contact with a first name, last name, and email address. Use a contact with your own email address for testing.

Step 2: Prepare Your PDF Template

Make your PDF template available through a direct URL accessible to PDF.co or upload it to PDF.co’s built-in file storage.

Open the template in the PDF Inspector. Find the location where the contact’s name should appear and note its X and Y coordinates.

Step 3: Add the Contact’s Name

Add PDF.co → Add Text to PDF.

Connect your PDF.co account by signing in and authorizing Zapier when prompted.

Configure:

  • Source File URL: Enter your PDF template’s URL or file token.
  • Text to add: Insert HubSpot’s First Name, type a space, then insert Last Name using Zapier’s field picker.
  • X Co-ordinate / Y Co-ordinate: Enter the coordinates from PDF Inspector.

Enable Advanced Options and set:

  • Pages: 0 for the first page.
  • FontName: Select a font, such as Arial.
  • Font Size: Enter the desired size, such as 12.

See the Add Text documentation for additional settings.

Step 4: Test the Personalized PDF

Test the PDF.co action and open its returned url.

Check that the name is correct, positioned properly, and fits the available space.

Step 5: Configure Gmail

Add Gmail → Send Email and connect the sending account.

Complete these fields:

  • To: Map the contact’s Email from HubSpot.
  • From: Use the connected Gmail account or an authorized sending alias, if the field is shown.
  • Subject: Enter a subject such as “Your personalized document.”
  • Body: Write your message, optionally including the contact’s first name.
  • Attachments: Map PDF.co’s output url.

Mapping the URL to Attachments sends the PDF as a file attachment rather than placing a temporary download link in the message.

Step 6: Test and Publish

Testing the Gmail action sends a real email, so confirm that the test contact uses an address you control.

Run the test, check your inbox, and open the attachment. Once the recipient mapping and PDF are correct, publish the Zap.

New HubSpot contacts will receive their personalized PDF automatically.

In this tutorial, you learned how to add data from HubSpot to a PDF template using PDF.co PDF Filler. You learned how to set up Zapier, so it triggers the zap every time a new contact is added in HubSpot. You also learned how to send the PDF document to the contact’s email address from HubSpot.

Related Tutorials

See Related Tutorials