Chatting with Airtable
A quick experiment with nocode + AI to make a chatbot that can talk to Airtable.
I’m on the fence about AI - some days extremely skeptical about it and all it promises, some days extremely excited about it and what it could potentially solve. I have this feeling in my gut that although we’re not there yet, it will likely have a big impact on the way we communicate with technology, and things will probably get a bit chattier (rather than visual).
Related to this, one thing I get asked to do a lot is recommend a nocode tool for a particular use case - generally it’s founders who don’t code who want to build an MVP or people who want to build an internal tool to manage a process within their organisation. I have conversations like this once or twice a week.
So I thought I’d try an experiment to see if I could take some of the opinions I have about the nocode tool ecosystem, pop them into a semi structured system, and create a way for people to talk to that system and thus circumvent me (my old boss used to say that all software is just for avoiding people).
Here’s the (extremely) finished product:
I used four tools
Airtable - somewhere between a database and a spreadsheet, I really like Airtable for small experiments like this. Airtable held the data for me.
BuildShip - like an automation tool with a bunch of AI workflows sprinkled into it. A new one to me, it’s a bit more lowcode than nocode, but I was able to stumble through it.
OpenAI - to do its AI stuff. BuildShip actually managed the automation, but OpenAI was doing the heavy lifting behind the scenes.
WeWeb - a frontend builder. I use it in my day job, so just chose it because it’s what I know (and I do really like it).
The data
Firstly, I created an Airtable, and dumped some thoughts about common nocode tools in it. I wasn’t overthinking it - I just wanted something to play around with. If you feel I’ve misrepresented your favourite tool, fight me.
I didn’t really know what structure would work, I still don’t. I just wanted something to start with. Fine tuning and keeping it updated comes later.
Creating the chatbot
This was totally new for me - I’ve never really created anything like this, so it took a little bit of playing around to get it working. It also took some money - I had to pay $5 to OpenAI for platform credits in order to create an “Assistant” - the thing that will do the Airtable searching for me.
Creating an Assistant has a full nocode setup (located in the “Playground”) - you can just build it in an interface - it just needs to know what it should do, and you can choose a few basic settings. Once you’ve created it, it’ll generate an assistant code, of the format asst_jakjsdlfjahwefh. We’ll need that.
Over to BuildShip.
BuildShip’s interface was fairly familiar to me, it’s pretty understable if you’ve ever used something like Zapier / Make or played Factorio. Something happens at the top of the screen (the Trigger) and other stuff happens as a result (the Actions).
BuildShip has a bunch of templates to make getting started easier (I actually started by making a simple Hello World REST API call / response, but let’s cut to the more interesting bit).
I chose the “Chat with Airtable” template.
Now, this required a bit of configuration. Firstly, I knew I wanted to send a prompt from the frontend I would eventually build (IE what the user was inputting) - I thought I’d just send that as a query parameter. So I needed to extract that information from the trigger. Fortunately, BuildShip has a rather snazzy Get Query Param block built in. I called the parameter message.
Then, it needed to take that message and send it to OpenAI’s Assistant. For this you need
Your OpenAI API Key (found in your account)
Your Assistant ID (that we made earlier)
Then, I wrote some Instructions - I’m trying not to overthink these, the gist is “recommend a tool based on the user’s prompt, using the advantages, disadvantages, and notes from the Airtable”.
For the User Prompt, I wanted to use the value of message extracted from Get Query Param:
And the final piece of the puzzle is to tell the automation what data in Airtable it should chat with. You need to provide
Your Airtable Access token, found in your Airtable settings
The Base ID (starts with “app”, you can copy it from the browser URL when you’re viewing the table you want to chat to)
The Table ID (ditto, but starts with “tbl”)
Then you just need to change the response to the “OpenAI Assistant” response value.
And, that should be it. It took me a few goes to get this right, but once it’s set up you can click “Ship” at the top right, and it’ll even create you a simple chatbot then and there to test it out.
But, I wanted to play with the frontend a little bit more, so took my ass over to WeWeb.
Frontend
Like I said, I chose WeWeb just because I know it. I put together a quick interface below. I was inspired by a much nicer looking website I saw a few months ago where you just chatted on the left and got the results you wanted on the right. I can’t remember what it was called though.
WeWeb has a built in REST API connection - I pointed it to the endpoint generated by BuildShip, and added a query parameter on the end of the form “message = the value from the input form I had created”. I don’t know why I didn’t use WeWeb’s built in query handler 🤷
Then, over in the page editor, I made it so when you click the button it would trigger that REST API collection I had just created, and save the response that was received as a variable “response”.
Lastly, on the right hand side of the page I added some Rich Text that displayed the variable “response”, as well as a placeholder for while the search was happening so people knew it was working.
Et voila, working as intended. I definitely did extensive testing, I promise you that.
A few things -
This system is inherently biased and opinionated - it’s meant to be. There’s a world in which the Airtable crowdsources a bunch of opinions about these tools from loads of data sources, and amalgamates them. But for me, I just wanted it to guess at “here’s what Oli would say if you asked him”.
Just the very limited testing of this cost about $0.20 in OpenAI credits. Not much, but I think if I was to make it public and it saw any real use, I’d be out on the street by the end of the week.
For me, the exciting thing about this is more the internal tool side of things - BuildShip also integrates easily with Supabase / Google Sheets / other places data lives, so being able to quiz larger data sets would be super interesting. You could create something like this that speaks to your internal systems pretty easily.
Apart from the $0.20 for OpenAI, the costs for this were zero. Airtable / BuildShip / WeWeb all have free plans that let you experiment with them.