Using no-code airtable and Netlify to quickly build a machine log application
Tags: nocode, tutorial, airtable
Published: 2020-08-31 06:25:08

---
title: Using no-code airtable and Netlify to quickly build a machine log application
published: true
date: 30/08/2020
tags: #nocode #tutorial #airtable
canonical_url: https://darraghoriordan.com/2020/08/30/no-code-low-code-application-netlify/
---

A friend asked me to create a tool for logging when one of his staff enters a room to turn on and off machine jobs. It needed to be on the cloud and run on an ipad. He wanted it to be simple and have an MVP fast.

I wanted to see if i could build the tool using no-code or similar. I got it built in around 2 hours using airtable! Though I found that I needed a tiny bit of code to make it more professional by having it on its own url.

<!-- end excerpt -->

## The solution steps

- Setup an airtable account
- Setup a new base
- Add a new table
- Add a new form
- Test the form
- Add the site template
- Add a github repository
- Add a netlify site
- Deploy your site
- Add a password on airtable
- Add a domain

## Setting up the basic air table account

First step is to go to air table and open an account. For our purposes you will have to purchase a Pro level account. This gives you custom branding on the form and a password restriction so you can keep it private.

Go here to sign up: [https://airtable.com](https://airtable.com/invite/r/KkhulZMr)

## Setting up a new base

In air table there is this concept of a base. This is like a single database or an app. We need a new one of these for our app.

Click add a base (the + symbol) and then “from scratch”. Call it “Machine Log”.

[![Add a base](https://darraghoriordan.com/static/fce1c2a130591fab4f5d94832301c8f5/fcda8/1addabase.png "Add a base")](/static/fce1c2a130591fab4f5d94832301c8f5/c56af/1addabase.png)

Open the new base. This will show you a grid view where we can edit the columns (they are called “fields” in air table). Airtable adds some default columns and sample data for us. For our app we need to customise these columns. You can remove all the fields to the right of “Name” that airtable adds by default.

[![delete fields](https://darraghoriordan.com/static/6df0549a64e212eb3f35e9fa0b044d56/fcda8/2deletefields.png "delete fields")](/static/6df0549a64e212eb3f35e9fa0b044d56/62da8/2deletefields.png)

We need to add a column that records when the person enters the log. For this we add Name: “DateOfAction”, Type: “Created time”, Date format: ISO, Include time, 24-Hour clock and use GMT time.

[![created date](https://darraghoriordan.com/static/ba54fa2431999372a6010f51e74b1443/fcda8/3adddatecreated.png "created date")](/static/ba54fa2431999372a6010f51e74b1443/7a4b2/3adddatecreated.png)

Next we add the name of the machine job that we’re logging. This is a fixed list of options for this application so we add a column called “Job Name”. Type: “Single select”, add some options.

[![machine job name](https://darraghoriordan.com/static/1f419b05be8164808aa4f0cbfa8bd04b/fcda8/4machinejobname.png "machine job name")](/static/1f419b05be8164808aa4f0cbfa8bd04b/553fd/4machinejobname.png)

Add the action that the operator is recording. We will call this the “Event”. Another single select field with “Start”, “Stop” and “Pause” options.

[![action](https://darraghoriordan.com/static/cb66c0f6516dd276889f244953af8a1d/fcda8/5action.png "action")](/static/cb66c0f6516dd276889f244953af8a1d/d93d9/5action.png)

We add a field that the operator can use to indicate why they are pausing the job. This will only be shown to the operator in our form if they have selected “Pause” in the event field.

[![pause](https://darraghoriordan.com/static/d8a6effcc7e9fd57bfcf16ff4dbb1fc0/fcda8/6pauseaction.png "pause")](/static/d8a6effcc7e9fd57bfcf16ff4dbb1fc0/8affb/6pauseaction.png)

The last column change we need is to make the Name column automatically filled when a new record is created. To do this we will use a formula column. The formula is `DateOfAction & "-" & {Job Name} & "-"&Event`. This combination should be unique for a single log entry.

[![name](https://darraghoriordan.com/static/dd57e769c7d8fe7c94398f9817aa8264/fcda8/7namefield.png "name")](/static/dd57e769c7d8fe7c94398f9817aa8264/9239a/7namefield.png)

Rename the table to “Machine Job Logs”

## Adding a form

So now that we have a table to store the data. We need to create the form for our machine operators to enter the data with a better ui than the grid view / excel view. To do this click on Add form. The form should already have all of our fields. You can add a logo if you like here.

Change the title and description to help our machine operator. You can edit the form field properties by clicking on the title of the form field.

Change the Job name field properties to look like this. It should be required and because there aren’t many options right now I change it to show the list of options.

[![job name form](https://darraghoriordan.com/static/32a79d11f89165ca0a1434696dc466fa/fcda8/9jobnameform.png "job name form")](/static/32a79d11f89165ca0a1434696dc466fa/669eb/9jobnameform.png)

Same for event - required, show list

[![event form](https://darraghoriordan.com/static/81788ce06f0fe32613529470147d2c3a/fcda8/10eventform.png "event form")](/static/81788ce06f0fe32613529470147d2c3a/b5dee/10eventform.png)

Set the pause reason to only show when the event is “Pause”.

[![pause form](https://darraghoriordan.com/static/c1de4e6cf134994bf0d8224371056f4d/fcda8/11pausereason.png "pause form")](/static/c1de4e6cf134994bf0d8224371056f4d/60b8f/11pausereason.png)

Change form so that:

- The button reads “Save Machine Log Entry” so it’s clear what will happen for the operator.
- Turn off airtable branding
- Show a message “Saving log entry please wait…”
- And select “Show a new form in 5 seconds”

[![form](https://darraghoriordan.com/static/50f264bec06a6b19562602faf0f1bb6e/fcda8/12formsetup.png "form")](/static/50f264bec06a6b19562602faf0f1bb6e/f87c7/12formsetup.png)

## Test the form

Use the preview feature to test your new form ! You can see that it will show with very little branding because of our pro account. This would take (me at least) a lot of work to set up and test with full code.

[![test form](https://darraghoriordan.com/static/784a65dae085a328ea2ae24f65e65ec0/fcda8/13testtheform.png "test form")](/static/784a65dae085a328ea2ae24f65e65ec0/c9c44/13testtheform.png)

## Add Some Code

Now we need to add some code but it isn’t much.

Create a folder on your computer and add this content to a file called “index.html”.

```
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Machine Job Logging</title>
    <script src="https://static.airtable.com/js/embed/embed_snippet_v1.js"></script>
  </head>
  <body>
    <iframe
      class="airtable-embed airtable-dynamic-height"
      src="======PASTE EMBED LINK HERE========"
      frameborder="0"
      onmousewheel=""
      width="100%"
      height="1000"
      style="background: transparent; border: 1px solid #ccc;"
    ></iframe>
  </body>
</html>
```

## Get your embed link

Air table allows us to embed our forms in another site. We’re going to create a netlify site to host our form soon. To get the embed share link from airtable. Click on “Share form”

[![share form](https://darraghoriordan.com/static/2477da89756c18e549c0fa7b879b7544/fcda8/14Shareform.png "share form")](/static/2477da89756c18e549c0fa7b879b7544/11a8f/14Shareform.png)

and then “Embed this form on your site”. This will open a new window with the details we need.

[![embed form](https://darraghoriordan.com/static/64155fc0bf65e09fb86816db0db2409d/fcda8/15embed.png "embed form")](/static/64155fc0bf65e09fb86816db0db2409d/1d553/15embed.png)

Copy the contents of the `src=""` bit from this page and past it into `index.html` replacing “======PASTE EMBED LINK HERE========“. So from the example in the image, our index. html would be

```
...
<body>
    <iframe
      class="airtable-embed airtable-dynamic-height"
      src="https://airtable.com/embed/shr0pGWyApaYYKXf0?backgroundColor=blue"
      frameborder="0"
      onmousewheel=""
      width="100%"
      height="1000"
      style="background: transparent; border: 1px solid #ccc;"
    ></iframe>
  </body>
...
```

## Add a github repository

There are many guides on the internet to show you how to do this. But create a new github repository and add the index.html folder to it.

## Add a netlify site

Signup for netlify and add a new netlify site. Tell it to use your new github repository from the step above. Because our site is super simple we don’t need any build command or output directory specified.

[![netlify](https://darraghoriordan.com/static/cc5a7e32e18f5a83dc0a4d4c2ab99eb9/fcda8/16addnetlify.png "netlify")](/static/cc5a7e32e18f5a83dc0a4d4c2ab99eb9/9a1cf/16addnetlify.png)

## Deploy your site

It should deploy in a second. Click on the link and you should see the form!

[![deploy](https://darraghoriordan.com/static/3d2e9cf8ebb1eb6779659e18eb989218/fcda8/17deploysite.png "deploy")](/static/3d2e9cf8ebb1eb6779659e18eb989218/4fa52/17deploysite.png)

## Password protect your site

Your site is now public to world and we don’t want people messing with it so add a password. Back in air table open the “Share form” popup again. Click on “Restrict access with password” and enter a password. Now when someone visits your netlify site they will have to enter the password.

## Add a domain

Use netlify to set up a custom domain (if you like). Follow their instructions here: [https://docs.netlify.com/domains-https/netlify-dns/](https://docs.netlify.com/domains-https/netlify-dns/)