Skip to main content

How to download files via sdk

  • October 13, 2023
  • 7 replies
  • 640 views

Hello,

How does one download files via the SDK? I get a url which I can follow to get a 302, which points me to a url I can download from, but I have to go through all the hassle of generating an application session; I can’t seem to do it directly via the SDK. Am I missing something?

Thank you!

7 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • October 16, 2023

Hello there @anelson and welcome to the community!

I hope you like it here.

As of today, there is no SDK method to directly download a file.

Let me know if you have any other questions 🙂

Cheers,
Matias


  • Author
  • New Participant
  • October 16, 2023

Thank you for the welcome and for answering; do you know if there are there any plans to allow this? It’s a pretty big gap in being able to pull data from the boards programmatically and is going to affect how we build our workflows (and how much we use Monday).

Thanks!


  • Participating Frequently
  • October 17, 2023

With the API (which you can access using the .api method on the monday sdk client) you can get a public_url. There just isn’t a direct SDK get file method.

monday API docs

Get all assets with public_url for an item.

{
  items(ids: 4612078052){
    assets {
      id
      public_url
    }
  }
}

Get just an asset if you have the asset’s ID already.

{
  assets(ids: "1084643597") {
    id
    public_url
  }
}

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • October 17, 2023

Thank you @cody. That is correct.

@anelson I do not have an ETA on when this could be implemented for now.

I have added your vote for this request 😁

Cheers,
Matias


  • Author
  • New Participant
  • October 17, 2023

Cody,

This is exactly what I needed. I was able to see the protected_static url but needed to have a way to follow the 302; this just gives me the result of that directly. Thank you so much!


  • Participating Frequently
  • October 17, 2023

just an important note - the public URL expires after an hour. So, while you can use it to get the file as part of your workflow, do not rely on the URL to provide long term access to the file.


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • October 18, 2023

Thank you again @anon29275264 !