How to Convert Gmail Email to PDF using Zapier and PDF.co

Note: Here is another tutorial for generating PDFs from emails received from “Email by Zapier” or from any other source providing parsed emails.

What is Zapier?

Zapier is an online automation tool that connects your favorite apps, such as Gmail, Slack, Mailchimp, and over 1,500 more. You can connect two or more apps to automate repetitive tasks without coding or relying on developers to build the integration. It’s easy enough that anyone can build their own app workflows with just a few clicks.

In the tutorial below, you will learn to convert an email to a PDF file as well as save a Gmail email as a PDF.

We prepared this step-by-step tutorial with screenshots on how to make a Zap using PDF.co, and Gmail, to automatically convert HTML to PDF from Gmail email.

  1. Create a Zap
  2. Add Gmail App
  3. Connect Gmail Account
  4. Trigger Setup
  5. Test Trigger Result
  6. Add PDF.co App
  7. Connect PDF.co Account
  8. Setup PDF.co Action
  9. Test Step
  10. Test Result
  11. HTML to PDF Output

TL;DR:

  1. Start by clicking on Create a Zap! at the top-right corner of your Zapier dashboard.
  2. Under “App and Event“, search and select Gmail from the list of apps. Then, choose Trigger Event and select New Email.
  3. Select or connect your Gmail account to Zapier.
  4. Select the Inbox in your Label/Mailbox that is to be converted when a new email arrives.
  5. Great! The test trigger was successful and found a record in your Gmail email account. Let’s move on to the next step and convert the Gmail email to PDF.
  6. Under  “App & Event” search and select PDF.co from the list of apps. Then, choose and select the Anything to PDF converter.
  7. Select or connect your PDF.co account to Zapier by adding the API Key. You can get the API Key in your PDF.co dashboard.
  8. Under Anything to PDF Converter set the Input Format to Raw HTML code and the Input to Body Html. At this point, optional parameters such as the output file Name can be defined.
  9. Once you have done getting up, click on the test step action to convert your Gmail email to PDF.
  10. When the request is processed successfully, PDF.co will return a temporary URL to access the converted email to PDF. Kindly copy and paste the URL into your browser to view the result.
  11. We have successfully converted the Gmail email to PDF and this is what it looks like. You can customize the look of the email by adding your personalized HTML code.

Step 1: Create a Zap

  • Start by clicking on Create Zap! at the top-right corner of your Zapier dashboard.

Step 2: Add Gmail App

  • Under “App and Event“, search and select Gmail from the list of apps.
  • Then, choose Trigger Event and select New Email.

Zapier - New Email in Gmail

Step 3: Connect Gmail Account

  • Select or connect your Gmail account to Zapier.

Connect Gmail Account

Step 4: Trigger Setup

  • Select the Inbox in your Label/Mailbox that is to be converted when a new email arrives.

Zapier - Trigger
Once you have done setting up, click on the Test trigger button.

Step 5: Test Trigger Result

  • Great! The test trigger was successful and found a record in your Gmail email account. Let’s move on to the next step and convert the Gmail email to PDF.

Test Trigger Result

Step 6: Add PDF.co App

  • First, search and select PDF.co from the list of apps.
  • Then, choose the Anything to PDF converter.

Zapier - PDF.co - Choose Action Event_v2

Step 7: Connect PDF.co Account

  • Select or connect your PDF.co account to Zapier by adding the API Key. You can get the API Key in your PDF.co dashboard.

Connect Zapier to PDF.co

Step 8: Setup PDF.co Action

  • Under Anything to PDF Converter set the Input Format to Raw HTML code and the Input Source to Body Html.

Zapier - Gmail HTML to PDF

Step 9: Test Step

  • Once you have done getting up, click on the test step action to convert your Gmail email to PDF.

Send Anything To PDF To Test Step

Step 10: Test Result

  • When the request is processed successfully, PDF.co will return a temporary URL to access the converted email to PDF. Kindly copy and paste the URL into your browser to view the result.

PDF.co Processed The Request And Returned A Temporary URL

Step 11: HTML to PDF Output

  • We have successfully converted the Gmail email to PDF and this is what it looks like. You can customize the look of the email by adding your personalized HTML code.

Converted Gmail Email To PDF
Screenshot of the Email converted to PDF Output

NOTE: Consumer Gmail users might encounter approved app issues. We recommend that you use a Business Gmail account or send the emails through Zapier Mailhook. For more information, please refer to this link.

Check out this video tutorial on how to convert Gmail email to PDF: