HTTP Get a file module - invalid URL

Hi,

I want to download a file from Smartsuite, but the HTTP Get a File module does not retreive anything.

What could be the problem?

This is the Smartsuite Find records module output:

output.txt (14.8 KB)

And this is my setup of the HTTP Get a file Module:

I want to retreive this part of the output:

Facebook Image AttachmentArray

  • 1Collection

    • fileName

convert.png

  • fileUrl

https://cdn.files.smartsuite.com/AEHrSDUikTDqTbY

Can anyone help with this, please?

Welcome to the Make community!

Looks like the URL is empty, or points to an empty page with no file.

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

2 Likes

Hi,

Actually this is the entire link to the file:

I was just thinking. Is it true that the HTTP get a file module requires public urls? Otherwise it cannot access the file to download it?

Do i have to add an HTTP Auth request module befor the Get a File module maybe?

What are your thoughts?

Yes, the image definitely has to be publicly accessible. Does the Smartsuite API say anything about making the files downloadable?

1 Like

Yes it gives vague instructions on how to set up an authorized download request:

Authorization

Just like other SmartSuite REST API endpoints, we use token-based authentication for file upload and download requests. You can generate or manage your API key in your User Profile. All API requests must be authenticated and made over HTTPS.

IMPORTANT! Your API key conveys the same privileges as the Member account it is generated in, so it should be treated as securely as a password.

You authenticate to the API by providing your API key in the Authorization header, as well as your Workspace Id in an Account-Id header, as shown below.

KEY:VALUE

  • Authorization: Token API_KEY_HERE

  • Account-Id: WORKSPACE_ID_HERE

NOTE: Your Workspace Id is the 8 characters that follow https://app.smartsuite.com/ in the SmartSuite URL when you’re logged in.

Example: https://app.smartsuite.com/sv25cxf2/solution/62c4b…

Download a File

If you need to download files from the API, use this endpoint:

Method: GET

https://app.smartsuite.com/api/v1/shared-files/{fileHandle}/get_url/

The response body will be the binary file, and you will also get file metadata in the response headers:

X-File-Name: the name of the file
Content-Length: the size in bytes
Content-Type: MIME file type
Content-Disposition: will be set to “inline; filename=”{filename}"

I solved the problem by creating an HTTP AUTH API request and it worked! So happy about this! :smiley:

2 Likes

Hey @Raul_Ciocan :wave:

Just wanted to step in and congratulate you on solving your problem! :tada:

Thank you for sharing the solution with us. :pray:

Good job!

Oh, Hi, Thanks,

Yes, I am sort of a beginner in Make.com and i tried about 20 possible solutions before i solved it.
But i absolutely LOVE the process of discovery and success!

Thanks again!

2 Likes