Unable to Attach PDF to Email

I used the ‘Google Drive’ “Download a File” function to download a PDF. I am trying to now attach it to a draft email.

However, Make is throwing a “Message too large. Send attachments with your Gmail message - Computer - Gmail Help” error.

According to the Google Support article, you can attach files up to 25 MB. My PDF file is only 18 MB. I tested manually creating and sending an email with the PDF attached, and it works without a problem.

I’ve tried reducing the file size to 8 MB, but it still throws the same error. However, if I attach a very small document (like 1.5 KB), it works without a problem. I have a Core subscription, so I should be able to work with files up to 100 MB.

Hi @codenebula748, do you have ‘fileSize’ data somewhere in this module? maybe under content? Is it the same filesize you see on google drive? I’d make a wild guess about compression rate, but 8MB to 25MB is a long way. Probably have to contact Make customer service. Another way to test if this works is to make a custom http post request to create a draft with this file and if it doesn’t work, then work with google customer service.

Yes, it’s the same fileSize as on Google Drive. The 8MB file also throws the same “Message too large” error.

How would I create a custom HTTP post request to create a draft with the file? Thanks!

@codenebula748, here’s the documentation :

you need to set up Oauth 2.0 module. I’ve had some trouble setting this scope though, I don’t know if you have to include it in scopes or is already included : Class GmailApp  |  Apps Script  |  Google for Developers

for more instructions on how to set up the oauth, see :

https://www.make.com/en/help/connections/connecting-to-google-services-using-a-custom-oauth-client