8/6/2023 0 Comments Twilio airtable integrations![]() Test it out by texting “Cat” to your Twilio number. On the phone numbers dashboard, configure your Twilio number to call this Function when a new message comes in. This code returns the Fact field of the first matching record.Īfter adding this code, save your Function and wait for it to deploy itself. ![]() Then we iterate through the records until we find a matching one, grab data from the field we want, and wrap it in some good old-fashioned TwiML so it can be returned as a message.See the Airtable auto-generated API docs for an example. Which is okay if you have a small number of records, but for larger bases you may want to paginate using the eachPage function. The all method is asynchronous and returns every record in the view.Called with no args, records are returned in random order. The select method allows you to select your Airtable view, which returns the records in the order listed in that view.First, we instantiate the airtable base.What is even happening here? Let’s break it down. Generate an Airtable API key and save it somewhere - you’ll need it in a minute. While you’re in Airtable, let’s get some credentials. Cute Animals, a link to another record (in the “Cute Animals” table).It also contains a “Genus” table that has 2 fields: Genus, a link to another record (in the Genus table).This base contains a “Cute Animals” table that has 3 fields: You can view it here and create your own copy with the “Copy base” button on the right-hand side. ![]() I’ve created a small base called “Cute Animals” that we’ll be working with today.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |