Create records in Airtable with Webflow Logic

Use Logic’s Make HTTP request block to send data from Webflow form submissions to Airtable.

We’re transitioning to a new UI, and are in the process of updating our Webflow University content.

With Airtable, you can create and manage databases of information that are important to your business. Logic lets you send data, such as a lead’s contact information, from form submissions to Airtable, connecting your Webflow site to your business database. 

Before you get started: If you haven’t already, create an Airtable account and an Airtable base. You’ll also need to add a form to your Webflow site with fields that correspond to your Airtable table.

In this lesson, we’ll cover: 

  1. How to create your Airtable API key
  2. How to set up your Logic flow’s authentication
  3. How to find your Airtable documentation
  4. How to set up your HTTP request
  5. How to test and publish your flow
  6. How to troubleshoot issues with your flow
Pro tip: Logic also lets you sync data from Airtable to the Webflow CMS using the Make HTTP request block or an Incoming webhook trigger. Learn more about making HTTP requests with Logic.

How to create your Airtable API key

Similar to a password, an API key (sometimes called an “access token”) identifies the site or application making an HTTP request to an API. You’ll need an Airtable API key to send data to Airtable.

To create your Airtable API key:

  1. Go to your Airtable dashboard
  2. Click on your profile icon and click Account
  3. Scroll to the API section and click Create token
  4. Click Create new token 
  5. Give your token a name
  6. Click Add a scope and choose what you’d like to do with this API key from the dropdown menu (at a minimum, you’ll need to select data.records:write to send data to Airtable)
  7. Click Add a base and choose the Airtable base you want to send data to
  8. Click Create token, copy your API key, and keep this tab open!

How to set up your Logic flow’s authentication

  1. Open your site in the Webflow Designer in a new tab
  2. Select your form on the Designer canvas and open Form settings
  3. Click the Source dropdown and choose Logic
  4. Click Add new flow
  5. Give your new flow a name (e.g., “Send leads to Airtable”) in the Name field and add a description to the Description field if you’d like
  6. Drag a Make HTTP request block to the flow editor canvas and give it a name (e.g., “Create new lead record in Airtable”) 
  7. Choose API token from the Authentication dropdown 
  8. Choose Header from the Add to dropdown
  9. Enter “Authorization” in the Header field 
  10. Click Select a credential > Add new credential 
  11. Give your API token a name (e.g., “Airtable API token”) in the Name field and add a description to the Description field if you’d like 
  12. Enter “Bearer {API key}” in the Token field, replacing the {API key} with the API key you copied from Airtable
  13. Click Create to save your new credential and keep this tab open! 
Pro tip: You can also connect your form to a new Logic flow from the Logic panel > Flows tab. Learn more about form submission triggers in Logic
Options to Add a new flow or Browse flows appear in Form settings when Logic is selected as the source.
You can connect a form to Logic through Form settings, Form block settings, or from the Logic panel > Flows tab.
“Header” is chosen in the Add to dropdown and “Authorization” is entered in the Header input field.
The “New credential” modal window displays fields for the name, description, type, and value of an API credential.
For APIs that use bearer authentication (like Airtable), you’ll need to enter “Bearer” before your API key in the Token field.

How to find your Airtable documentation

  1. Return to your Airtable base
  2. Click Help and choose API documentation under Additional resources
  3. Select the table you want to create records in 
  4. Click Create records — example API requests for your table will appear on the right
Important: Airtable’s API documentation is specific to each Airtable base, so make sure you’re in the base you want to add records to.

How to set up your HTTP request

Now that you’ve created your Logic flow and Airtable authentication credentials, you’ll need to return to Webflow and set up an HTTP request in your flow. The HTTP request you configure in this step will create a new record in your Airtable table each time a site visitor submits your form. 

Note: If you closed the tab where your Webflow site was open, go to Logic panel > Flows tab and choose the flow you set up in the previous steps. Select the Make HTTP request block on the flow editor canvas to open block settings and complete the following steps.
  1. Click the Request method dropdown and choose POST
  2. Paste “https://api.airtable.com/v0/{id}/{name_of_table}” in the URL field, replacing the {id} with your table ID and the {name_of_table} with the name of your table
  3. Click the “plus” icon next to Headers to create a new header 
  4. Enter “content-type” in the Name field and “application/json” in the Value field
  5. Paste the code block from your Airtable API documentation in the Body field — it will resemble this (but contain fields from your existing Airtable records):
{
  "First Name": "XYZ",
  "Last Name": "XYZ",
  "Email": "ZYX@email.com", 
  "Status": "New lead"
}

Then, you’ll need to add dynamic data to your HTTP request to capture information from your form submissions: 

  1. Delete the values from your existing Airtable record and place your cursor between the empty quotation marks in the Body field
  2. Click the purple “dot” icon and select the corresponding dynamic form field (e.g., name, email, etc.)
Important: Make sure to escape any spaces or special characters in the table name in the URL field.
The Body field contains dynamic form fields to capture last name, first name, and email address from form submissions. 
The complete HTTP request block settings for sending data to Airtable include authentication, request method, URL, headers, and request body with variables to capture data from the Webflow form. 
A complete POST request to Airtable from Logic’s Make HTTP request block.

How to test and publish your flow

  1. Click Run test to complete setup 
  2. Enter sample values in the corresponding input field
  3. Click Run test 
  4. Click Cancel or Apply data to exit the test modal
  5. Click Publish 
  6. Click Stage flow for publish
  7. Publish your site
Note: If you receive an error message while testing your flow, follow our troubleshooting steps, then retry the above steps. Learn more about testing HTTP requests.

How to troubleshoot issues with your flow

If you’re receiving an error when testing your flow, try the following:

  • Make sure you entered “Bearer” (and a space) before your API key when setting up your credentials (e.g., “Bearer 123456789”)
  • Make sure your request URL contains the correct ID and name for your table
  • Check for errors in your request body using a free tool like JSONLint 

Table of contents

Continue learning

Hmm…we couldn’t find any results for “search query”. Try a different search term or check out our community forum.

Search the forumReset the filter
Load more

Filter

Reset
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Topics
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Back to top