How to Use Airtable as a CMS for a Startup

Written by insquadguys | Published 2022/09/06
Tech Story Tags: cms | startup | startup-advice | nocode | airtable | hacks | startup-development | remote-developers

TLDRAirtable is a cloud service with the most versatile interface. It acts as a CMS for data processing. The View functionality allows you to show data from a table in various formats: gallery, timeline, calendar, calendar and grid, grid, Gantt chart, etc. There are a lot of integrated services and automations. The CMS needs to implement new features quickly and be flexible, understandable, and scalable. The CMS must be flexible with a user-friendly interface**.via the TL;DR App

What can stop a startup from taking off?

The idea, the team, and the product are the core of any startup, which grows in sales and takes off into space. To get off the ground, we need a massive acceleration. Whoever is first is the fastest to achieve growth.

In this article, I will tell you how you can speed up the process of product creation and how you can create an admin panel in the shortest possible time.

What do I need a CMS for?

In our company, Insquad, we attract developers from different IT sectors to our web platform and suggest they go through our automated system of hard skills assessment. They must pass quizzes and coding tasks. After that, an HR specialist is assigned to the candidate. He conducts an interview with him during which his experience, grade (junior/middle/senior), and soft skills are evaluated. As a result of the interview, HR prepares a detailed CV for the candidate.

Thus, my team of developers and I had the task of creating a CMS system that would allow:

  • Track each candidate’s status and all relevant information in real-time

  • Fill out and edit each developer’s resume

  • Group, filter, sort, and show data in different formats to track statistics and search

  • Manage users with role-based access

In addition to the points mentioned above, the system must be flexible with a user-friendly interface. Since a startup is constantly testing new hypotheses and everything is changing very quickly, you need flexibility. For example, add a column and formula at any time to calculate HR professionals’ KPIs. Besides, creating a simple and intuitive interface is difficult. The CMS needs to implement new features quickly and be flexible, understandable, and scalable.

What were our solutions?

Continuing to process data manually is not our option; we must develop quickly.

A customized solution is expensive and time-consuming for a startup like ours.

While researching, I identified possible solutions to speed up the creation of the system:

  • Use some libraries, for example, react-admin or admin.js. This solution has disadvantages: long and expensive to develop; it is not a flexible solution at all)

  • An out-of-the-box solution, for example, Forestadmin. It allows you to configure a universal interface for your data storage and has a bunch of integrations. This service provides a dashboard and a set of widgets. It’s a quick solution but not as flexible as I’d like it to be. The big disadvantage of this system is that you have to write a CRUD API to integrate with it. Any addition or change of data involves changes to your working database and changing your API.

  • Airtable is a cloud service with the most versatile interface. It is more flexible than the previous one, because the data is stored on Airtable. The necessary data can be added at any time. For full integration, you only need to implement a synchronization service with your own internal database.

Why Airtable?

So we settled on Airtable. It acts as a CMS for data processing. How does it differ from Excel spreadsheets and Google sheets? In addition to its user-friendly interface, it is not only about working with spreadsheets. The View functionality in Airtable allows you to show data from a table in various formats: gallery, timeline, calendar, grid, kanban, Gantt chart, etc.

Default tools such as sorting, grouping, filtering and views are implemented very simply. Anyone, even a non-programmer, can easily master them.

Pros

  • Airtable provides excellent CMS functions for processing and visualizing data

  • Data can be divided into different workspaces, bases and tables

  • For each table, you can customize views

  • Role-based access setup for team members

  • The service is intuitive and easy to learn for employees who are not familiar with programming and databases

  • There are a lot of integrations

As a result, you get a large set of features and save time and money.

The paid version of Airtable allows you to use the REST API, gives you access to a whole marketplace of integrated services and automations. Automation is a very useful feature of Airtable, which allows you to write JavaScript scripts and automate various processes. In addition to that, Airtable is a stable company with a large capitalization.

Cons

Now consider the disadvantages of this service:

  • airtable is paid per user
  • A limited number of entries. For example, if you use a Pro subscription, you will be limited to 50k per base
  • You can’t fine-tune access to each field of the table. Everyone has access to the entire workspace at once.
  • API has a limit of 5 requests per second

Hack #1

Here’s how I got around this limitation.

The data are duplicated in your database and Airtable. It can change for two reasons:

  • Changing data on the side of our server, which updates the data in the private database and Airtable
  • Editing data by the HR department in Airtable

To get around the limits in the first case, I wrote a proxy function that buffers all requests and, on timeout, updates the data in Airtable with one batch request.

The code of this function:

import * as Airtable from 'airtable';
import { RecordData, FieldSet, Table } from 'airtable';

enum Action {
  CREATE,
  UPDATE,
  DELETE,
}

class AirtableProxy {
  private timeout = 1000 * 3; // 3 second delay
  private airtable: Table<FieldSet>;
  private batchCreate: { fields: Partial<FieldSet> }[] = [];
  private batchUpdate: RecordData<Partial<FieldSet>>[] = [];
  private batchDelete: string[] = [];

  constructor() {
    this.airtable = new Airtable({
      apiKey: process.env.AIRTABLE_API_KEY,
    })
      .base(process.env.AIRTABLE_BASE_ID)
      .table(process.env.AIRTABLE_TABLE_NAME);
  }

  private async _registerTimer(action: Action) {
    if (action === Action.CREATE) {
      setTimeout(async () => {
        const data = this.batchCreate;
        this.batchCreate = [];
        await this.airtable.create(data);
      }, this.timeout);
    }

    if (action === Action.UPDATE) {
      setTimeout(async () => {
        const data = this.batchUpdate;
        this.batchUpdate = [];
        await this.airtable.update(data);
      }, this.timeout);
    }

    if (action === Action.DELETE) {
      setTimeout(async () => {
        const data = this.batchDelete;
        this.batchDelete = [];
        await this.airtable.destroy(data);
      }, this.timeout);
    }
  }

  public async create(data: Partial<FieldSet>) {
    const setTimerFlag = !this.batchCreate.length;
    this.batchCreate.push({ fields: data });
    if (setTimerFlag) this._registerTimer(Action.CREATE);
  }

  public async update(data: RecordData<Partial<FieldSet>>) {
    const setTimerFlag = !this.batchUpdate.length;
    this.batchUpdate.push(data);
    if (setTimerFlag) this._registerTimer(Action.UPDATE);
  }

  public async destroy(data: string) {
    const setTimerFlag = !this.batchDelete.length;
    this.batchDelete.push(data);
    if (setTimerFlag) this._registerTimer(Action.DELETE);
  }
}

export default new AirtableProxy();

It is essential to know that the official Airtable library for Node.js has built-in logic to handle the speed limit.

Hack #2

To get around the limits in the second option — editing data in the Airtable, we wrote a separate service that transfers all the changes from the Airtable to our private database every few minutes. Link to the repository: https://github.com/AbrSergey/serverless-airtable-sync-cron

Overall, I found Airtable suitable for creating a full-fledged CRM system for a project. And the presence of a convenient API and multiple integrations speeds up the project’s launch and saves a lot of money, which is crucial for a startup.

Conclusion

Since the IT market evolves quickly and unpredictably, a startup needs time to grow and transform at the same speed. Airtable allows you to make a product from scratch in a tight timeframe. And with the several listed hacks, you can build a complex flexible solution.

I hope the information I have provided above is helpful and will simplify startup developers' life.

If you are scaling your development team, contact us at Insquad to scale your team 4x faster with remote startup developers.


Written by insquadguys | 🏆 AWS Certified Developer, CTO at Insquad.com
Published by HackerNoon on 2022/09/06