Exporting data from Bubble to Airtable

Hi all,

New here so please let me know if I’m breaking any forum rules.

I’ve seen quite a few recipes that connect Airtable to Bubble, however most of these recipes take data from Airtable and upload to Bubble. Does anyone know how to set it up the other way around?

I currently have a database on Bubble that I would like to sync to Airtable. Any help would be most appreciated and I’d be happy to pay someone to help us get this set up.

Many thanks,
Saher

Hey Saher! Welcome to the Parabola Community! Your use case is certainly possible with Parabola.

Have you managed to get data into Parabola from your Bubble app? If not, search for Bubble on the righthand Steps sidebar and drag in the Bubble Import Beta step. You need to update the Endpoint URL with your app name and object name. You’ll also want to paste in your API Key in the Bearer Token field.

For exporting data to Airtable, you’ll use our generic API Export step. The Endpoint URL will look something like this:
https://api.airtable.com/v0/appxxxxxxx/yyy
Make sure to update the URL with your App ID and specify your endpoint.

The Authentication Method will be Bearer Token. You’ll paste in your API Key into the Bearer Token field.

Hope that helps get you started. Let me know how that goes!

1 Like

Yup! I’ve created a one way sync from MongoDB to Airtable with the API Export as the last step. After some trial & error, works like charm!

In your Airtable base, click on “help” → API Documentation and it will generate the exact JSON that you need to use!

1 Like

Hi Jan - The Body should look something like this:

 {
      "fields": {
        "Name of Airtable Field": "{Name of Parabola Column}",
        "Name of Airtable Field 2": "{Name of Parabola Column 2}"
      }
    }

For your case, I would imagine it would look something like this:

{
      "fields": {
        "id": "{Name of Parabola Column containing Airtable ID}",
        "Units": "{Name of Parabola Column containing the Units data}"
      }
    }

Does that help?

1 Like

Ah, if you just have a single API Export step on your flow, Parabola won’t actually export anything - You need to have at least one import step so Parabola has some data to send through. If you look at the Run History in your published dashboard, you’ll see that we exported 0 rows.

Here’s what I recommend doing:

  1. Use our Airtable Source to import that Airtable base you’re trying to update. We might not end up using this step in your flow but it’s helpful to reference Airtables column names
  2. Use our CSV File step to import a sample CSV that you’ll use to update your Airtable. You should make sure to have the columns: SKU and FBA Stock
  3. Connect your CSV File step to your API Export. When you do that, you’ll see two tabs appear in the step: Input and Results. This is how you’ll be able to see the data Parabola is sending to Airtable

Let me know once you have that set up, and I can help you finish configuring your API Export!

1 Like

You’re getting close! I think I misunderstood your initial question. You were on the right track in including the record id in your body.

Just to confirm, you’re trying to update FBA Stock, but all the SKUs already exist in your existing Airtable right? Meaning, you’re using PATCH to update records instead of POST to create new records?

In that case, you’ll want to use the Join step to combine your CSV File with your Airtable Import. That way, you can add the Airtable id into your CSV File. This is how we’ll tell Airtable which record to update.

Connect your CSV File and then your Airtable Import step into a Join step like so:

Configure that Join step to match up your rows by SKU. Make sure your Primary Table is the CSV File. Now, you should see the Airtable records id added as a column to your table.

Once you have that, your API Export Body should actually looks like this:

{
  "records": 
  [
    {
      "id":"{id}",
      "fields": 
        {
          "SKU":"{SKU}"
          "FBA Stock":{FBA Stock}
        }
    }
  ]
}

Let me know how that goes!

1 Like

It looks like you need to filter out the rows that have a blank id.

If you look at the sent data you got back in the error message, you’ll see that we tried sending "id":"" since there’s no ID attached to the SKU: "HU-UI84-F37D"

To be able to use a PATCH, all records will need an ID. If you’re adding new SKUs, you’ll want to use a POST to create new records for those instead.

1 Like

Hey Jan!

Just reset your credits.

If the Airtable API docs have any values not wrapped in quotes, then you should omit them from Parabola as well.

Most likely, Parabola is picking up the blank value in your last row when you remove the quotes.

Without quotes in the JSON, you need to have the word null instead of a blank. So, use the Regex step, use ^$ as the expression, and replace it with the word null. Apply that to any column that you need to send without quotes!

Let me know If that fixes it.

1 Like

It looks like the values in your FBA Prep. Stock column has a space in lieu of a comma, like this: 1 000.

To fix this, in the same RegEx step that you’ve already added, can you add this rule:

This will remove anything that’s not a digit from that column.

Heads up: Since the RegEx step applies the rules from top to bottom, you’ll need to add this rule above the rule this rule:

Since you can’t rearrange the order of rules yet, you’ll need to do a little rebuilding of that step.

Keep us posted on how that goes!

1 Like

Woohoo! No problem, Jan!