Hubspot + Google Drive via Zapier: Some files won't upload to Drive due to Hubspot permisisons, using connector
I'm pulling friendly URL from COS API for CRM files. I pass them to a webhook that catches them and passes them to Google Drive upload feature in Zapier. Some files transfer perfectly, but some files give me a 403 error. The Google Drive is bound inside of Zapier to the target Google Drive account. Again, it works for most files. I get both PDFs and JPGs to come over fine. When I get a 403 error, I cannot view the CRM Engagement/Attachment file in the COS. It gives the same 403 error (forbidden).
I have read on scoping and such, but the connector in Zapier that binds to Google Drive should negotiate all of that I would think - plus, it works a great deal of the time.
Thanks for passing along this info! So it's definitely related to the way these files were initially uploaded; for files that were uploaded in-app as attachments to an object record, HubSpot automatically sets the hidden flag in order to prevent them from being visible externally/in the file manager. For the files that you've uploaded and attached yourself (via the API) it doesn't appear you've set the hidden flag, so they're still visible externally. This is actually intentional, since the separation of attached files and file manager files in app is by design.
This means that it's not possible for files attached to object records in-app to be accessed by this Google Drive integration; I'd recommend uploading them to the file manager and attaching them via a note if the files need to be accessed by this integration.
I can only assume that it is the manner in which each file is uploaded. Such as an email attachment file it make sense to maybe lock it from public or anonymous viewing. It seems as though it needs the CRM file "Preview" tool to see some of these files. THAT is what prevents Google Drive from being able to pull the file via URL. Google Drive gets a 403 error for some files and some it does not. I get a 403 error when I view a url whether I am logged in or not for the files that are not working.