Guide: Automate Email to PDF with Zapier
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.
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
- Sign into Zapier and click the Make a Zap! button.
- Search for "gmail" and then click on Gmail.
- Select New Email Matching Search from the "Choose Trigger Event" drop down list.
- Click Continue. Now we need to connect to our Gmail account. Click the Sign in to Gmail button.
- 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 firstname.lastname@example.org.
After you have entered your search string, click Continue.
- 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.
- 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.
- From the "Action Event" drop down list, select Convert URL or HTML to PDF and then click Continue.
Next, we need to connect Zapier up with your Docamatic account. Click the Sign into Docamatic button.
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.
- Click into the Source field and select Body HTML.
Scroll down to the Name field and select Subject from the drop down list.
Click Continue. Next we can check that the action is working ok. Click Test & Continue.
- Test successful. Now we can upload new PDF documents to Google Drive. Click on the plus symbol to add another action to our Zap.
Search for Google Drive and select it.
From the "Action Event" drop down list, select Upload File. Then click Continue.
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.
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.
- From the "File" drop down list, select Document URL.
From the "File Name" drop down, select email Subject (or Transaction ID if you prefer). Click Continue.
Our file upload to Google Drive is ready to test. Click Test & Continue. PDF upload to Google Drive successful!
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