Forum Academy Marketplace Showcase Pricing Features

Download a file from URL in a backend workflow

Am I missing a way of downloading a file from a URL in a backend workflow?

A third-party app generates a PDF, and when generated it sends the notification on a webhook (which is my backend workflow), and I’d like to download that file on the server. Is this possible?

Thanks a lot

I think you would just be saving it to your database…no way to download it to a device via a backend workflow since those are happening server side and can occur when no user is on the app.

The data I’m getting from the webhook is only the ‘download URL’, which is valid for 1 hour. It’s not possible to tell the server to download the file and save it to the database?

You can do it via the API connector.

You can save the file to your database right using that URL? If you add the ‘saved to S3 option’ onto the end of it then the URL that will be saved will be the URL to the file within your bubble storage.
Maybe then you can download it through the client using the File downloader plugin.

I’m sorry, seems like I’m missing something.

If I understood well, the API connector is to make calls. In this case, I have a backend workflow that triggers when called by the third-party app, which it currently does.

I can’t save the file to my database using that URL : that’s what I’m trying to achieve. As the data returned ‘downloadurl’ is a string, Bubble treats it like a string and does not provide the ‘save to S3’ option. What I’m looking for is like a ‘file_put_contents’ from PHP, or something equivalent. I just need to tell my workflow to download the file, and save it in the database.

Ok 2nd sorry, found how to do it.

I detected the incoming data, and changed the type of ‘downloadurl’ from text to file in the workflow. Now, Bubble understand that it needs to download it and save it in the dabatase.

Thanks a lot for your help !

1 Like