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, Assignee, 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: Create This operation will create the new record in the table.
  • Base: You can pick your base from a list(e.g beginner course), URL or ID after authenticating. If you wish to use the Base ID, go to Airtable's API page and find the relevant base (located at the bottom of the page). Then click the base title and you'll find the ID on that page.
  • Table: orders
  • Mapping Column Mode: Map automatically. In this mode, the incoming data fields are named the same as the columns in Airtable

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.