📐
Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place Docs
Snap to Place
Snap to Place
  • 👋Welcome to Thunkable Docs
  • 👶Getting Started
    • Signing In
    • Your Thunkable Projects Page
    • Tutorials
    • Live Test your App
  • 🆕Create New Project
    • Project Settings
    • Project Assets and Sizes
  • Thunkable Sample Projects
  • Public Gallery of Projects
  • 🛠️ Components
  • 🔘User Interface
  • Button
  • Label
  • Text Input
  • List Viewer
  • Web Viewer
  • Switch
  • Slider
  • Alert
  • Loading Icon
  • Date Input
  • Time Input
  • PDF Reader
  • Rating
  • 📊Data Viewers
  • Data Viewer List
  • Data Viewer Grid
  • Custom Data Viewer Layout
  • Data Sources
  • 📐Layout
  • Top Tab Navigator
  • Bottom Tab Navigator
  • Stack Navigator
  • Drawer Navigator
  • Screen
  • Row
  • Column
  • 📷 Image
  • Image
  • Photo Library
  • Camera
  • Barcode Scanner
  • Image Recognizer
  • Animation by Lottie
  • Video
  • Video Recorder
  • 🗄️ Data
  • Local Storage
  • Local DB
  • Realtime DB by Firebase
  • Airtable
  • Media DB by Cloudinary
  • File Picker
  • Web API
  • 🌍Location
  • Maps by Google and Apple
  • Location Sensor
  • 💲Monetization
  • Ads by AdMob
  • In-App Purchase
  • 🌐Sensors
  • Gyroscope
  • Magnetometer
  • Accelerometer
  • Timer
  • Bluetooth Low Energy
  • 🔊Voice
  • Sound
  • Text to Speech
  • Speech Recognizer
  • Translator
  • Audio Recorder
  • 🤝Social
  • Share
  • Email Sign In by Firebase
  • Push Notifications by One Signal
  • 🎮Gaming
  • Canvas
  • Sprites
  • Sprite Gallery
  • Canvas Label
  • 🤖Gaming Blocks🎮
  • Events
  • Motion
  • Looks
  • Direction
  • Sensing
  • Add & Remove
  • Stage
  • Canvas Label
  • 🤖Blocks
  • Control
  • Logic
  • Math
  • Text
  • Lists
  • Color
  • Objects
  • Device
  • Variables
  • Functions
  • "Any Component" Blocks
  • 🖥️ App Services & Emulators
  • 🔒App Data Privacy
  • ➕Make Copy
  • 📥Download
  • 📤Share
  • 📱Publish
  • Publish to App Store (iOS)
    • TestFlight Overview
      • TestFlight in Depth
  • Publish to Play Store (Android) with AAB
  • Publish as a Web App
  • Generate Screenshots
  • 🔎Troubleshooting
    • Login Issues
    • FAQs
  • 📏Intro to Spacing
  • 🖼️ Intro to Sizing
  • 🔤Fonts
  • 💾Managing Storage
  • 📝Bugs and Product Feedback
  • Snap to Place Hour of Code Videos
Powered by GitBook
On this page
  • Add a Data Source to your App
  • Adding a New Data Source
  • Add Filter View
  • Sort
  • Create your Own Table
  • Airtable
  • Authorization Header For Block
  • Google Sheets
  • Data Source blocks
  • Create
  • Read
  • Update
  • Delete
  • Filter

Was this helpful?

Export as PDF

Data Sources

The Data Sources blocks allow you work with the information that you have stored in your connected Airtable Bases, Google Sheets or Local Tables.

PreviousCustom Data Viewer LayoutNextLayout

Last updated 5 months ago

Was this helpful?

The Data Sources blocks allow you to perform a variety of CRUD (Create, Read, Update, Delete) operations on records that you have stored in Airtable, Google Sheets or Local Tables.

Add a Data Source to your App

To access the Data Sources blocks you need to add a Data Source to your app. There are two ways to do this:

  • Add a or a to your project

  • Click on the ⊕ icon in the Data Sources section of your component tree:

In the modal that appears, you can choose a previously connected Data Source, or add a new Data Source.

Adding a New Data Source

Add Filter View

  1. Open a data source.

  1. Click Add Filter View.

  1. Add one or more filter rules.

  1. Click Create Filter View.

  1. Select the Filter View in a data viewer's properties panel.

Sort

  1. Open a data source.

  1. Click on a Filter View.

  1. Click Sort icon.

  1. Select column.

  1. Select Ascending or Descending.

Create your Own Table

Start by naming your data source.

You can now see this Data Source from your Data Sources section. Click on the Data Source name to edit it.

The data editor allows you to edit, add, and delete columns of information. To change any of the individual values simply click on the cell and type whatever you like.

Airtable

Connect Your App to Airtable by OAuth

  1. Click Connect to Airtable.

  2. In Thunkable, click the data icon in the left side panel to access your data source library.

  3. Click the plus sign at the top of the panel.

  4. You can select from previously added data sources or add a new data source. Click Create New.

  5. Select Airtable.

  6. Click the OAuth tab.

  7. An Airtable authorization screen opens.

  8. Click + Add a base.

  9. Select the bases you want to authorize access to.

Select all the bases you want your Thunkable projects to have access to. This includes any bases you've previously connected by API key, as well as any new bases you want to connect to Thunkable.

  1. Click Grant access.

If you are connecting by OAuth for the sole purpose of migrating your connection from API Key and are not creating a new data source, you are done. The following steps only apply when creating a new data source.

  1. Select the correct base from the dropdown menu.

  2. Click Create.

  3. Refresh your page to ensure the data is reflected in web preview or via the Thunkable Live app.

Authorization Header For Block

This block is only necessary for Creators who use web API blocks to communicate with Airtable.

If your app uses web API blocks to communicate with Airtable, you must also incorporate the "authorization header for" block into your app. This block retrieves a valid token that can be used as the authorization header in web API blocks.

To use the "authorization header for" block:

  1. Ensure your project is connected to an Airtable data source by OAuth.

  2. Navigate to your project's blocks tab.

  3. Under the App Features heading, click Data Sources.

  4. Drag and drop the "authorization header for" block into your workspace.

  5. Use the block's dropdown menu to ensure the correct data source is selected.

Google Sheets

In Google Sheets, the entire document is considered to be the data source.

In order to use a Google Sheet as a Data Source, the first row in your Sheet must be a header row.

To connect a Google Sheet, sign in and grant permission for your Thunkable project to access your Google Drive.

Some users have reported issues connecting to Google Sheets if they are using G Suite for Education accounts. You may need to contact your G Suite administrator to review your security settings.

Once you have allowed this, you will see a list of spreadsheets in your Google Drive. If you don't seen the sheet you are looking for you can switch to list view, sort alphabetically or search for the one you need. Click Select to return to your Thunkable project.

At this time, connecting to .xlsx files that are hosted on Google Sheets is not supported. You can convert your .xlsx file to a Google Sheet before connecting it to your Thunkable app project. Simply open your .xlsx file on Google Sheets, then click File > Save as Google Sheets.

Data Source blocks

Create

The create row inblock allows you to append new rows to the end of your data tables.

The inputs are dynamic so if you change the name of Column 1 or Column 2 in the designer these changes will be reflected in the block too.

There is a second create row in block which allows you to add a row in your data source using an object. The field is the column name and the cell info is the value you would like to set.

Read

The get value from blocks allows you get read one value from a specific cell in your data table. You can specify the column name and the view in the block itself and pass the unique row id as an input.

The valid id types are index and unique id. The index refers to the row by its integer position (1 for the first row, 2 for the second row, etc.) and must be greater than zero.

The number of rows in block returns an integer corresponding to how many rows are in a given table.

The columns in block returns the column names of a data source.

Update

The update value in block allows you to modify or update an existing cell in your data source. The column name and view are specified in the block itself. The row id and new value are passed as inputs.

There is a second update row in block which allows you to update a row in your data source using an object. The field is the column name and the cell info is the value you would like to set.

Delete

Delete Row

You can use the Delete Row block to delete a row of data from your Data source. The row id is passed as an input. If there is an error, the error message is passed as an output.

Delete All Rows

You can use the delete all rows block to delete all rows in your data source. If there is an error, the error message is passed as an output.

Filter

Update Filter For Block Overview

The update filter for block allows you to edit the value for each condition within a specific view of your data source.

When adding a new Data Source, you can choose between , or as the source of your data.

Indicate if you'd like to use a custom view. Learn more here: .

Your Google Sheet must be for Thunkable to access its data.

Looking to reset your Google Sheets connection? for instructions

Get row object will return the row object of the specified row ID. The row object can be used with

The get row object from block returns the row object of the first row that meets the specified condition. You can specify the column name and condition in the block itself and pass the value as an input. The row object can be used with

The list of values in block allows you to read an entire column of data from a table and returns it as a list that you can then manipulate with the built-in .

Use a Custom View
shareable
Objects blocks.
Objects Blocks.
List blocks
Data Viewer List
Data Viewer Grid
Click here
Create your own table
Airtable
Google Sheets