Last updated March 21st, 2019

What You'll Learn 🧠

  • How to take a user's custom input and enter it as a new entry on your Airtable spreadsheet.

What is Airtable?

Airtable is a powerful tool that lets us mimic the functionality of databases without the hassle of learning technical details. Essentially, Airtable does most of the heavy lifting for us. 

First, let's head into Airtable and create a project.

You can start with a template, an imported spreadsheet, or from scratch.

For this example, I'm going to start from scratch. I've added data for one entry (note that this data does not matter and will be deleted soon ⏤ this is just used to get the POST request endpoint)

Once we have our one (gibberish) entry, we can head to this link. 

A list of all your Airtable sheets should appear. Now, you just need to click on the sheet you would like to work with.


Once you reach this page, navigate to the left task bar and click [Create a Record].

Next, ensure that you have 'show API key' checked off. This should be in the top right corner of your page. I will be referencing this screenshot for the rest or the tutorial.

Now, let's get started! 

Step 1  ➤ URL Endpoint

This is the endpoint we need to POST to our spreadsheet. Notice that it begins with XPOST ⏤ this is how we can ensure that we're using the correct endpoint. Also note that we have the POST request selected in Voiceflow, this is because we're posting data to the spreadsheet.

Note: Use your own endpoint or else you'll be posting to my sheet! 👀

https://api.airtable.com/v0/appZNiAMELwVfJU5d/Table%201

Step 2  ➤  Header

Authorization: Bearer keyPsb0uwEgg6O2Gz

Each sheet has a unique key. If you have the key to a sheet, you have access to it. So really, if you use the exact same URL endpoint and Bearer key as the one I'm using in this tutorial, you'll be posting to my sheet. 

Never share your API Key with anyone you don't want to give access to your spreadsheet! 

Replace my key (underlined in red) with your key but copy the rest of the content in the 'Headers' section.

Step 3  ➤  Input Raw Data

Navigate to the 'Body' tab and select 'Raw Input'

Copy **only this portion** of the code from the earlier screenshot and paste it in the 'Raw Input' area.

{
  "fields":{
    "Name":"weeee",
    "Notes": "woooo",
    "Favourite Colour":"haaaa"
  }
}

Step 4  ➤  Replace the Data With Variables

Create your variables within Voiceflow then input them within the quotations in the Raw Input section. 

Step 5  ➤  Delete the Gibberish

Remember when we put that random data in our record? Well, we don't need that anymore. We only put data in our sheet to get the URL endpoint ⏤ let's delete it. Right-click on all of your entries (even the blank ones) to delete them. Your sheet should look like the one below:

Step 6  ➤  Store Data in the Variables

I'm using a set block in this example, but you can ask the user for this information using a capture block or interaction block and store it in the corresponding variables.

Step 7  ➤  Time to Test! 


The flow has ended ⏤ check your spreadsheet!


Success! 🎉

Still have questions? Be sure to post in our Forums to get fast answers!

Did this answer your question?