Comparing and Importing Users via API

Hi Bubble Team,

Here’s a fun one which I could use some help.

User Story: People are added to our Contact List in one of two ways. First way, they sign up on our website. Second way, they are manually added directly in the Bubble app.

  • “Contact” Type is created; manual entry is fine, etc.

  • I successfully created an API (with Bubble API Connector plugin). Data is flowing in fine. I can see it in a repeating group and can even show where the ID from API record matches the ID in the “Contact” thing.

Problem Statement: I’m trying to now save any records from the API where API ID <> Contact ID. In other words, only add a thing to the Bubble “Contact” type if it does not exist.

I’m trying to use the “Schedule API Workflow on a List”, etc. but I have confused myself… My repeating group datasource is the API (with an outer join). The thing I’m trying to create is a “Contact.”

Maybe there is an easier way… I’ve created a sample app to create/test. It’s open to those who would like to take a look.

Thanks in advance,

Bubble User Import API Test

Update: I continued searching and refining. So good news, I can now Create Contacts from my API list using the “Schedule API Workflow on a List” functionality.

Now, the final piece: How can I do this only where API ID <> Contact ID? So, how can I not create duplicate records every time? In my recurring list, I can create the outer join to find the matches, but I don’t know where I would put this type of logic in my workflow to make this check.

Any assistance is appreciated. Here’s the link again to the test app I built as an example.