The data is pre-ordered in ascending order by the ID column, which is an incremental number assigned to every new record automatically by Airtable. Here's a subset of the database so you have an idea of the schema, or to simply put it, the column names in our database table/spreadsheet: Using Airtable as a database: example of lists recordsĮach new message will have a unique (randomly created) msgId. We'll then make use of 'List records' to retrieve previously stored messages upon user request. We'll make use of WebHooks to send 'Create records' REST requests to the Airtable API each time a new chat message is published. In this example, we'll look at two operations - to store and retrieve data from Airtable. Airtable REST API How to use Airtable as a database Here's a look at the documentation for the chat app base. The JS code snippets require using the Airtable JavaScript Client SDK. They provide this documentation in cURL and JavaScript. This is for a good reason - their whole documentation is dynamically displayed with real keys, ids, column names etc, along with sample responses, based off your data, making it super easy for you to just copy out the code and use as is. a table/ sheet set up before you can check out the documentation. Example table in Airtable Airtable REST APIĪirtable comes with a simple REST API to perform the basic CRUD operations on the data stored. It combines a bunch of different tools like task managers, databases, CRMs, spreadsheets, etc, into a single product. It caters to the engineering and commercial departments in an organization alike with its robust REST API and very nice visual UI with custom fields to manage and represent the data. We'll use Ably's realtime infrastructure to power the chat app and make use of WebHooks to publish messages to Airtable directly in the correct order from Ably.Ĭheck the full source code of the group chat app written in VueJS on GitHub and the live demo of the application at What is Airtable?Īirtable describes itself as 'Part spreadsheet, part database, and entirely flexible' and that's exactly what it is to the word. It does not store any personal data.In this article, we'll see how to use Airtable to store realtime messages using a group chat app as an example. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly.
0 Comments
Leave a Reply. |