Need development and API help? Ask your questions here!
Recently active
Sorry, no issue, can’t delete a post.
Is there any way to create a new record and insert it at a particular spot in the table (perhaps before or after a given row id) via the API? Thanks in advance. -Mark
Hi, I need to transfer a European time stamp to an API endpoint, and I’ve selected European in a date field type, which looks nice in the Airtable app. However, at the API endpoint I’m getting the date formatted in ISO. I used a workaround in some of my other fields using the DATETIME_FORMAT function, but since this is a field type with no formular I can’t do that. Any ideas? Thanks! Sune
Hi - I’m using Integromat to upload a file from Onedrive. The file is uploaded successfully through API call but then it’s immediately removed. Noticed from the history that the file was saved but at the same time another action was taken which removed the file. I have only one action from Integromat on Airtable which is to update the record with the record ID. Any ideas please? Thanks a lot!!
A couple of members have been kind enough to post code snippets to retrieve a base’s schema. I’ve build a small python script that can automate the process. Anyone with Javascript experience should be able to update this without too much trouble to a pure Javascript solution. The code is basically just a ‘proof of concept’ with no error checking to get people started. I hope it’s helpful. The (uncommented) source code follows; an additional post will show sample output of two schema formats (if the forum accepts it). Many thanks to Chester_McLaughlin and Kai_Curry for sharing their original Javascript code. jd P.S. I couldn’t include everything (with download links to installation files) because (as a new user) I’m limited to only two links and the code syntax seems to confuse the forum. Apologies for the omission. from Chester_McLaughlin: Metadata API for schema and mutating tables I found a half-way solution that will help in some use-cases while waiting for the metadata AP
Hi! I can’t undestand this error. Here is my code using JQuery and Ajax: $(document).ready(function(){ x = 1; $("button").click(function(){ $.ajax({ url: "https://api.airtable.com/v0/appHQ1ATs3SjuAC20/XXXXXX?api_key=XXXXXX", type: 'PATCH', dataType: "json", data: { "fields" : { "FIELD": VALUE } }, }); }); }); When I replace FIELD with the proper field name, and the data type of that field is a string, and replace VALUE with a string (e.g., “hola”), I can update the field through the API. But when replace FIELD with the proper name of an integer field, and replace VALUE whit a number (e.g., 1234), I get this error: PATCH https://api.airtable.com/v0/appHQ1ATs3SjuAC20/xxxxxx/?api_key=xxxxxxx 422 (Unprocessable Entity) I tried a lot of things but nothing works. Anyone can help me? Thanks
I’m writing a simple resource management application, where staffers enter for each month the percent of their time they spend on various projects. I store those allocations as "percent’ fields in an Airtable table. I collect inputs for these from a node.js web page, and want to update the allocations in the database. When I pass the values to the update() function, I see the following: error: ‘INVALID_VALUE_FOR_COLUMN’, message: ‘Field May 17 can not accept value 15’, I suspect that the system is seeing string values instead of the required number values, but don’t know how to deliver the correct format from JS. I’ve tried the value with and without quotes, and also tried submitting parseInt(value). Note: I’m also using eval() to generate the update() command, as my function handles the update field names as variables, which also seem to be a problem // build the update string var updatestr = "base(\'allocations\').update(\'" + request.body[i].allocid + "\', {"; updatestr += "\\"" + r
I am trying to develop a Chrome Ext which would need to talk to different Airtable Bases under the same Airtable account. Hence I need to programmatically get the AppID for a table in question. Any idea about how to do that? Is there an HTTP request service for that? I need this urgently as I other people are depending on this Chrome Ext. Thanks in advance.
Hi, Does anyone know what the first parameter is for the find function. Here is my example i found from the api docs base(‘Clothes’).find(‘recHCaksbNTrZKM2g’, function(err, record) { … Many Thanks
Hi, I’m using the API to send my new Firebase entries (function) in Airtable but I’m having a problem. Some of these values are identfiants to add values from a Lookup (Allow linking to multiple records). But when adding some values can be null (it comes from checkbox) and then I have an error message like this: Value “” is not a valid record ID. Does anyone have an idea how to make Airtable understand not to consider if it’s null and just take those with a value? Exemple : function createAirtable(id) { var t1 = event.data.t1; var t2 = event.data.t2; var t3 = event.data.t3; var t4 = event.data.t4; base('Deb').create({ "Date": xxxx, "Client": [id], "Heure": xxxx, "Etat": xxxx "Description": xxxx, "Info": xxxx, **"Véhicule": [t1, t2, t3, t4]** <== id for the lookup but some values will be empty }, function(err, record) { if (err) { console.error(err); return; } }); } Thank you :grinning_face_with_sweat:
How can I make a database that is ordered by timestamp. I would be using this as an API and need items to be changed based on time and I can not figure this out. I’m very new to all of this and could really use the help. Thank you
@JB_Bakst Thank you so very much for publishing the Slack Slack Command How-To and Glitch repo!!! https://blog.airtable.com/api-content-series-slack-slash-command-app/ My team has this up and running on two of our most critical bases. It’s a longstanding dream come true (as Zoelle can tell you)! A few questions though… How can we specify the fields returned within the Slack message attachments? We have 80+ fields in our base and only want to return a very small sub-set. Can this filtering be done via View? Once we have limited the fields returned, how can we specify the order in which they are returned? Right now we are seeing variance in the order of the fields returned, between attachments. You suggest pagination for navigation of 10+ returned records. How is that configured? Again, MANY thanks! I’ve spent the last two Thanksgivings poking at this project, and FINALLY have 90% of what we need. :raised_hands: A.
Hi, I’m new to the world of javascript and node.js – actually, I haven’t written much code for a decade, but I’m interested in building an Alexa skill which pulls data from an Airtable base. I’m stuck with this function (below or on pastebin). Everything that gets displayed on the console is what I expect, however, I can’t work out how to get the function to return the string ‘Series Title’ (I know it’s something to do with the mystery of asynchronous code). Any ideas of where I’ve gone wrong (or pointers to tutorials/examples to help get my head around this). GPDataHelper.prototype.getSermonSeries = function(date){ var err, records, weekRecord, seriesRecord; var series, seriesID, seriesTitle; var filter = 'IS_AFTER({Date}, "' + date + '")'; base('Week').select({ maxRecords: 1, view: 'Main View', filterByFormula: filter, sort: [{field: "Date"}] }).firstPage(function(err,records) { if (err) { console.error(err); return; } records.forEach(function(weekRecord){ console.log('Retrieve
Hi, I use Airtable a lot as a data and project / Task management tool but at a relatively basic level. I’m not overly codey (which is perhaps why i like airtable). The base i use includes two tables, one for projects and one for task that i structure and use as expected. I have a lot of small projects and its working really well. I like the Kanban view, my brain reacts better to it. I would like some board views filtered by project, as that is a value referenced from the projects table i can’t use that as I’m aware. As this is only something i need for my larger projects i have current added a single select value for those larger projects that i assign to the relevant tasks. Work ok but it is manual and a little clunky. Any suggestions on how this could be automated or made smoother appreciated. Rob
How do I filterByFormula to exclude if a linked field is empty using CURL.
Hey, I’m new to trying to make apps, and I’m stymied by the instructions that came in my inbox from airtable the other day. I’m rewriting the Glitch example they gave to make it work with airtable. I placed the “post req handler” OK: app.post("/slack", function (req, res) { res.send(‘test response’); }); Then the instructions say: And in the “/slack” request handler, verify that the token Slack sends matches our token by adding the following code: const token = req.body.token; if (token !== process.env.SLACK_VERIFICATION_TOKEN) { res.status(403).send(‘Forbidden’); return; } I cannot figure out where exactly that code goes. Glitch gives me an error message no matter where I paste it. Any help is appreciated.
Hi! Dear, Would you please let me know is there anyway to have result record as (text)variables in Javascript ? Image as: ////////////////////////////////////////////////////////// function getData(){ base(‘New Playlists’).select({ filterByFormula: ‘ID = MyFunIDValue’, }).eachPage(function page(records, fetchNextPage) { records.forEach(function(record) { return record.get(‘ID’); }); }, function done(error) { }); } var data = getData(); alert(data); ////////////////////////////////////////////////////////// in this way I could have only result “undefined”… I thought it is trouble with asymetric treatment. but it didn’t work well like this… $.when( getData() ).done(function(){ alert(result); }); Please tell me what should be fixed or is there another command smart, like just getData(table,field,formula)
Would anyone tell me how I should go over my trouble with Airtable api? I would like pick up data from my table by curl with “filter by formula” i.e. filterByFormula: ‘(FIND(“0011”,Code))> 0)’, it is OK with record which has only one data “0011” in “Code” field. (I can get the record) but it is NOT GOOD with record which has two or more date (ofcourse one of them is “0011”) in “Code” field. (the request will not return this record) it is same for filterByFormula: ‘(SEARCH(“0011”,Code))> 0)’, Is there any mistake I made to handle this request curl ? Or would you please tell me how can I fix the formula to get all the records include “0011” ? //table condtion: The field “Code” is customized as “Formula” to get date from another field “Code ID” formula {CodeID} The field “Code ID” is customized as “Lookup” to get linked date from another field.
Hi all, I’m having hard time with “sort” through API. Whatever I tried got me INVALID_REQUEST_UNKNOWN error (message: Invalid request: parameter validation failed. Check your request data.) Here is the browser JS code I render the final request url: var rUrl = ‘https://api.airtable.com/v0/…/Data?api_key=…’; rUrl += ‘&filterByFormula=’ + encodeURIComponent(“AND({Pub}=’’,NOT(LEFT({Name},3)=’###’))”); rUrl += ‘&sort=’ + encodeURIComponent("[{‘field’:‘PID’,‘direction’:‘asc’}]"); Here is the final bundled request I make; https://api.airtable.com/v0/…/Data?api_key=…&filterByFormula=AND(%7BPub%7D%3D%27%27%2CNOT(LEFT(%7BName%7D%2C3)%3D%27%23%23%23%27))&sort=%5B%7B%27field%27%3A%27PID%27%2C%27direction%27%3A%27asc%27%7D%5D Removing sort from url always works but I tried many different versions of the sort value as well as different urlencoding/non-encoded versions. What am I doing wrong?
We’re building an Airtable add-on. Is there an easy way to get OAuth credentials so that users of the add-on don’t need to copy/paste API tokens? Thanks!
The API documentation implies that all that’s needed is the official node.js client I have downloaded the files and the page says to “install airtable.js in a node project: npm install airtable”. Where is “a node project” and where do I type “npm install airtable”? Do I need other software? Also, I have looked at the API code. For example, here’s the node.js code for retrieving a record: var Airtable = require(‘airtable’); var base = new Airtable({apiKey: ‘YOUR_API_KEY’}).base(‘app1234567’); base(‘SampleTables’).find(‘rec1234567890NRXLGMAK’, function(err, record) { if (err) { console.error(err); return; } console.log(record); }); How do I get the record number? Where do I store the code so that I can reuse it with different records? How specifically do I submit the code request to the Airtable website? Thanks.
I have a table with several entries. One Column is an ID which could be used several times (not unique). Now I would like to retrieve a list of all records with just one unique entry in column ID. Somehow like an inverted duplication-checker. I wanted to solve this using a filerByFormula but have no idea how to do it (I miss the group by operator of SQL at this point). How could I manage this using the API?
Dear Community Your help would be very much appreciated if you knew how to fetch one record from my table in Visual Basic Script VB.net code, could you help? Jonathan P.S. Here is the equivalent of what I want to do using the curl utility: curl.exe https://api.airtable.com/v0/app6hDo2mwb2dVccO/letting-agent-details/recly4jCvMGGMYbyu -H “Authorization: Bearer YOUR_API_KEY” Here is the equivalent of what I want to do using node.js: var Airtable = require(‘airtable’); var base = new Airtable({apiKey: ‘YOUR_API_KEY’}).base(‘app6hDo2mwb2dVccO’); base(‘letting-agent-details’).find(‘recly4jCvMGGMYbyu’, function(err, record) { if (err) { console.error(err); return; } console.log(record); });
As far as I can tell I aways get nice JSON responses, but with this error the response comes in the form of a HTML page. My error handling didn’t like that. <!DOCTYPE html> <html> <head> etc <h1 class="my2">This page is taking too long to load.</h1> Is this intentional?
I would like to filterByFormula the records with arrays that contain a certain ID. The arrays look something like this: Arr [a, b, c, d] [c, d] [a] How does one filterByFormula to get all the records with arrays containing ‘a’?
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.