Need development and API help? Ask your questions here!
Recently active
Hi there! Here’s a newbie issue: I’m struggling to get an image url - I’m sure it’s very simple but I’m not very familiar with the syntax. I’ve tried a few different things but I can’t seem to get the ‘url’ parameter from my image field. records.forEach(function(record) { var $mealInfo = $('<div>'); $mealInfo.append($('<div>').text(record.get('Photo'))); $mealInfo.append($('<h3>').text(record.get('Name'))); $('#meal').append($mealInfo); }); Thanks!!
Hi, I’m using airtable.js to migrate a lot of data from Filemaker to Airtable at the moment. Each record contains a Picture (attachment) field with images. In airtable.js I’m creating an array which contains all correct image urls and filenames per record, which is then being pushed/updated to the relevant record in Airtable. E.g.: "Picture": [ { "filename": "1.jpg", "url": "https://www.cloud.com/_2801C_1.jpg" }, { "filename": "2.jpg", "url": "https://www.cloud.com/_2801C_2.jpg" }, { "filename": "3.jpg", "url": "https://www.cloud.com/_2801C_3.jpg" }, { "filename": "4.jpg", "url": "https://www.cloud.com/_2801C_4.jpg" }, { "filename": "5.jpg", "url": "https://www.cloud.com/_2801C_5.jpg" }, ] Logically, I want the position of my images to stay as stated in the array that I’m pushing, but the result I’m getting in the final Airtable is that picture 5.jpg is first and 1.jpg is last … This seems like a bug to me … Or am I doing something wrong? Is there a way to maintain the positioning of t
Hi chaps, I’m using the API to add a new record to a table and getting stuck with a Foreign Key (Integer). I am using C# and the AirtableAPIClient Nuget Package. This is where the code is tripping up: fields.AddField("Username", username); fields.AddField("Password", password); fields.AddField("Ref", Refs ); AirTable is returning a 422 error on the Refs field. The foreign key is a single link, not multiple. The column itself is a LongInt. I’ve tried adding an array, a single value, but not having any luck with this. Can someone please advise? Thanks
Hi, I want to be able to pull a record at random from my table via the js api. To do so I need to know the max number of records that exist in the table. I have used Auto numbering to create the id ( key field ) of the table. I can then simply generate a rand number and pull the record that has that rand number as it’s id. How ever I am stuck at present trying to figure out where I can get the number of records from, is there away to query the size of the table? or retrive the last record ( because of the auto numbering it’s ID would be the max record number ) thank you for your help and time.
Can someone provide me with an example to insert a record into a table with the Airtable api from zapier code? I have seen codes that show using GET command with and can get that to work in postman no problem. I have yet been able to do a post command with postman successfully. I will get a 200 response but the record never actually inserts into the table. Does anyone have any insight where I can find more information on this? Thanks in advance.
Apologies in advance, this is probably a dumb question but I’m relatively new to airtable and I’m trying to retrieve individual records using the API through node.js and I can’t figure out how to store the JSON output as a variable I can parse through. From my API documentation, I am being told I can retrieve an individual record using: base('base-name').find('record-name', function(err, record) { if (err) { console.error(err); return; } console.log(record); }); This works perfectly well to print the record to the console. But how do I assign the output to a variable which I can parse through? I’m sorry if this is a dumb question. Really appreciate any help!
The Github site for Airtable.js lacks too much information for beginners. The README explains almost nothing. However, I did look at the test.html file and was able to make a very basic test of my own. But, other than looking at test.html, how do you discover what Airtable.js can do?
Hi, I’ve got 3 tables i’d like to be able to return records from a linked table based on id’s. i’ve been trialling the filterby formula function to retreive a record by ID but how do you do this by multiple id.s eg. 1 record from a table looks like this “id”: “recOW2bVrD0EuXF7M”, “fields”: { “country”: “Australia”, “continent”: “Australia and New Zealand”, “partner_universities”: [ “recS7EnXzspRowVfb”, “recVpXFu93umekVij”, “reckcPSPWYAAzl7Ld”, “recUe3go5fHBqR1a8”, “recwzDNlgGOcuRrRY” ], “subject_university”: [ “rec4uL4PmXuO4UzMO”, “recNGBHjUh4yVzXp3”, “recc3ovVUYJ6b4qDD”, “recKv6l77p95Gn3im”, “rec5i1AgZwl5pdV4Y”, “recEpoJL6G0hxWxeZ”, “rec8KZDmdT8aotNdB”, “recmxAJYdxIhpmBFR”, “recx12pYZAcJLRCjv”, “recX6TGusfr1EoJVC”, “recnYZoCmrnWeLuG1”, “rectMdcCx3wWvXaS2”, “rec2XlS0dGmcdZxvx”, “rece2IYb8aCbMiqQl”, “recWeabmWidCnrvff”, “recmHycR4LgyKrxl6”, “rectGeLjBG9lIfJhG”, “recsxDGN1LUn4Yt5K”, “recvW3zithBqZqvRI”, “recQVWTz8IdwIeCgf”, “recMzzvoma0Mg2nKv”, “recoEiEKLDXGZbKfm”, “recp37vk0eogqnNDS”, “
I have a base that I can retrieve records from using the API from Javascript code, but I’d like to get the value for other fields besides just “Location”. Using “console.log('Retrieved: ', record.get(‘Location’));”, how do I modify this line to include in the output the field values for a field called “Size” in addition to the “Location” field? I tried separating multiple fields with a comma, but that didn’t work.
Hi, I am having some trouble with a Patch request to update a Duration field. The error I’m getting is this: {error: {type: "INVALID_VALUE_FOR_COLUMN", message: "Field Time Spent can not accept value 5306"}} But what’s interesting is, if I change the field type to “Single line text,” it works fine and updates the field as expected. Here’s how my header looks in both cases: Am I formatting the value wrong for the ‘Duration’ field type? I tried converting 5306 seconds to “01:28:20” string but I got the same error. Any thoughts? Thanks, Roosevelt
Is there an API call/endpoint that will list all of the tables if given a BaseID, or do we need to wait until the Metadata API is public?
Hello, I’m trying to sanely bulk update a set of records from a source to Airtable. Mechanically, I have it working, but I’m thinking that I need to employ some better practices for managing these updates. Here’s the current state: Data Have a JSON payload of multiple rows, preprocessed to match the Airtable schema Do not have the Airtable record ID in that dataset, we have our own identifier Process/Script Loop over each record in the JSON payload, add a timestamp (for sanity checks) Run a select query on the API filtering by our ID If nothing found, issue a create request with the payload If found, issue an update request, passing the record ID from Airtable returned in 2 The problem As written a number of async requests get issued and we run into conflicts. Then data doesn’t get written. I want to make sure the sync is bullet proof so we don’t run into data loss issues or have to do a lot of additional QA. I mitigated by setting a timeout for the first request. I’m thinking of t
I have records that look something like this in Employee table. “records”: [ { “id”: “recxPbyRYLea1Y3u7”, “fields”: { “Name”: “Jane Doe”, “ID”: 1, “Roles”: [ “rec93YegEkI0lLKi0”, “recgUgOR7mEk9SYDm” ], … } } ] As you can see Roles link to other Table, so what I wanted to achieve is that filter Employee data including data that is linked from another table in this case Role. e.g. I wanted to show all Employee with Roles Id of ‘rec93YegEkI0lLKi0’ using ‘filterByFormula’. I’m using CURL PHP Thanks
Hello, working on small PHP site with https://github.com/DavidZadrazil/airtable-api-php/ When I’m trying to update Checkbox or Number field via $response = $request->updateRecord('recsH5WYbYpwWMlvb', ['Cancel' => '123']); $response->isSuccess(); // true / false I get this error; Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:PATCH https://api.airtable.com/v0/appXXXX/Invoices/recSMXnTwTiRrRvGBresulted in a422 Unprocessable Entityresponse: {"error":{"type":"INVALID_VALUE_FOR_COLUMN","message":"Field Cancel can not accept value 123"}} I can successfully update Name fields. Any ideas why i get 422 error? Thanks
Apologies if this is an ignorant question, but I want my call to the API to fetch all pages automatically, without extra user action. I started with the sample code base('allocations').select({ // Selecting the first 3 records in Main View: maxRecords: 3, view: "Main View" }).eachPage(function page(records, fetchNextPage) { // This function (`page`) will get called for each page of records. records.forEach(function(record) { console.log('Retrieved ', record.get('ID')); }); // To fetch the next page of records, call `fetchNextPage`. // If there are more records, `page` will get called again. // If there are no more records, `done` will get called. fetchNextPage(); }, function done(error) { if (error) { console.log(error); } }); The code appears to call fetchNextPage() after each page of results, which i expect will then call page() again. This does not happen; the next page is not fetched. What am I missing? Thanks,
Hello guys! Im trying to create a record through the Airtable’s API but I can’t get it. I am using Origami Studio and this is the message that airtable say: { “error” : { “message” : “Could not find field “fields” in the request body”, “type” : “INVALID_REQUEST_MISSING_FIELDS” } } And this is my json { “fields” : { “Name” : “Send” } } So… why it is happening? Thanks a lot!
Hi I have come across the need of filtering records based on a field’s value in a defined list of values, this is equivalent to SQL WHERE clause like WHERE field IN (value1, value2, value3), so I wonder how I achieve this with Airtable API.
Hi, I have a table with a column called Last Name. I want to search for all rows which the last name, for example, contains riva. Then it would have to return rows for the last names Trivax and Trivedi for example. I use the following cURL command: curl "https://api.airtable.com/v0/appXXX/MyTable?maxRecords=3&filterByFormula='SEARCH('riva', {Last Name})'" -H "Authorization: Bearer MyAPIKey" But it doesn’t work. I also have tried replacing { and } and space with proper url encoding, but still no luck. Any suggestion how the cURL command for this should be written? Thanks
Let’s say there are 1000 records in Airtable that I need to fetch via the API on a regular schedule (to sync to an SQL DB). How is one supposed to keep within the API limits? Since Airtable seems limited to only fetching 100 records at a time, this will need 10 requests, and I would assume that fetching them in quick succession could potentially hit the API limit of no more than 5 requests per second. Can anyone confirm the best way around this? Is it necessary to introduce deliberate delays between the requests in order to combat this? (The limit of only 100 records at a time is quite frustrating and bothersome IMHO.) Simon.
Has anyone figured out how to create a Slackbot that can query Airtable via API? Our first use-case is a glossary. We’d like to create a database of internal acronyms and industry jargon, that can be searched via Slack. It’s my understanding that the Slack dev team has built such a bot for their internal use, but assume that their glossary dataset is not an Airtable base. We’ve looked at tools like Howdy’s Botkit, and API.AI, but neither plays nice with Airtable out of the box… A Zapier workflow would be ideal, but we’re open to any solve that does not require custom code. Thanks in advance!
How can I add a filter to the api that will filter records id an Attachment field is not empty. Can Find that option.
I want to make a dynamic progress bar for my website. We are counting number of donations with a goal of 200. I think I can use airtable api to do this, but struggling to figure out how. I have figured out how to use vue.js to get info from my base and display it on my site, but how can I link a progress bar to my base to count the number of donors and link it to my progress bar? Any help is greatly appreciated.
When querying the metadata api for view metadata, currently the only information included is the view id, name, and type. It would be great to get list of the filters used, and the fields referenced in the filters, similar to how we get ‘fieldIdsReferencedByFormulaText’ for the metadata of a formula field! "views": [ { "id": "viwQpsuEDqHFqegkp", "name": "Grid view", "type": "grid" } ] For context, please see how we are using the metadata api to get a high level view of the structure of our bases here
(This is a copy of my question on Stackoverflow. It’s not getting any attention there so I decided to bring it here.) First, let me start with what I want to achieve. I want to query a table in Airtable that includes data from a linked table. Airtable returns the IDs of records in linked tables so I need to do a second lookup on each of those records to get the data I want (e.g. Name). Ultimately, I want to return to the client the ID and the other fields from the linked record. Problem is, I’m failing to achieve this because of the asynchronous nature of the API and my lack of understanding. The best I’ve been able to do so far is execute a bit of code in the done() callback of their API. The problem is that this isn’t scalable because it means I’ll get myself into callback-hell. (At least, that’s what I think I’ve been able to determine so far.) Here’s my code (FYI this is code to be run in an Azure Function): var Airtable = require("airtable"); var airtableApiKey = process.env.airta
I’m using the API to store the created time of a record in a separate field right after creation. It duplicates the value of the original created timestamp. Sometimes the formula is different when querying the record later though. Please have a look at the screenshot. The 2 formula fields show the timestamps in detail. The first row shows that the created time now is 1 second later than it was when the value was queried when it was copied earlier… It doesn’t happen consistently though. Could it be a rounding issue?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.