Generate a temporary URL for files along with binary data within a workflow

The idea is:

Often times we need to upload a binary file to a platform, and most of them request a url as an input instead of binary data, having a temporary url along with the binary data for that file would be very helpful (Or choose one of the 2, or both), otherwise, I’d need to upload it to Google Drive, adjust sharing options, then get the sharing link and use it.

Any resources to support this?

I made a quick mockup, I feel like this should either be a node level option in the node settings, or could also work as a specific workflow level option.

For the nodes: [HTTP node example]
image
Once toggled, show options to choose the holding duration if applicable.

If you think this feature will help, don’t forget to upvote.

Upvoted. What service are you using at the moment to upload the file to in order to get a public URL? Would prefer a free one if possible.

Many thanks.

1 Like

I used tmpfiles.org

This is their API: /tmp/files - API

2 Likes

I don’t see which node you use. I used http request but I don’t see the parameter Binary File -Temp Url.

here’s the node I’m using

Hey. I now this request is a bit older already, but I solved it a bit differently. Basically doing it the manual way.

My n8n instance has a public URL as most of you probably have to receive webhook calls. I now have a small workflow that receives a webhook call with a file identifier parameter, reads the file and returns it.

In my case it’s for images, so I also have an optional parameter to return a resized version of the image (i.e. a preview version instead of the full size version).

This workflow is disabled by default. I activate it right before I call a node that needs a file and deactivate it directly afterwards. Not ideal, yet, but based on this, you could build something more sophisticated e.g. with IDs in a database that link to files and get deleted automatically again (or whatever you can imagine).

But this works for me for Notion uploads and I thought it might work for others as well.

Which is by the way not working exceptionally for Notion, as it seems to use the given URL permanentely and not just to get the image. At least the images do not show up, if I deactivate this workflow again, before I opened the page in notion that was created.

But it might do the trick for others, so maybe it helps. :slight_smile: