import-from-url/asyncis the correct endpoint only if HubSpot can fetch the file from a publicly accessible direct-download URL (no auth/cookies), View reference here HubSpot Developers.
If HubSpot shows ~1 KB, it’s usually saving an HTML/error response (login page / 403 / redirect target) instead of the binary. Salesforce-generated URLs commonly require authentication, so HubSpot can’t retrieve the real file.
To fix: make the URL a true direct-download link that returns the raw bytes with a 200 and correct Content-Length (test via incognito/curl), or use a middleware to pull the file from Salesforce with OAuth and then upload to HubSpot via POST /files/v3/files.
import-from-url/asyncis the correct endpoint only if HubSpot can fetch the file from a publicly accessible direct-download URL (no auth/cookies), View reference here HubSpot Developers.
If HubSpot shows ~1 KB, it’s usually saving an HTML/error response (login page / 403 / redirect target) instead of the binary. Salesforce-generated URLs commonly require authentication, so HubSpot can’t retrieve the real file.
To fix: make the URL a true direct-download link that returns the raw bytes with a 200 and correct Content-Length (test via incognito/curl), or use a middleware to pull the file from Salesforce with OAuth and then upload to HubSpot via POST /files/v3/files.
The mistake I was making was that my url was not downloadable, It was just public sharable link. Once I made it a downloadable URL. My file is perfectly being downloaded in hubspot.