Automatically Retrieve a PDF of Your Google Docs with Zapier

Sending Google Docs as a PDF is often the best choice for compatibility and security. By just choosing the right variable in Zapier, you can send automatically send a PDF file or link to anyone.

Written by
Matt Jasinski
and

February 26, 2024

When you’re working with Google Docs, it’s often better to send your clients and collaborators a PDF export rather than sharing a direct link to the doc. 

‍

With Zapier, you can easily incorporate PDF exports into your automated workflows just by adding a step and picking the right variable. In this tutorial, we’ll show you how it works and go over some of your key options. 

‍

What you may not realize is that you can use Zapier to automatically send a PDF of any Google doc by just picking the right variable. 

Exporting a link vs. exporting a file

Before we begin, it’s important to note that you have a key choice when sharing a Google Docs PDF via Zapier. 

‍

A “Find a File” step using either Google Docs or Google Drive will be your most versatile choice. When you use a “Find” step, Zapier will return both a PDF export link, and the PDF itself. 

‍

Note: the “New File” trigger in Google Drive and the “New Document” trigger in Google docs will provide you with the same data, as well. 

‍

If you use a “Create a Document” step with the Google Docs Zapier integration, then you’ll be limited to an export link. 

‍

When you send your PDF to another app with Zapier, some apps will require a link; others will require the file itself. 

‍

We’ll show you how both variables work. 

Sharing a Google Docs PDF file with Zapier

When you use a Google Drive step to find a Google Doc, you can easily retrieve the PDF file, or a download link for the PDF. 

‍

This is the most flexible option that will accommodate most use cases, so we’ll start here. 

‍

1. Add your trigger or search step to retrieve a Google Doc

‍

You can use either a “New File” trigger or a “Find a File” search step in Google Drive’s Zapier integration to retrieve the file. You can also use similar steps in the Google Docs integration, but we’ll demonstrate how it looks with Drive. 

‍

a Google Drive "New file" trigger in Zapier

‍

2. Test the trigger or search step and review the returned data. 

‍

You should see a “File PDF” variable that will let you send a PDF export of your Google Doc. 

‍

The 'File PDF' variable retrieved from the new file in Google Drive

‍

There will also be a “PDF URL” or “Export Links Application PDF” variable that will let you share a link where users can download the PDF. 

‍

The "PDF URL" variable retrieved from Google Drive

‍

The distinction between sending the file vs. sending the download link may seem subtle, but some apps will only accept a link, while others will only accept a file. 

‍

3. Add an automated action to send your PDF to another app

‍

You can now send your PDF link or file to nearly any app that’s supported by Zapier, such as GMail or Slack. 

‍

For instance, if you’re sending the PDF in an email, you can insert the download link into the body of your email.

‍

The "PDF URL" variable inserted into an email body

‍

You can also add either the file or the link to the email as an attachment.

‍

the "File PDF" variable attached to an email

‍

When a user clicks on the download link the email, the file will immediately begin downloading. 

‍

Instantly downloading a PDF from the provided link

‍

Note: the link appears as an attachment as well in Gmail since Gmail will scan the email for links and include them in the “attachments” section. Clicking on the link in the body or the attachments section will produce the same results. 

‍

When they select the attached file, they’ll be able to view the PDF in their browser and download it if they wish. 

‍

The PDF attachment being viewed in the user's browser

‍

Bonus tip: Embedding a link in text

If you’d like to embed your download link into your message text:

‍

1. Change the email body type to HTML. 

‍

Changing the email body type to HTML

‍

2. Use an HTML link tag to embed your link into some text, using this format:

‍

<a href=”url”>Text to embed link in</a>

‍

Hyperlinking text with HTML

‍

Make sure to include other appropriate tags, like line breaks (<br>). 

‍

When the email is sent, the recipient will see the hyperlinked text instead of the full URL in the email body. 

‍

Hyperlinked text in an email

‍

You can learn more about HTML tags on W3Schools.

Exporting a Google Docs PDF download link with Zapier

If you’re using a “Google Docs: Create a Document” step in Zapier, you can only retrieve a PDF download link from the newly created document. You won’t be able to access a variable for the PDF itself. 

‍

However, this may still be a preferable option in some use cases, since it won’t require an additional step just to find the doc.

‍

1. Add a “Create a Document” step with Google Docs.

‍

Configuring a Google Docs "Create Document" step in Zapier

‍

2. Test the step and review the test data. 

‍

The "Export Links Application Pdf" variable retrieved from Google Docs

‍

With the “Create a Document” step, you’ll only have an “Export Links Application PDF variable”, which is a download link for the PDF. 

‍

3. Add a step to send the PDF download link to another app

‍

You can send the PDF link in any app you’d like. If you send it a field that supports HTML, you can embed the link into text using an HTML link tag. 

‍

Inserting the "Export Links Application PDF" variable into an email

Automatically send your Google Docs PDFs anywhere

With Zapier, it’s easy to automatically get a PDF for a Google Doc and send it to anyone. Just pick the right variable from the list, and you’ll be good to go. 

If you’d like to see more automation tips, tutorials, and beginner’s guides, check out our blog or our YouTube channel. You can also follow XRay on Twitter, Facebook, or LinkedIn.

Similar Blog Posts

Not sure where to start with automation?

Hop on a 15-minute call with an XRay automation consultant to discuss your options and learn more about how we can help your team to get more done.

Schedule a 15-Minute Call