Definitely! In your app’s Settings tab, you’ll first want to go to API, and check:
Once you do this, you can click in the Page/Resuable Elements Panel, and the API Workflows option will appear beneath your reusable elements here:
Then, within your API workflows you’ll create a new endpoint. It depends on your app’s data structure, but in Nigel’s example the endpoint has these settings/keys:
Here, the keys can be any word(s) you prefer (sort of like a label). It depends on your data structure which stores the Service Areas for each User, but you could have a custom data type such as ‘Service Area’ with an address field. This way, you could have a key such as ‘address’ type: address. Then add any other keys needed for other fields within each new ‘Service Area’ that will be created.
In Nigel’s example he has a custom data type called Place with two fields: Name and Address. In the API endoint, he has a Create a New Place action which uses the keys as the values for each corresponding field:
Then back on the page, he has an input, a save button and list of results in an rg:
The workflow for the Save Places schedules the API workflow on a List of Things (the list of things being the repeating group):
Here the ‘keys’ name and address appear again, and he defines the values for those keys setup in the endpoints. So, this was confusing to me for a while (and there are probably clearer ways to explain it than I can!), but the API endpoint Create a New Thing fields’ values are keys. And keys’ values are different data sources defined in Schedule An API Workflow On A List action, defined on the page(s) where you need this workflow to run. Here it’s:
Once the key values are set up, and the action is run in preview mode, this workflow will run on all items in the list you define (Bubble will go one by one down the repeating group until a new Thing has been created for each row).
If you run into any trouble, feel free to let me know and I can definitely assist in setting this up! (Can PM me a link if you prefer). But this should save the addresses correctly.