Skip to content

2. Inserting Data into Airtable#

In this step of the workflow you will learn how to insert the data received via the HTTP Request node into Airtable using the Airtable node.

At this point, your workflow should look like this:

Workflow with the Airtable node
Workflow with the Airtable node

If we are going to insert data into Airtable, we first need to set up a table there. To do this:

  1. Create an Airtable account.
  2. In your Airtable workspace add a new base from scratch and name it, for example, beginner course.

    Create an Airtable base
    Create an Airtable base

  3. In the beginner course base you have by default a Table 1 with four fields: Name, Notes, Attachment, and Status. These fields are not relevant for us since they are not in our orders data set. This brings us to the next point: the names of the fields in Airtable have to match the names of the columns in the node result.

    • Replace the four default table fields with the five column names from the data set, selecting Number field type for orderID, customerID, and orderPrice, and Single line text for employeeName and orderStatus.
    • Delete the 3 blank rows created by default.
    • Also, rename the table from Table 1 to orders to make it easier to identify.

Now your table should look like this:

Orders table in Airtable
Orders table in Airtable

Now that the table is prepared let's return to the workflow in the Editor UI.

Add an Airtable node connected to the HTTP Request node.

Spreadsheet nodes

You can replace the Airtable node with another spreadsheet app/service. For example, n8n also has nodes for Google Sheets and Spreadsheet File.

In the Airtable node window, configure the following parameters:

  • Airtable API:
    • Name: The name of your credentials (e.g. airtable_api)
    • API Key: Your API key. Adding credentials for Airtable is similar to the HTTP Request node you configured in the previous chapter. However, the process of obtaining an API key for Airtable (and other apps/services) is different.
  • Operation: Append This operation will append the new data to the table.
  • Base ID: The ID of the beginner_course base. To get the base Base ID, go to Airtable's API page and click on the base you want to use. The Base ID will be listed in the introduction.
  • Table: orders

Now execute the Airtable node and you should get the following result:

Airtable node results
Airtable node results

All 30 data records will now appear in the orders table:

Imported records in the orders table
Imported records in the orders table

What's next?#

Nathan 🙋: Wow, this automation is really useful! But this inserts all collected data from the HTTP Request node into Airtable. Remember that I actually need to insert only processing orders in the table and calculate the price of booked orders?

You 👩‍🔧: Sure, no problem. As a next step, I'll use a new node to filter the orders based on their status.