Downloading and Uploading a PDF from a website that is stored with a Signature and Key Value Pair

Essentially using the same workflow that Jan has provided here to upload PDFs (modified with set for convenience and then Google Drive to upload), whilst there is no problem uploading simple PDFs on the web (e.g. Sample PDF), if you are uploading a PDF that is defined in the following format:

Whilst the file, when downloaded locally, opens fine (albeit spaces in the filename are replaced with %20), but when viewed with n8n:

The output is not the same as other PDFs downloaded (e.g. Sample PDF above), which renders fine. This renders as follows:

When then uploaded to Google Drive, it uploads as a document (not a PDF) and subsequently, we get:

When viewed.

Perhaps the Mime type is incorrect? But not sure how to address this:

image

It would be great to achieve the desired functionality that we currently can with regular PDFs.

Thanks!

Workflow:

Managed to find a great solution by Jan:

1 Like