How to create a "list of things" or many things, not just one?

I can see how to create ONE thing, but what if I want to create a list of things (MANY things) - from data returned from a GET request? For example, my request returns 50 products with fields like “title”, “SKU”, etc that are already mapped out in my “Product” thing database. I want to create 50 new products from 1 call in 1 workflow. Can anyone advise?

1 Like

You could schedule an API workflow on the list that is returned. And the workflow creates the thing.

1 Like

thanks @NigelG, im looking to create many things from the one payload, and I’m not sure how to do that.

Here is an example.

https://buildingonbubble.com/block/save-an-apis-results-1472017471956x981892223072469000

2 Likes

Thanks @NigelG! Very helpful

Hi All,

@NigelG Just wondering if you could explain how I can achieve this with ‘nested’ lists.
My app is based around a ‘song’. Songs have sections and sections have lines. So the structure looks like this.

  • Song
    – Section 1
    — Line 1
    — Line 2
    — Line 3
    — Line 4
    – Section 2
    — Line 1
    — Line 2
    etc.

I am trying to build a function that duplicates the song and then iterates through each section of the song, duplicates the section and then copies the list of lines of that section.

I have been able to achieve this with a ‘Do when’ conditional workflow on the page, however, I think for performance it would be better to do this iterative function with an API. I’m just a bit lost where to start.

Do I send the list of sections as an array to the API and then iterate through that list to copy the lines for each section?

I was thinking that I would run a workflow on the page that first duplicated the song and copied the list of sections of that song, then call the API to use that copied list of sections as the list to iterate through but I can’t work out how to execute an iteration.

Any thoughts?

Cheers
Lyndon