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

How to Ensure Seamless File Access for your Make Integration Workflows

4 Minutes Read

This tutorial shows you how to download a cloud-storage file in Make and upload a temporary copy to PDF.co for processing.

The Problem

You may have a file on your cloud provider which you import into Make. However, later on down your workflow you may need PDF.co to read the file for another operation (e.g. to merge with another file) but then face an issue with file access.

A typical workflow in Make, but in this case note how the Google Drive file is unable to be read later in the flow.
A typical workflow in Make, but in this case note how the Google Drive file is unable to be read later in the flow.
Make workflow with Google Drive "Access Forbidden" error message

The reasons for the file access issue may be as follows:

  • Because the file is not publicly shared
  • The cloud provider temporarily blocks access of files to the pdf.co server for another technical reason - i.e. maybe frequent file access within a short duration from one IP is considered to be a robot and then denied.

The Solution

The simplest solution could be to just ensure that the file you want to operate on is publicly accessible by updating the access settings in your cloud provider to allow anyone to access.

But what if you don’t want to do this?

Security with PDF File Upload

In the case where you don’t want public access to a file, or there is some issue with accessing the file at a later stage in your PDF.co workflow then use the PDF File Upload step to make a copy of the file for PDF.co to work with.

The uploaded copy is available temporarily. Check outputLinkValidTill in the upload response and use the returned URL before it expires. Retain the original in your own storage if the workflow may need it again.

File Uploader in Action

Add PDF.co — Upload a File between the source file download and the PDF.co operation that processes it.

  1. Download the source file using your cloud-storage module, such as Google Drive — Download a File.
  2. In PDF.co — Upload a File, map the downloaded file’s Data to Data. Map its filename to File Name, if needed.
  3. In the next PDF.co module, select the URL input option and map URL from the PDF.co upload step to the source-file URL field.

This avoids asking PDF.co to retrieve the original private cloud-storage link again.

Test the complete scenario with a file from the real source folder. Confirm that the upload succeeds before proceeding, then check the final output. An uploaded copy can still expire, and later requests can still fail. If the URL is no longer available, download and upload a fresh copy rather than repeatedly submitting the expired link.

In this tutorial we have proposed a solution to the problem of file access in your Make workflows and shown how you can use private or confidential files for workflow scenarios. Please get in touch with any other problems or questions which you may have!

Related Tutorials

See Related Tutorials