Need development and API help? Ask your questions here!
Recently active
Finally! Full, Dynamic Links Show and tell I know many people have been waiting for a HYPERLINK() function. This is not that, but its as close as we can get today. Check out how this simple script can create links that are dynamic and formatted with the text you want instead of the ugly full URL. Explainer Video: Loom | Free Screen & Video Recording Software Base: Better (Dynamic) Links - Airtable Universe Script: Create fully formatted links in Airtable · GitHub
Hi Airtable team - I’m seeing some strange behaviour - not sure if it is me or a bug. Here’s the scenario: I have some people and some events - a person can have one or more events (linked field). I’m updating the linked field in the people table (via a script) to all events where they have select “all events” (a different field). This all works fine. I have a 2nd script that run on the matching linked field in the events table. However, I’m finding that although the tables are linked in the people table, they aren’t yet linked in the events table. When the 2nd script runs it is not running against the full set of linked records and so is giving incorrect results. If I refresh my browser the linked records show in the events table and the script runs as expected. It is as though the links in the 2nd table haven’t been returned to the browser and the script is running totally in the client. The browser refresh populates the links in the events table client-side from the server. I’m gu
I’m attempting to migrate to Airtable from several custom SQL databases… The existing tables have several foreign keys that I am attempting to recreate in Airtable, but I cannot figure out how to update a record properly. In the example below, I’m trying to re-link the Cities to the references from States. There is an existing DBID column holding the original database foreign key. Finding the reference State is easy enough (though inefficient at this point), but I cannot figure out how to update the record properly at the end of the loop. Any ideas? let active_table = base.getTable("Cities"); let ref_table = base.getTable("States"); let query = await active_table.selectRecordsAsync(); for (let record of query.records) { let ref_id = record.getCellValue("StateRef"); output.markdown(record.getCellValue("Name")); let ref_query = await ref_table.selectRecordsAsync(); let ref_record = undefined; for (let find_ref of ref_query.records) { if (find_ref.getCel
Any ETA on when Rich Text fields will be supported via scripts?
Continuing the discussion from Script Block - Linked Record Issue: Hi Just wondering if this is the same issue. I have a linked record to another table. I’m trying to update this via a script. If I update a non-linked record it outputs as expected but seems unable to update the linked record. The code is as below: // set the table let dashboardTbl = base.getTable("Coaching - meetings"); // get the table records let dashboarddate = await dashboardTbl.selectRecordsAsync(); // loop through the records for (let record of dashboarddate.records) { // get date from field value "Date" let dashboarddate = record.getCellValue("Date"); // turn it into a date object dashboarddate = new Date(dashboarddate); //get year from date let dashboardyear = dashboarddate.toLocaleString('en-GB', {year: 'numeric'}); //get month from date let dashboardmonth = dashboarddate.toLocaleString('en-GB', {month: 'long'}); // only run on records which no linked dashboard data if
Are we not supposed to be doing this yet, or did I do something wrong? schedule_conflicts| |master=> block release building copying package.json files installing node modules [npm] [npm] > core-js@3.6.4 postinstall /private/var/folders/lx/d2z19t052vx3m9jb9xpd71nm0000gn/T/airtableBlocks/build/1583468310281/transpiled/user/node_modules/core-js [npm] > node -e "try{require('./postinstall')}catch(e){}" [npm] [npm] added 77 packages from 133 contributors and audited 672 packages in 17.866s [npm] [npm] 2 packages are looking for funding [npm] run `npm fund` for details [npm] [npm] found 0 vulnerabilities [npm] [npm] npm WARN user No description [npm] npm WARN user No repository field. [npm] npm WARN user No license field. [npm] transpiling and building frontend bundle uploading build artifacts failed to upload build artifacts Error: Failed to upload /var/folders/lx/d2z19t052vx3m9jb9xpd71nm0000gn/T/airtableBlocks/build/1583468310281/build_artifacts/bundle.js at /Users/JM
I haven’t been able to access the example custom blocks for some time now. When I try to build one from the template, I get this: blocks|=> block init appFalshZ06hLqEPb/blkmXtdrOPFKUVPIW --template=https://github.com/Airtable/blocks-flowchart flowchart_example Using your existing API key from /Users/JMO/.config/.airtableblocksrc.json Initializing block using https://github.com/Airtable/blocks-flowchart template [git] Cloning into 'tmp'... [git] remote: Repository not found. [git] fatal: repository 'https://github.com/Airtable/blocks-flowchart/' not found ❌ Something failed! Cleaning up... Error: Could not get template https://github.com/Airtable/blocks-flowchart - please check you entered the name correctly And when I try to view the source code directly on github, I get this: My github profile, in case it’s a permissions issue: GitHub jmoglesby - Overview Software developer and test automation developer at BCBSAZ. - jmoglesby
Hi, I have one table where we collect all the facilities requirements from various departments. I need the output like for each facility item what is the total count How to do that with scripting Can someone help me Regards Sridhamasakha Dasa
Now that the scripting block is available I’ve been trying to learn how it could fit into our workflow. We are building loads for delivery drivers to pick up and deliver. This screenshot is stripped down to just the information that we send the drivers and is a small data set for a visual. (Normally it would involve 4-5 drivers with 2-3 loads each) After orders(records) are grouped into loads, a driver and a farm are assigned. Then someone manually text messages the information to the drivers in the format shown in the word document on the right side of the screenshot. I feel like there must be a way to use a script to reformat the table data into the text message ready format. Totaling pallets for each load and showing which farm to go to. Then showing the destinations under that with their respective quantities. Bonus would be an SMS service to just send the driver the information in the new format. Is this possible? reasonable? Alternate route? Thank you.
Hello there! Who can help me with a script that will transform the phone field into the right international format? Example: I have a base with client phones. Most of them are in the national format 069xxxxxx, 068xxxxxx, or without zero 69xxxxxx, 68xxxxxx. I need to transform them all to the +37369xxxxxx, +37368xxxxxx. How to do this?
@Kasra @Stephen_Suen @Shrey_Banga and any other JavaScript :mage: ♂ Is it possible at all to call an async function from inside a loop? I’m trying to run a script that contains this loop: tablesToClear.forEach(table => { let recordsToDelete = table.records.map(record => record.id); let recordsDeleted = await batchAnd('Delete', table, recordsToDelete); if (recordsDeleted !== null) { totalRecordsDeleted += recordsDeleted; } }); where batchAnd() is defined as an async function that makes a call to table.deleteRecordsAsync(). I’m getting this error: ERROR SyntaxError: await is only valid in async function at new Function (<anonymous>) at _callee2$ (blob:https://block---falsh-z06h-lq-e-pb--68v3t0m.airtableblocks.com/e9e14464-0db0-424f-ad41-111819081f76:3359:53) at tryCatch (blob:https://block---falsh-z06h-lq-e-pb--68v3t0m.airtableblocks.com/e9e14464-0db0-424f-ad41-111819081f76:181:21) at Generator.invoke [as _invoke] (blob:https://block---falsh-z0
I’ve got a script that I wrote to help with processing donation requests at my job. These requests come via FormStack, and are sent to me via email (a process out of my hands at the moment, or else I’d shoot the data straight into Airtable). I copy the data from the formatted email and paste it into a single field in an Airtable record. I can make as many records as I need for any number of incoming donation requests, then run my script to process them all, creating and linking records across different tables. My original version is what I call the “dumb” version because it doesn’t check for possible duplicate records for organizations or contacts before making new records. I wanted to make a smarter version that would use existing records where possible, so I copied the “dumb” code to a new block and have been working on the updates for several hours today. It’s mostly working, but I’m getting some very odd results. In my tests, I’ve got three requests to process. The new request reco
I’ve got a script that I wrote with the scripting block prototype, and it worked perfectly well under that version. Under the new beta, I had to make a few minor tweaks due to API changes, and all appears to be fine except for one part that is being marked as a problem, when it worked just fine previously. I’m setting a value in a multi-select field using data I’ve extracted elsewhere. The code for the relevant portion that changes the multi-select is pretty bare-bones: reqtable.updateRecordAsync(reqrecord[0], {"Use": [{name: notes}]}); What’s being highlighted as an error is: {name: notes} The notes variable is a string, and should be one of the five options for the multi-select. Like I said above, this part has always worked in the older block, but in the new one the error popup gives me this: Type '{ name: string; }' is not assignable to type '{ name: "Silent Auction" | "Live Auction" | "Raffle" | "Other" | "Auction"; }'. If I replace notes in the code with a literal string, it’s
We’re excited to see so many of you testing out the scripting block! We’re hoping lots of you will be open to sharing the scripts you write with the rest of the community, too. In that spirit, the platform team wanted to share a few best practices for open sourcing a script: Include comments to explain what each part of your script does so others can understand and adjust for their own bases. Give any variables or functions descriptive names to make your script easier to read and understand. When posting code on the forum, use triple-backticks before and after your code to enable code formatting and coloring: Use input.tableAsync , input.viewAsync , input.fieldAsync and input.recordAsync to avoid references to specific fields or tables that might be different for other users. If you do reference specific fields or tables directly in your script, we recommend pulling them out into variables and moving them to the top of the script so others can change them to match their own bases.
Hey everyone, we at krautreporter are integrating the Airtable API to send some data for further manual processing to Airtable. I wonder how I as a developer can be notified about any planned changes to the Airtable API. As of today the API is AFAIU not versioned. So are you guys at Airtable planning to never remove anything or change any existing behaviour or what are the midterm plans on this topic? Sincerely Gregory
Hi all, I have played a bit with the Scripting block and I am amazed at its potential! Though I am stuck following a recent idea to enhance our base capability. We are managing real estate opportunities and we’d like to create a tool that matches all our client needs with our land portfolio characteristics. Let me explain, I have a table for owners’ requests (CANDIDATES) and another for land characteristics (LAND). I have several other tables with the characteristics by type (identical to the owners’ requests) to identify possible matches between the two. In my CANDIDATES table, I can look up all the LAND for each characteristic in different fields. Now what I’d like is to produce a report or table identifying the unique lands which have all the characteristics of the owners’ requests and that for each Candidate. Any ideas? Thanks a lot Ludovic
There are more fields being returned than in my View through the API. Any suggestions on what could be the issue? Regards, Ruchika
Hi community! We’re so tremendously thrilled to announce that our scripting block has officially launched! With scripting block, you can edit, write, and run short scripts that allow you to enhance and extend your workflows—all within Airtable. In practice, that means you can reduce time spent on repetitive tasks and uncover deeper insights with advanced queries and custom reporting. You can call on external APIs to enrich your records. You can generate new records with the click of a button! There’s tons of use cases, so we’ve put together a showcase of examples written by both our team and the community to help spark inspiration. But in this post, we really want to celebrate the incredible members of our community who put the scripting block through its paces during the beta period. Without feedback and support from @Bill.French, @Openside, @JonathanBowen, @Ronen_Babayoff, @Jeremy_Oglesby, @Russell_Bishop1, @Julian_Kirkness, @Matthew_Thomas, @Martin_Kopischke, @BobBannanas, @Bruce_H
I’ve been playing with the scripting block a little and it’s definitely a major step in the right direction - well done! However, my first thought after running Hello World was how do I trigger a particular script from an event (say updating of a particular field in a table)? Also thinking about how to run scripts periodically - say a daily update or alert process? Having said that I am of a mind to write a blog post about it - is that allowed on a beta feature?
Hi everyone, just wanted to post a quick thank you note for everyone that participated in the beta and provided feedback that helped make the block better! We’ve just turned on the block for everyone. Check out our post on ProductHunt: https://www.producthunt.com/posts/airtable-scripting-block We highlighted some of the amazing scripts you’ve all shared on the forums :slightly_smiling_face: cc @openside @Bill.French @Jeremy_Oglesby Thank you!
Hi, I’m using Filter By Formula to find records based on Last Modified Date; As per Codepen Airtable URL encoder I get the following syntax; (IS_AFTER(%7BLast+Modified+Date%7D%2C+%222%2F23%2F2020%22)+%3E%3D+0) While syntactically this works fine, the results I get are not correct. I get dates before the given date too. Any suggestions? Regards, Ruchika
Hi, When I access a table-view through an API, fields that don’t have any values are not returned for that record in the API. Is this expected behavior? Regards, Ruchika
Hi Airtable Community! We just wrapped up our first challenge (stay tuned for the winners!) and can’t wait to see what you do with the next! For today’s challenge, we’d love to see how scripting block can help make one of our templates even better. From podcast editorial calendar management to home remodeling to Esports tournament planning, there are hundreds of templates in our gallery, and we have a hunch that at least a few of them could be even more powerful with a script! Things will work the same as last time: Choose a template from our template gallery and create a script for it! Bonus points if your script uses one of the new input methods we introduced today. (Need a refresher on what those do? See this post.) You’ll need access to the scripting block beta to participate. You can request access here (The scripting block is now available!) (if you haven’t already). If you don’t want to create your own script but have a great idea, reply to this thread and post it as a request.
I have a patch operation for ~4000 rows of data that enriches airtable data with data from an external source. I minority of rows (233) are raising a 422 permission denied error. The actual error message is: {“error”:{“type”:“INVALID_PERMISSIONS”,“message”:“You are not permitted to perform this operation”}} When I look at the payload of the patch, I don’t see anything exceptional or strange compared to the rows that patch successfully. So I examine the airtable rows that are being patched, and don’t see anything exceptional there either when comparing the success vs failure rows. Does this ring a bell with anyone else? Anything I should look for to fix the bug? I’m out of ideas.
Even the initial template of the hello world isn’t working for me now. The input field displays, but it doesn’t return after hitting ‘Next’, the await input.textAsync() doesn’t ever return.
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.