To create a list of items in Bubble.io without using any plugins, follow these steps:
- Create an API Workflow:
Go to the Backend Workflows tab (ensure API workflows are enabled in your app settings).
Create an API workflow (e.g., create_item).
Add the necessary parameters to this workflow (e.g., name, description, etc.).
Inside the workflow, use the Create a New Thing action to create a single item using the parameters.
- Schedule API Workflow on a List:
In your Bubble editor, choose the Schedule API Workflow on a List action.
Select the create_item workflow you created earlier.
- Pass the Data as a List:
To pass the API response as a list, the API call must be set up as a Data Type API Call in the API Connector.
Initialize the API call in the API Connector. Bubble will infer the data structure from the response and automatically generate a corresponding content type for the list.
Use this content type as the Type of Content when scheduling the API workflow.
- Set the Data Source for the List:
In the Schedule API Workflow on a List action, set the Type of Content to the list type generated from your API call.
For the Data Source, use External API Data Source and select your API call.
From the API call’s response, choose the specific list you want to use.
- Pass Parameters for Each Item:
When setting up the parameters for the API workflow, use dynamic expressions to map the properties of each item in the list to the corresponding parameters.
Bubble will process each item in the list individually and execute the API workflow for each item.