Need development and API help? Ask your questions here!
Recently active
Hello, I’m developing an Airtable App and I want to access to linked records of a given record. When looking into the API doc the only way documented is using useRecords like following: const linkedTable = base.getTableByName("table1"); const linkedRecords = useRecords( record.selectLinkedRecordsFromCell("table1", { // Keep the linked records sorted by their primary field. sorts: [{ field: linkedTable.primaryField, direction: "asc" }], }) ); the issue is that I’m trying to do some logic in a non React coponent in a “Service” class, so I can’t use useRecords… In the API docs they are talking about loading data, I tried loading data manually like so: const table1QueryResult = await table1.selectRecords(); await table1QueryResult.loadDataAsync(); recordToMatch.selectLinkedRecordsFromCell("table1") but I always get an error: Error: LinkedRecordsQueryResult data is not loaded at LinkedRecordsQueryResult.get Thank you,
MacOS Mojave 10.14.5 (18F132) airtable/blocks: 1.0.0 Browser: Chrome <Button marginRight={2} variant="secondary" icon="download"> <Button marginRight={2} variant="secondary" icon="upload"> Displays as: The icons look a bit messed up to me. They work okay as standalone <Icon/>s. @somehats tagging you again after you helped out last time - let me know if I shouldn’t though!
Hi all, For custom apps what is the recommendation for storing large amounts of data? For example: If I was building Page Designer, where would I store the whole page designed by the user? Thanks!!
I am trying to, with scripting, link multiple records to one record. The code I have below succesfully links one record, and I’ve tried using a for loop, as well as a forEach to get it to cycle through the record Ids in the ‘matchTKRecords’ array. I’ve attached a picture of the console.log output for the matchingTKRecords array. To clarify - my aim is to link the VMrecordID record to any/all of the records in matchingTKrecords The error I get is always some variation on: Error: Field "Linked tickets" cannot accept the provided value. at main on line 46 what I don’t understand is why an array of record IDs is not accepted as a write value for a linked tickets field (it is set-up correctly as a ‘link to another record’ field). Linking to multiple records is enabled let newForeignRecordIdToLink = matchingTKRecords[0].id; VMtable.updateRecordAsync(config.VMrecordID, { 'Linked tickets': [{ id: newForeignRecordIdToLink }] }) Thank you in advance for any assistance!
Does anyone know how to delete a record that has the same criteria (person_id + project_id) as a newly added record? Within our organization we have a table in which people give their estimate of hours per project. They fill this out via a form. Now they have to give an update as soon as they see a change coming. I am looking for a script code that will compare the fields (person_id and project_id) as soon as a new record is added and remove the old record if there is one and then add the new record. And if it is not there, then the record is simply added. Does anybody know how to program this in a script? Thanks in advance :pray: Robert
One thing I find is an issue with Zapier is how it fails to refresh the test data while I am creating the zap workflow. If I am going through the process of setting up the zap and the Airtable table doesn’t have any appropriate data in it (…it usually happens if I miss to add some data in the table or it’s not in a view it should be…) then Zapier will not show the Airtable fields as existing (in the action step). I would rather prefer if it would show the fields whether it has some test data or not. That wouldn’t be such an issue, I can go and fill in some data. BUT the issue is even after adding that information into Airtable (and refreshing zap or even reloading it), the newly added fields are still not showing up in the zap action step and it can take sometime or maybe an hour or so for them to show up. It’s strange, it looks like zap is cashing the airtable configuration or something and it doesn’t replace with fresh Artable data immediately. And that happens even if I select the n
Hey Community, I was getting help a little while ago on a script a month ago, and I’m trying to apply the old script to a new use case, and having a bit of a problem. I’m having another issue upstream through an integration that is removing the file name. This problem is a bug that doesn’t look like it’ll be fixed in the short term, so I thought if I reuse a name script I’ve been using, it should solve my problem. The only issue with the script is in the current version it was built to maintain the extension, IE: PDF, MOV, MP4, etc… but I want to completely rename the file via the field I have on my database. When I’m using this right now, it’s for some reason adding the name of the file at the end of it when the name changes… I’ve spent nearly 1.5 hours trying to solve this in different ways, but can’t figure it out. Does anyone who is better with scripts know how to change this? This is what it is currently giving me, and I don’t want the weird stuff at the end… I want it to end at .
I spent a lot of time learning this integration using native Wix Code. So I’ve created a Udemy course at https://www.udemy.com/course/integrating-airtable-and-other-3rd-party-api-data-into-wix/learn/lecture/22005838#overview that shows you how to integrate Wix and Airtable with no 3rd party middleware in between. The code uses the Wix FETCH function to call the Airtable API. It’s tricky because Airtable paginates the data to only return 100 records at a time. So my code uses the Airtable offset to loop through the data (very quickly) in batches of 100. I use it on my own site. The cost of the course is $30. The code is provided on the example website that comes with the course…but you need to pay the $30 for the course to get the password for the code page… The course is for beginner level coders or people who have never used Wix Corvid before so it covers off all the basics…
Hello. I have been running a number of scripts on different bases, most of these bases are in the 10s of thousands of records. I haven’t made many (if any) changes to these scripts but am noticing an incredible amount slow-down, primarily when I do a ‘while’ loop to update/create records. Example: while(updArr.length > 0){ await tbl.updateRecordsAsync(updArr.slice(0,50)); updArr = updArr.slice(50); } I wish I had numbers for how much longer these scripts are taking compared to how long they used to but it’s taking processes that used to take probably less than a minute and turning some of them into 5-10 minutes scripts. Far past an acceptable slow down for our use cases. I’m wondering if anyone knows why this would be happening to us, across multiple bases and scripts. Thanks in advance! Update: Part of me thinks that this might have to do with lookups, rollups, and counts. When I run one of these scripts, it looks like it won’t advance till the next loop until these have b
MacOS Mojave 10.14.5 (18F132) airtable/blocks: 1.0.0 table.checkPermissionsForCreateField('someFieldName', FieldType.DURATION, {durationFormat: 'h.mm.ss.SSS'}) Throws this error: “Can’t create field: invalid field config. Failed schema validation: .0.type does not match one of the possible values, .0.options.precision is missing, durationFormat is not included in th…” Same for table.createFieldAsync. Despite these being the correct options according to Airtable Blocks SDK Creating other field types works just fine. @somehats could this be a bug?
I’m looking to have rows within a specific base tie to different slack channels. For example, when a change is made to Row 1 within Base A, it notifies Channel 1. When a change is made to Row 2 within Base A, it notifies Channel 2, etc. Curious how this would be possible. Thanks in advance!
I will like to add a button to each record that once press will initiate a Curl request based on Records defined in that specific row.
Now Integromat Airtable v.3 knows when I change Airtable field name. When I rename the field the workflow in Integromat doesn’t break as it was with v.2. There was a bug in v.3 a few days ago when the Watcher module didn’t work and I had to reverse to v.2 but it is now fixed too. In addition to that loading of the Airtable Update module is also much faster because now it only shows the dynamic list of fields that are not hidden, unlike in v.2 that would take 5 minutes to load because it was loading them all. I like what I see in Integromat.
I’m trying to update an existing record by adding an attachment with a url that points to a remote jpg file. I’m getting the error “INVALID_ATTACHMENT_OBJECT”, which is not very helpful. curl -v -X PATCH https://api.airtable.com/v0/applxOrnAao5mXXXfek/Table%201 -H “Authorization: Bearer xxx” -H “Content-Type: application/json” –data ‘{ “records”: [ { “id”: “recySiYkz0crwyS5P”, “fields”: { “Notes”: “testing 1”, “Attachments”: [ { “id”: “1”, “size”: 26317, “url”: “https://www.filepicker.io/api/file/5YTJXioCQG0tYWPw6OPw”, “type”: “image/jpeg” } ] } } ] }’ I’m relatively new to the API so perhaps it’s something I’ve overlooked. Thanks
Hallo I need some more brain-power… I have a table with Projects and a table with Task. I will like to combine all Projects and Task in another table ProjectTask I have try with a automation, but I can’t group all the ‘Create record’ in one action. That means that I need to create a ‘Create record’ for each task, that will fail when I add a new task to the table. Is it possible to create one ‘Create record’ there look at all the task? I sure is can be handle by a script – can anyone help me with a script?
Hi, everyone! I would like to change the value of a record by sending an email. For example, I want that when sending an email to a specific email address, thanks to the subject of the email a record in a table changes its content. Is that possible? Thanks in advance!
I’m currently trying to clone one airtable into a different airtable. When I run my code, I eventually get timed out after copying anywhere from 100 - 700 rows. Is there anything I can do to ensure I don’t get disconnected to airtable. ‘’’ await airTS(‘Applicants’).select({ // Selecting the first 3 records in Students: maxRecords: maxRecords, view: “All applicants” }).eachPage(async function page(records, fetchNextPage) { await records.map(async function(record, count) { var keyValue = count.toString(); //each page resets count to 0, so count is 0-99 if (pageCount > 0) { keyValue = (pageCount*100+count).toString(); } // GCP Storage CODE const bucket = storage.bucket(bucketname); var theURL = record.get('Resume'); var bigtableResumeURL; if (theURL) { theURL = theURL[0]['url']; //create unique file name for gcp on storage and bigtable var lastPartOfFileName = theURL.substring(theURL.lastIndexOf("/") + 1);
I wonder if somebody familiar with Integromat can tell me if this can be done. I have a workflow starting with Airtable Watch Records module → Airtable Retrieve Record module ->… While this works OK, I don’t have many credits left at the end of the month with so many workflows I have running. I tested using Integromat iOS/Android app and it seems it doesn’t consume credits for stand-by operation, it just consumes the credits when the workflow is running. So I would prefer to run the workflow manually from the mobile device. It’s actually convenient. However, while most other workflows work that way, I can’t get it work with Airtable. Seems the Airtable Watch module is required, because otherwise, how would Airtable Retrieve Record module know what record to retrieve. Or is there any way to get around it? What I want is to launch the Integromat workflow from mobile. The issue is I can’t get the Android/iOS module connected with Airtable Watch module. This may be more or less questio
I know it is possible to get a list of selected records but is it possible to (un)select a record in the database from inside a custom app? I have been searching quite extensively. It seems to me to be a basic functionality but I just can’t find a way how to do it.
Hi! Is there a listener or hook to watch specific app lifecycle events? The main use-case we’re looking for is when the app gets uninstalled (aka deleted). Haven’t found any relevant info in the Blocks API. Thanks!
I have a scripting block that, for each record R in a given table, pulls a bunch of data from a different table, calculates a number N, and updates a field F for that R. The problem is some records are updated and others are not. I know that records are being pulled correctly as I print N for every R and it all calculates correctly. I know that the update code works as some records will update. One interesting thing to note: the updated R I think are all old and the non-updating ones were recently added. I thought this might have been a Free/Plus/Pro account issue as only Pro supports Apps and maybe older records were grandfathered but I have paid for Pro and still no go. Is this a permissions issue? By the way, are apps the same as scripting blocks or different? Code in question below: let table = base.getTable(BaseSpecificNames.cashFlowTable); let view = table.getView(BaseSpecificNames.sortedView); let query = await view.selectRecordsAsync(); let filtered = query.records; let dtab
Hi, is there a way to check the validity of a URL from a record? I would consider a URL to be valid if it is reachable and does not lead to a 404 error. Using Google I have seen examples as the following: var request = new XMLHttpRequest(); request.open('GET', 'http://www.mozilla.org', true); request.onreadystatechange = function(){ if (request.readyState === 4){ if (request.status === 404) { alert("Oh no, it does not exist!"); } } }; request.send(); But apparently XMLHttpRequest() is not known in Airtable Scripting block. Any hint would be appreciated! Thanks, Stefan
Hi, I’m wondering if anybody can help me write a script to convert .mov files into .mp4 automatically in Airtable. I currently use CloudConvert but since they have an API, I thought there may be a way to have this done in Airtable. I know very little programming and am not sure how to even start making this work. https://sandbox.cloudconvert.com/api/v2/jobs/builder#
Hi All, So I am trying to create a new record in Airtable using google app script. I have been using the API documentation and reading the forum but can’t seem to get it to work. Any help would be much appreciated. Thank you. Code snippet var baseKey = 'XXX'; var airtableAPIKey = 'XXX'; var airtableAPIEndpoint = 'https://api.airtable.com/v0/'; var tableName = 'Table 3'; var payload = { "records": [ {"fields": { "Name": "Jeff", "Date": "2020-11-15", "Status": "Done" }} ] }; function AirPost(baseKey, tableName, payload) { var options = { method: 'POST', headers: { 'Authorization ': 'Bearer ' + airtableAPIKey, 'Content-Type ' : 'application/json' }, payload : JSON.stringify(payload), muteHttpExceptions : true }; var response = UrlFetchApp.fetch(airtableAPIEndpoint + baseKey + "/" + encodeURIComponent(tableName), options).getContentText(); return(response); }
I am doing a onedrive link generator , however , I found file path structure is very important to me. file path of URL is like https://walttaz-my.sharepoint.com/personal/aloha631_office-365_com_tw/_layouts/15/Doc.aspx?sourcedoc={69284668-F854-4789-A74F-C9F6DA0C1AAB}&file=Link%20List.xlsx&action=default&mobileredirect=true I need convert it to something that I can understand I found there are some sites which are able to convert url to file structure https://www.convertstring.com/zh_TW/EncodeDecode/UrlDecode How can I convert it automatically within airtable?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.