Hi my amazing Bubble friends,
I’m at my wits end with this one. (just figuring out API workflows)
I’m trying to create reading lists for my users by allowing them to select Google Book search results. (using GooglebooksAPI)
I have search boxes for users that populate a Repeating Group with Google Book search Results. each cell has an ADD button to Add BOOKS and AUTHORS to my Bubble database. (I will create a reading list from this)
- In other words - a user does a search for Google Books and makes a selection, this adds the book and author to my Bubble database (if they don’t already exist).
Simplest list of Objectives.
- Add the selected book to the Bubble database if it does not exist. (datatype Book)
- Add the Author(s) to the Bubble database if it does not exist. (datatype Authors) - a book can have many Authors.
- Cross reference the Books and Author(s) datatypes. (link them in the database to each other)
-Books datatype has a refAuthors link (which is a list), and Authors datatype has a refBooks link. (also a list)
I’m able to accomplish all 3 objectives above using “schedule API workflow on a list” if and only if the Book and Author(s) do not exist before the workflow is run.
It works because I can use the results from Step 1 (resulting Book) and Step 2 (resulting Author(s)) of the workflow, in Step 3.
((i.e. create the Book record in step 1, and the Author(s) record(s) in step 2. and then use the results from Step 1 or Step 2 to modify data in Books and Authors to create the links between the two.))
BUT, to avoid creating duplicates in Step 1 and 2 – in case another user comes along and selects the same book from Google Books – both Step 1 and Step 2 only run of the Book or Author(s) are not already in my Bubble database. If the items already exist in the database, Step1 and 2 produce no results.
I can’t figure out how to create the table links for items that existed in the database before the workflow was run.
-I’m happy to provide a read only link to the App - but, *gulp - I don’t know how to.
thank you one and all for any help.