How to create x things based upon a list

I’m using Uploadcare, which allows to upload multiple files at once. These files are grouped under a URL address ending with ~x, where x is the number of files included in the upload. I store this data in a Data Type “UPLOAD”.

On Uploadcare, each individual file remains accessible by a subaddress.

I would now like to store these individual files in another Data Type, “FILE”. To do this, I need to:

  • Extract the x from the file name “UPLOAD”

  • create x Things in “FILE”

  • for each of them, add the suffix “X” to distinguish between them.

I think I have to work with the Toolbox plugin, but how do I extract a number (which is an alphanumeric), transform it into a number, to trigger X events?

And then, how to add it to another filename?

Brrr…

Thank you very much,

Michel

So. For now, I managed to extract the number of files from the UPLOAD name, thanks to this :

Could someone help me with how to create a loop, which doesn’t seem native to Bubble ?

EDIT : I don’t need to extract anything anymore, as I could build some UUID’s list directly from Uploadcare.

So calm here :wink:

Well, thanks to this tutorial, now I know I’m very close to the solution :

But I can’t reproduce that specific example, as the list I’m trying to show to my API Workflow is strictly refused.

image

I understood it was some type mismatch, and I tried this way, and I thought I was good as “This Uploadcare’s List of file UUID” is truly a list (which purpose is to show to the API how many times it must run, am I correct ?) :

image

But it had as a result to correctly create a new thing (that’s my goal), but just one, not as much as the list “quantity”.

So now, I’ a bit lost, and any help would be really appreciated.

Thank you,

Michel

Great work looking into this and keeping the community up to date.

Not sure I can help with some more info and context into what is happening here, as the ‘Current Cell’ suggests you are doing this workflow from a Repeating group which makes me wonder if there is a different approach you could take here (but in the end likely still using api workflows). Is there a File Uploader in every cell?

Are you able to show more on page elements and what you are doing here? Or even editor access

1 Like

@michelduprez When scheduling a workflow on a list you can use the ‘This’ key to reference the current workflow’s thing, which in your case is the UUID text.

Rather than ‘Current cells’ you would use ‘This files_uuid’.

1 Like

Hi gentlemen,

Thanks for your help.

First, I gave up for now my attempts to triggering the API from a RG. In fact, my actual need is to extract individual files from UPLOADCARE groups. So I now triggers the API workflow from an unique procedure which starts by uploading the files packages. That’s a good thing I guess.

Now here’s what I could achieve :

No problem about creating a new “UPLOAD” thing, that contains several lists.

Here’s now the second step :

Everything is fine, but ONLY for UUID. Because any attemps to get other parameters never worked, whatever I tried to push in those controls.

Here’s now the endpoint :

And finally the thing’s creation :

image

So that’s not that bad huh (hem well this took me a whole day work :slight_smile: ) ! Now I see as much things are created as necessary, based on the amount of items in the origin’s list.

But I can’t use the two other parameters to fill the thing’s field.

Hope you’ll have some ideas…

Thanks again,

Michel

This topic was automatically closed after 70 days. New replies are no longer allowed.