Update Airtable Records

Updated 4 months ago by Karan

Byteline provides an easy-to-use Airtable task node to manage Airtable data. A simple and user-friendly interface allows you to configure Airtable updates in minutes.

Configure Airtable API Key

Before you start using the Airtable Upsert (Update or Insert) task, you need to configure the API key to access your Airtable account from Byteline.

On the Byteline console, go to the Connection menu on the top navigation menu, and then select Airtable from the left panel. You will see the below screen.

How to retrieve API Key from Airtable

You will get the API key from Airtable and then save it on the above screen.

Steps:

  1. Login to Airtable
  2. Navigate to your account page by clicking the user icon at the top-right, and then select Account
  3. Click the "Generate API Key" button as shown below. Now copy the API key and paste it on the Byteline console.

Create Airtable Upsert Node

Step -1: To create a flow design check the How to create your first flow design.

To add an Airtable -upsert (Upsert stands for Update or Insert) items node, click on Airtable node to add it to the existing flow.

How it works

This task intelligently figures out whether to update or insert a record to the Airtable base. This task first gets Airtable data using an API call, then it compares the unique columns of the Airtable data with the upsert data. If the record already exists, adds the data to the record else update the record.

Configure the node

Step -1: To open the Airtable configuration dialog, tap on the edit button of the Airtable node.

The grey indicators show that the node is not configured yet.

Follow the below-mentioned steps to enter a base ID, table name, and grid view in the Airtable configuration window:

Airtable Base Id

Step -1: For base Id, log-in to your Airtable account with email and password.

Step -2: Open your Airtable API and select your base.

Step -3: Copy the base Id string such asappfHBMTMuJi4HDQ3

Step -4: Paste the copied string in the base Id text field of the configuration window.

Airtable Table Name

Step -1: Go to the base in your Airtable and check the required table name mentioned there.

Step -2: Enter it in the table name text field of the configuration window.

Airtable View

The Airtable view is solely used for the updates. The only requirement for the view is to return the data in the insertion order. That is in descending order on a date-time column. This ensures that the records required for comparison are returned, as the Airtable API only returns a maximum of 100 records. This sorting is usually defined on the Created time or another Datetime column.

Step -1: In the Airtable base, in the top-left corner of the console you can find the view name.

Step -2: Enter it in the view text field of the configuration window.

Loop Over

Loop over is used to call a task multiple times based on each entry of a JSON array. Checkout loop over documentation to get a detailed understanding.

Step -1: Click on the loop over checkbox for its configuration.

Step -2: Enter a JSON array in the loop over text-field to update multiple records.

Mapping Airtable Columns Data

Byteline populates the column names for which data need to be configured. If any column is missing, you can add it using the + button. For deleting any unwanted columns, you can use the delete button next to each field. See the below section for more details.

By default, Byteline sends data in the string format. However, If any column type is not a string, data converters can be used to send the data in the right format.

Column data can be configured in three ways:

Constants

Users can directly enter the actual value in the text field. This constant value is sent for each update or insert to the Airtable record.

Variables

Users can enter a value that refers to a flow variable e.g. ${input.variable1}. However, if loop over is used, then the same value is used for all the records.

Loop over data

If a loop over is selected and you want to use the value from each iteration of the array, then use this format. Users can enter values that will get updated when loop over is applied to JSON array such as @.field1.field2 format. Here @notation is used to fetch the current iterated value to update the records.

Add missing columns

In case, if a column is missing from the field mapper. You can add those to your configuration as well.

Step - 1: Click on Add button to add a new field name and value.

Step - 2: Enter a new field name and value in the text field.

Delete unwanted column

If you don't want to configure an Airtable column, it can be deleted using the delete button.

Step -1: Click on the Delete button beside the row to delete it.

Advanced

To explore the advanced features, click on the collpase icon in the advanced tab.

adv
Updates

You can select a specific update strategy to handle the existing records.

Skip Updates - By default skip update gets selected. Therefore, it will only insert the item if it doesn't exist but will skip the updates.

Skip

Overwrite - Overwrite will update the old items with the new data when required.

Overwrite

Overwrite When - In overwrite when option, you can set a specific condition based on which the update should be performed . For example, if a value of a specific Webflow CMS column equals true then it will get updated.

Overwrite when
Deleted at Source

When a record has been deleted from the source data e.g. a job board, but it still exists in your Webflow CMS collection, then you can specify how to handle it.

Ignore - If you select ignore, it will ignore any deletes in the source data.

Ignore

Set a Column Value - You can select "set a column value" option to set the value of a specific column to a particular value for the deleted items. For example, you can configure to set the status column to expired.

Set value

Click on the save button to save the configuration.

save

Once you save the configuration, the indicator over the top-right corner of the code node will turn green.

The green indicator shows that the Airtable node is successfully configured to your flow.

Your Airtable node has been configured successfully. Feel free to connect us for any doubt. Develop fast!


How did we do?