Home

Existing customer? Sign In

Guide: Automate Email to PDF with Zapier

Published on: Apr, 17 2021

This guide will show you how to automatically convert email to PDF and upload them to Google Drive with Zapier.

An example of where this may be useful, imagine you receive invoices or receipt emails that you want to archive for accounting purposes. Of course, this is only one idea of what you could achieve leveraging Docamatic's Zapier integration.

Zapier HTML to PDF

Prerequisites

1.You must have a Docamatic account. Docamatic free plan allows 50 documents per month. You can create an account here .

2.You must have Zapier account. Zapier free plan allows 100 tasks per month.

Create the Zap, Step by Step

  1. Sign into Zapier and click the Make a Zap! button.

Zapier HTML to PDF

  1. Search for "gmail" and then click on Gmail.

Zapier HTML to PDF

  1. Select New Email Matching Search from the "Choose Trigger Event" drop down list.

Zapier HTML to PDF

  1. Click Continue. Now we need to connect to our Gmail account. Click the Sign in to Gmail button.

Zapier HTML to PDF

  1. Next, we want to set up a trigger for our Zap. Enter your desired Search string. By default this search will trigger on emails in all folders, including Sent emails, which most people don't want. To limit results, like to your inbox, include in:inbox. This works the same as the search bar you see in Gmail.

In our example, I want to trigger on emails from a specific sender help@paddle.com.

After you have entered your search string, click Continue.

Zapier HTML to PDF

  1. The trigger is ready to test! Click Test trigger. If there are any emails matching your search string your test should be successful. If it fails, make sure there is an email that matches your search criteria. Click Continue to finish setting up the trigger.

Zapier HTML to PDF

  1. We have successfully defined the Trigger. Now we need to define the Action (what happens when a matching email is found). We want to convert it to a PDF, so search for Docamatic.

Zapier HTML to PDF

  1. From the "Action Event" drop down list, select Convert URL or HTML to PDF and then click Continue.

Zapier HTML to PDF

  1. Next, we need to connect Zapier up with your Docamatic account. Click the Sign into Docamatic button.

  2. Another window will appear, prompting for your Docamatic API key. Copy your Docamatic API key from the Docamatic dashboard, and paste into the text field. Click the Yes, continue button. Your docamatic account is now connected with Zapier. Click Continue.

Zapier HTML to PDF

  1. Click into the Source field and select Body HTML.

Zapier HTML to PDF

  1. Scroll down to the Name field and select Subject from the drop down list.

  2. Click Continue. Next we can check that the action is working ok. Click Test & Continue.

Zapier HTML to PDF

  1. Test successful. Now we can upload new PDF documents to Google Drive. Click on the plus symbol to add another action to our Zap.

Zapier HTML to PDF

  1. Search for Google Drive and select it.

  2. From the "Action Event" drop down list, select Upload File. Then click Continue.

Zapier HTML to PDF

  1. From the "Choose an account" drop down list, select the Google drive account that you want to upload the PDF to. Once connected, click Continue.

  2. Now we can setup the action. From the "Drive" drop down list, select My Google Drive. From the "Folder" drop down list, select where you want the uploaded PDFs to be saved.

Zapier HTML to PDF

  1. From the "File" drop down list, select Document URL.

Zapier HTML to PDF

  1. From the "File Name" drop down, select email Subject (or Transaction ID if you prefer). Click Continue.

  2. Our file upload to Google Drive is ready to test. Click Test & Continue. PDF upload to Google Drive successful!

Zapier HTML to PDF

That's it! Your Zap has been created. You have created a Zap that automatically converts specific emails to PDF and upload them to Google Drive.

Return to blog