Need development and API help? Ask your questions here!
Recently active
I’m trying to simply copy one text field to another text field in a table with 10,000 records, in batches of 50 with the Scripting App. What am I doing wrong in this block: let table = base.getTable('TableName'); let query = await table.selectRecordsAsync(); let records = query.records; const BATCH_SIZE = 50; updateLotsOfRecords(records ); async function updateLotsOfRecords(records) { let i = 0; while (i < records.length) { const recordBatch = records.slice(i, i + BATCH_SIZE); for (let record of recordBatch ) { let soureValue = record.getCellValue('SourceField'); await table.updateRecordAsync(record, { 'DestinationField': soureValue }); } i += BATCH_SIZE; } }
This behavior started a couple weeks ago. Using Airtable’s airtable JS API v0.5.8, I used to be able to call update() successfully on table where the value for column to be updated was a javascript number. Now it returns the error INVALID_VALUE_FOR_COLUMN. When I convert the number to a string before passing it into the update() call, it works. Just a workaround FYI for others. It seems like is some stronger API checking going on on the Airtable server API side.
I have 2 tables that I am working with, one called Projects and the other called Tracking (which are essentially tasks). I created a button in the Projects table that will run the script below when pressed. I have 3 separate template views in the Tracking table: 1) Residential Diagnostic 2) Development Planning and 3) Internal. Whenever I run the script, it enters the tasks associated with the Internal view regardless of the Work Type I select. Can anyone tell me where I am going wrong? // pick tables & views from your base here let checklistTable = base.getTable(“Tracking”); let projectsTable = base.getTable(“Projects”); let allProjects = projectsTable.getView(“All Projects, all fields”); // select an event to create a checklist for let selectedEventRecord = await input.recordAsync( “Choose a project to create checklist for”, allProjects, ); let workType = selectedEventRecord.getCellValue(‘Work Type Text’) if (workType == “Residential Diagnostic”) { let templateView = checklis
I’m trying to use scripting to call APITemplate.io to create a PDF file from some data. The fetch is failing. It works from Postman so I know the call is valid. I’ve taken the exact code from the Airtable script and run it locally in node.js - with the addition of npm install node-fetch and some top-level async function syntax so I can await, and that works fine too. So there’s something about calling the code from within an Airtable script that makes it return with a 303 error. Unfortunately I can’t find any logging at apitemplate.io to help me. Anyone have any ideas as to what I can look at? let url = "https://api.apitemplate.io/v1/create?template_id=<id>"; let headers = { "X-API-KEY": "<apikey>", "Content-Type": "application/json" }; let body = {content: "data"}; let response = await fetch(url, { method: "POST", headers: headers, body: JSON.stringify(body) }); let result = await response.json(); console.log(`download result from : ${result}`);
I’m trying to create a table using this code: I keep getting this error: Bundle Error: Cannot find module '@airtable/blocks/dist/types/src/types/field' from 'C:\dev\my_app\build\development\transpiled\user\frontend' As you can see…the type is found and no typescript errors are indicated on the line where it is used. Wondering if this is a bug or some issue that needs a work-around. I know this functionality is beta right now.
I’ve got a cURL PATCH request in order to update a record, however I seem to be getting this error: { "error": { "type": "INVALID_REQUEST_MISSING_FIELDS", "message": "Could not find field \\"fields\\" in the request body" } } This is my current cURL request, I am using PHP: <?php // get cURL resource $ch = curl_init(); // set url curl_setopt($ch, CURLOPT_URL, 'https://api.airtable.com/v0/appmAdTUWbbY2vitV/Members/recl0qsFKY2dkR1NR'); // set method curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); // return the transfer as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // set headers curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json; charset=utf-8', 'Cookie: brw=brwjOwXWWJ95PfnJr', ]); // json body $json_array = [ 'records' => [ [ 'id' => 'recl0qsFKY2dkR1NR', 'fields' => [ 'Rank' => 'Captain' ] ] ] ]; $body = json_encode($json_array); // set body curl_setopt($ch, CURLOPT_POST, 1); c
Is it possible to fetch all records from the entire base without needing to pick a single table? I’m creating a To-Do list app that’s pretty much like the example provided by Airtable. We have multiple tables organized by “Offices” like for example “Development”, “Design”, “Marketing” and so on. Each record is a Task. Our goal is to simply display all Records in the App that are not marked as Completed so our manager can easily go through those tasks in one place. The useRecords method requires a Table to be passed as an argument so I thought of maybe looping through all tables and then fetching those records but then I figured that this would make the app not reactive… So… Is this possible? If not, do you have any suggestions of how I could accomplish this? We sure don’t want our manager to have to select which table he’ll be working on since that’s irrelevant to him… Thanks for your help!
Airtable Blocks SDK is awesome, but ideally we’d like to direct the user to a specific record as seen within a grid view, in the context of all of its peers. For instance, this would supercharge a search app; all of a sudden, if I have a list of hundreds of records, without breaking my “comparing records” flow and forcing me to look only at a single expanded record, I can use an app that will scroll me to that record, if present, in whatever view is active (or one could activate it via cursor.setActiveView). For comparison, Clubhouse.io has this feature in its kanban as a “Reveal” button when looking at global search results, and Pivotal has the “target” Reveal icon within project history and other panels: Seeing project history Is there any way to do this in Airtable?
Please help on this issue. stackoverflow.com Updating a linked column gives an error in airtable java, spring-boot, jpa, airtable asked by Sachithra Pathiraja on 11:09AM - 12 May 21 UTC
A simple script to fetch search results from Google based on keywords in your base: let table = base.getTable('Searches'); let resultsField = table.getField('Results'); let record = await input.recordAsync('Record', table); let searchQuery = await input.textAsync('Search query'); if (searchQuery) { table.updateRecordAsync(record, {[resultsField.id]: 'Updating...'}); output.markdown(`Searching for ${searchQuery}...`); let results = await searchAsync(searchQuery.split(',').map(term => term.trim()).join('\n')); await table.updateRecordAsync(record, {[resultsField.id]: results}); output.markdown(results); } async function searchAsync(searchTerm) { let response = await fetch( `https://api.apify.com/v2/actor-tasks/<TASK ID>/run-sync-get-dataset-items?token=<TOKEN>`, { method: "POST", headers: {"content-type": "application/json"}, body: JSON.stringify({queries: searchTerm}), }, ); let re
I submitted the form months back and still waiting for the API, I want to create one automated tool. Any sort of deadline or page where I can track the status?
Hi, I want to be able to gather information from a conference management tool called Confex (www.confex.com). Where do I even begin to understand how to integrate with an IFTT tool? What questions do I need to get answered?
Hi all, I’m not sure if this is possible and if so, how, but I have a to-do list. I have a single line text field called {Title} in Table [Todo Table]. Each record in this table is a task. I also have a checkbox field, called {Done}. I then have a linked record field called {Blocked}. I add linked records in {Blocked} as subtasks. What I would like to achieve is: When I click on the button, the script checks whether {Blocked} is empty (does not contain any linked record) for that record If it’s empty, I need to tick off the checkbox (I have a Filter in place to auto-hide these completed records) If there is a linked record, an error needs to be returned. Ideally, with the content found in field {Title} of the linked record or otherwise just a generic error that there are linked records. I’m not sure if Airtable has any popup that can be generated or any other visual queue? If there is no such thing, the script could just not take any action. This should also give me an indication that
I’m wondering if anyone out there uses SupportBee for a help desk system and if so, have you ever considered or developed an Airtable base to backup all your support tickets to? I know you can export (fetch) tickets using the SupportBee API; the API instructions are here: https://supportbee.com/api#fetching_tickets. There’s a Python script for exporting SupportBee tickets to a database: https://github.com/SupportBee/supportbee-export that’s open source, but I’m not a Python developer and can’t easily put that to work. I thought maybe if someone has done something similar already you might share how to script this. Otherwise, there may be an opportunity for a skilled Airtable scripting programmer to build out this functionality and offer it up to SupportBee customers.
Hello, I am trying to update linked fields but I am getting an error. I know updating linked fields is challenging in Airtable so I went for the scripting route. Find my code below: //grab info from TF inputs let TFinputs = base.getTable("Fishel Inputs 2021"); let TFview = TFinputs.getView('Update Leaf Lease'); // grab record from previous input let TFRec = input.config(); let queryTFinput = await TFview.selectRecordsAsync(); // get all records in TF inputs let updated_record = queryTFinput.getRecord(TFRec.TFRec); let TFPoleNum = updated_record.getCellValueAsString("Pole # Fix"); let TFPanelBar = updated_record.getCellValueAsString("Panel Barcode"); let TFLightBar = updated_record.getCellValueAsString("Light Barcode"); let TFPoleBar = updated_record.getCellValueAsString("Pole Barcode"); let TFDateIn = updated_record.getCellValueAsString("Day of Entry"); console.log(updated_record) //grab record to update let SLLease = base.getTable("Street Leaf Lease TEST"); let SLLview
I have an airtable database of over 1,000 resumes. I’d like to extract a small set of information from each resume and get it in markdown or HTML. I’ve found javascript libraries that can do this alone, but I’m looking for a way to handle that on Airtable. Ideally, I would love to be able to have this automated for the resumes already in the database and resumes that get added. Would be nice to even create a new attachment on the record with the desired results. Any insight would be helpful, thank you!
Hello, Can we import data from API into airtable? If yes how to do so please?
Blacklight detected an AirTable third-party cookie on my site? I would rather not “serve these up” to my end-users. Is there currently a way to disable these using embed code, and if not could you please develop it. Browsers are phasing out third-party cookies anyway, and it’s not a good look for AirTable long-term. edit: reposting original post which was incorrectly marked as spam & closed: Removing Third Party AirTable Tracking Cookie on Embeds Development and integrations Blacklight detected an AirTable third-party cookie on my site? I would rather not “serve these up” to my end-users. Is there currently a way to disable these using embed code, and if not could you please develop it. Browsers are phasing out third-party cookies anyway, and it’s not a good look for AirTable long-term. edit: this post was marked as spam for some reason. Not sure if just I tried to post a reply containing the url
One of our scripts started erroring out last friday. I wasn’t informed until this morning. Getting the error: P: Validate this value before parsing at main on line 5 Thought this was really odd so I added a new scripting block, added the record picker example and changed nothing, same error. Has something changed recently with the scripting block as a whole?
Hi All, I am wanting to add a button to a view so that when it is pressed, all the check boxes in the view are ticked. In an ideal world, pressing this button would also send all the records to be printed (I have designed the printable page in page designer) however this is less important for the time being. any assistance would be appreciated. Rob
If anyone is trying to buid Appsheet apps on top of AIrtable, here’s a few posts you might find useful. And if interested you could provide your own experience. I have found it much more complicated than I expected, and have found very few forum references to help (isn’t anyone else out there trying to do this?) Basic first step, setting up security filters to restrict data access by user profile – I raised this question in AIrtable forum and found this answer in Appsheet forum (my question was already closed before I got a chance to post the answer). How to handle links and table keys if you want to allow Airtable data to be edited and added natively as well as via the appsheet app. I came up with a complicated solution but am wondering if anyone has found an easier way.
I need help writing the following script: Tables: Classes Students Grades (junction table) Each time an Enrollment form creates a new record in the Classes table, the script creates a record for each Student in the Grades table. Grades table is a junction table linking Classes and Students tables. I know there are several community scripts regarding junction tables but I need one that works from just one Class record at a time.
Hi community, I’m working on the integration between ServiceNow and AirTable, the goal is to manage AirTable subscriptions through ServiceNow, so I need to get AirTable user subscriptions into ServiceNow. Looking at the AirTable API documentation, I don’t see anywhere how to do a simple “Get Users”. Using the Enterprise Account > Get Information, I’m only getting the userIds without the other parameters. https://api.airtable.com/v0/meta/enterpriseAccounts/EnterpriseAccountId How can I get the list of AirTable users including all the following basic information? "state": "provisioned", "email": "foo@bar.com", "name": "foo baz", "lastActivityTime": "2019-01-03T12:33:12.421Z" Thanks a lot for your support Regards Alberto
I am using Airtable to send data through to another platform (Formstack Docs aka Webmerge). My base has a main record with a number of linked records per main record. The use case is that each item from the linked records will be a new row on a document. In order to do that, I need to send the data through to the document in JSON. Is there a way that I can produce the JSON of the linked records with a script within Airtable? Ideally I could put that JSON into a long text field. Failing that, is using a code step in Zapier the only other option? Thanks Shaun
Hello! I just wrote a quick snippet to turn records and linked records into labels, but I ran into the nasty surprise that the scripting block doesn’t allow HTML formatting. I can’t really do this in markdown due to the flexibility constraints of the labels I print on. Is there any way to either a) make the Scripting block render HTML or b) easily convert a script to a custom app? Thank you!
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.