Forum Academy Marketplace Showcase Pricing Features

How to Create or Update 'Thing' from an API Workflow?

So I’ve got a backend API Workflow that pulls in data from an external product API from a merchant and then saves that data to my Bubble database. Here’s an elementary view of the data type the API results are saving to:

  • Data Type: Desktop PC
    • Field: Product Name
    • Field: Image
    • Field: Price
    • Field: Model Number

This workflow will run once every day. Here’s what I want to happen:

  1. The API workflow runs and brings back the latest results.

  2. If Bubble sees that the “Model Number” already exists in my database, it knows a ‘Thing’ doesn’t need to be created, but rather changed if it sees other fields like “Price” have changed.

  3. If Bubble sees that there is no ‘Model Number’ match, then it creates a new ‘Thing’ (a.k.a adds a new product to my database)

I’ve read a lot of other forum posts but not many deal with workflows involving external API data. Can anybody help point me in the right direction? Thank you!