Need development and API help? Ask your questions here!
Recently active
Hi everyone. We all know the script in the airtable scripting examples to create a running total. The script below is as such: // change these names to pick a view: let table = base.getTable('Marketing'); let view = table.getView('Grid view'); let result = await view.selectRecordsAsync(); let runningTotal = 0; for (let record of result.records) { // change the field names here to adapt this script to your base runningTotal += record.getCellValue('Amount'); await table.updateRecordAsync(record, { 'Running Total': runningTotal, }); } The issue with the script is that it takes the running total from the previous row and adds the number of the current row to create the running total for the current row. I was wondering if there was a way to filter based on linked records. That is: for the current record, you only add the current number to the sum of running totals of linked records. Would anyone know how to do this?
Trying to make a post request to Notion to create a new page. Receiving an Error 400 Bad Request and can’t find the issue. Here’s the documentation - Create a page and script below let payload = { 'parent': { "type": "page_id", "page_id": "my page id" }, 'properties': { "Name": { "type": "title", "title": [{ "type": "text", "text": { "content": "My Page Title" } }] } } }; let response = await remoteFetchAsync(postUrl, { method: 'POST', body: JSON.stringify(payload), headers: { 'Notion-Version': '2022-06-28', 'Content-Type': 'application/json', 'Authorization': `Bearer ${apiKey}`, }, }); output.text('**POST RESPONSE**' + ' - ' + response.status)
Hello everyone! I am looking for help in regards to either; A script that triggers a button, or A script that can trigger the equivalent of “Open in Page Designer” action in the button dialogue. Also, is there a way to disable the sidebar popup that appears after a script is used? Any help or leads appreciated, thanks all!
I am trying to create a field which links a table to itself: //Now that the table has been created add the linked field var newFamily = base.getTable( familyName ); var linkOptions = { linkedTableId: newFamily.id, prefersSingleRecordLink: true, isReversed: false, }; await newFamily.createFieldAsync( ‘SpouseLink’, ‘multipleRecordLinks’, linkOptions ); I am getting an error: j: Can’t create field: invalid field config. Failed schema validation: prefersSingleRecordLink is not included in the .options schema, isReversed is not included in the .options schema I am confused because I have include those fields in the schema …
Good-natured vent: it seems like most of the issues I research in this community are closed/auto-resolved despite no clear solution. Case in point: there is a years-long issue with node version controls interfering with blocks-cli install. If anyone is interested, after hours of research, I found this link to be the only solution that helped me: TecAdmin – 24 Nov 20 How To Install NVM on macOS with Homebrew The NVM (Node Version Manager) is a shell script used for installing and managing Node.js on a Linux-based system. The macOS users can install NVM using the homebrew. This tutorial helps you to install NVM on your macOS system and manage Node.js... Est. reading time: 2 minutes
Hello! I am using the covert url to attachments extension and I’d like to run it every time I do an upload via csv, but only have it go through the newly uploaded records. Right now it does give the option to skip fields that already have attachments in them which is nice, but I have about 30,000 records and a decent amount of them don’t have urls to convert in the first place so it takes a while. Is there a way to only run a script based off a view or conditions? I’m not familiar with JavaScript, but I feel like there should be a way. I’ve attached a screenshot of the extension script, any help is appreciated - thank you!
Hello, I’m trying to develop a custom extension, but I’m facing an issue. I’ve defined a button associated with action “Open Custom Extension” that points to my custom extension. However in both case, I’m unable to retrieve the recordId of the line of the clicked button: When extension panel is closed When extension panel is opened I’m trying to retrieve the “selectedRecordIds” but upon a button click, it remains empty… Is it possible to retrieve this? Is it possible for the custom extension, that the source event is a click on a button? Thanks, Raphael
I have a list of “Jobs” in Airtable, and a corresponding list of Files in a NAS drive, which have the “Job number” field from Airtable in their filename. So it’s easily filterable by just looking for files with that “Job number” in their filename. I would like to attach a script to a button that would automate that process. Basically, filter and download the files from the NAS when the user clicks the button. Is there someone who can point me in the right direction here?
10 extensions per base on the Pro plan! Do you really think 10 is enough for each base? I can unlimited things but when it comes to make them readable understandable with extensions Dashboard I have limit even in Pro Plan. Enterprise edition is not a solution because we don’t need to be an enterprise to summarize our base data. What does the community think about this? Regards and thanks,
Hi forum! Can anyone from the community let me know if their Airtable integration was reviewed after submitting it? We’re getting radio silence recently – just want to understand the timelines so we can plan our developer resources for this quarter. Our timeline so far: April 17: Submitted an app May 9: emailed marketplace-submissions@airtable.com asking for an update May 12: got an email from Albrey asking for changes to the integration May 16: made the changes, resubmitted, emailed to confirm changes were made June 6: emailed asking if there was an update June 16: emailed asking if there was an update June 27: emailed asking if there was an update Airtable Blocks SDK talks about a 2 week turnaround time, but it’s now been almost two months since we last heard from Airtable. Once an integration is approved, is there a similarly long turnaround time for any changes to the integration? I’d hate to be telling a customer that it’ll take 2+ months to respond to bug reports. :frowning:
Hi, I am developing an MS Teams bot using Node.js and Airtable REST API, the bot fetches the information from Airtable and sends it to the MS team’s bot. I’m facing a problem when sending the video attachments. This is the code that I use to fetch the attachment record: const records = await base(table_name).select({ view: "Grid view", }).all( ); records.forEach(async function (record) { files= record.get("Attachments") //Attachments is the field name console.log(files) const reply = { type: ActivityTypes.Message }; reply.attachments = [await getInternetAttachment(files.url)]; turnContext.sendActivity(reply) }) [ { id: 'attAm7ezFldMnS7uC', url: file_url, filename: 'SampleVideo_1280x720_10mb.mp4', size: 10498677, type: 'video/mp4' } ] When I redirect to the output URL, the video doesn’t load which causes issues in sending the video files to the bot. Is this how the a
Hi everyone, Is it possible to create and sign JWT inside Airtable Scripting? It is an authorization step required for making API calls. Thanks.
I would really appreciate if someone could help me with the following script: I have a table called VARIABLES with certain costs {variable_name} and the possibility to assign to a cost concept different groups of assets {variable_groups} Then I have a second table called ASSETS for entering assets, where I always assign one group to each asset being entered. And I finally have a third table called COSTS connected to ASSETS in a one asset_id to many cost_id relationship with a field called {Cost name} that Links to the field called {variable_name} in VARIABLES. I need a script to be triggered when a new record is entered in ASSETS that: Reads the group to which this asset belongs {Group}, Checks in VARIABLES what costs {variable_name} have this group assigned in {variable_groups} Creates in COSTS one record for each {variable_name} that has this {Group} assigned. In the example for {Group}= “Vehicles”, we can see how it creates 6 records in COSTS connected to the asset_id just ent
Have anyone tried this script yet? When I run it with Map address field populated by lat, long in degrees separated by comma (exactly how I use same for other maps), the script adds some attachment to every record but them removes it. In the end of the day, the attachment field instead of having pictures remains empty for every record. Any ideas?
Hi! I’m attempting at the moment to automate a flights table so passengers know where they’re flying to and when, etc etc. I’m having a huge issue with the linked fields! Here is the current table design; (confusingly, ‘Name’ here is in reference to flight name, but the principle will be exactly the same as extracting the Confirmation) Where ‘Confirmation’ is a six digit flight confirmation number (PNR number), coming from the ‘Confirmations’ table. For some reason, whenever I attempt to populate that field with my script, with a linked record from Confirmations, it shouts at me telling me the linked record ID does not exist! A dumbed down version of my code is below, it’s not too dissimilar to what is being done in this forum post (Adapting script to paste into linked field). The record is being created just fine, but the update with the value from the linked field is where things go wrong. I am a huge airtable newbie and am a bit lost! // Read table info let flightsTable = base.get
Hello, the airtable documentation shows that to sort a query using selectRecordsAsync you should do it as follows: let queryResult = await table.selectRecordsAsync({ sorts: [ // sort by "Description" in ascending order {field: "Description"}, // then by "Priority" in descending order. {field: "Priority", direction: "desc"}, ] }); but this is apparently deprecated. How can I do it with the current codebase?
Howdy, I have a database that deals with inventory for serialized items. For each item, I need to know when they have been found to be in-stock. Here’s what my setup looks like today: Records are items uniquely identified by a serial number One link-to field is Inv_Seen In which collects values each month that that item has been present for. As an example, one record will have been “Seen In: 2022-06” which means it was seen in June 2022. I manually type “2022-06” for each item. This setup is working fine, but requires a lot of typing the same exact thing over and over again Here’s my “dream” setup that I’d like help writing a script to achieve: Records are uniquely identified by a serial number One link-to field is Inv_Seen In and collects values… BUT… …There is ALSO a button field called Inv_In Stock? whose action is “Run Script”. That script will populate Inv_Seen In with “2022-06” (or whatever the month currently is. I am a-okay hardcoding the month value in the script.) for jus
Our Jobs & Projects are identical in structure with regards Airtable views. I create a section view with 4 / 5 separate views all predefined. When a new job comes up, I create a new section, then duplicate each view, then rename each view, then alter each filter according to the job number. Request: In addition to “Duplicate View”, can we have a “Duplicate Section and all views in it” please? Thanks in advance.
Hi Everyone! I’m trying to set a 5-10 seconds delay for an automation. I’ve checked this post : https://community.airtable.com/t/i-need-a-delay-method-settimeout-is-undefined-not-found-window/28125 And I’ve tried the following script: function timeout(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } await timeout(50000)//waits 5 seconds The editor gives an error and my automation can’t complete. Do you have any clue of how I can (A) fix this issue or (B) set a delay in a different way ? Regards,
Hi all, I pulled JSON data through an API that looks like this: {'odata.metadata': 'https://opendata.cbs.nl/ODataApi/OData/80416ned/$metadata#Cbs.OData.WebAPI.UntypedDataSet', 'value': [{'ID': 0, 'Perioden': '20060101', 'BenzineEuro95_1': ' 1.325', 'Diesel_2': ' 1.003', 'Lpg_3': ' 0.543'}, {'ID': 1, 'Perioden': '20060102', 'BenzineEuro95_1': ' 1.328', 'Diesel_2': ' 1.007', 'Lpg_3': ' 0.542'}, I have created corresponding column names in my table. I have also read through the API docs and set up my Base ID / Table ID / API key. I managed to GET and POST requests into/from Airtable with dummy / hard coded data as presented in the API docs. I have tried to POST the JSON data into Airtable in different ways, which resorted in all the error messages you can think of :grinning_face_with_big_eyes: . So how do I structure the JSON data so that Airtable can interpret it? Look forward to hearing from you
Hello - I have a base that manages products for a website through Webflow. I have built and tested a tool that will import products from an XML source from the supplier that my client uses; however, for the product descriptions it gives the bullet list in an array (XML) that provides up to 24 bullets. I have them mapped and they sync to 24 distinct columns accurately, but now I’m having some trouble navigating how to get those 24 fields converted into a bullet list in the rich text field I have for the “Full Description” - while ignoring empty fields. Any support or insight would be greatly appreciated! Brian
Hi folks, I’m using filterByFormula param to filter records of a table but I’m able to select for a specific date. Below and example: request: https://api.airtable.com/v0/appFOOBAR/Spese?filterByFormula=AND({Importo}=111.22,{Data}='2022-04-01') response: { "records": [] } while with the request below I got a result: https://api.airtable.com/v0/appFOOBAR/Spese?filterByFormula=AND({Importo}=111.22,not({Data}='2022-04-01')) response: { "records": [ { "id": "recXXXX", "createdTime": "2022-05-24T09:38:50.000Z", "fields": { "Tipologia": "Spesa", "Data": "2022-04-01", "Importo": 111.22, "Name": "Prova 1" } } ] } so the example using not operator shows that there’s a record with Data=2022-04-01, I don’t understand why this record isn’t extracted using the first request.
I’m developing an app with airtable API and then there is a page that listed items and that item has 3 filter categories, so I want to make a filter function but each filter category must can count how many items can be filtered again example category 1: item 1(3) item 2(1) item 3(2) category 2: item 1(3) item 2(2) item 3(4) expected result filter: category 1 = item 1 category 2: item 1(2) item 2(1) I’m stuck on that case, so can anyone help me?
***I know this might be irrelevant here, But Somonoe might have gone through this Hi, I use Airtbale as my database on bubble.io. therefore I use the Airtable plugin to get data and display it in a repeating group list. However, the plugin only allows for CRUD operations. I want to filter the data. So I Wrote a script that fetches the data from Airtable API using Curl. All is good so far. I get the data I need, My problem is how can I display it in the reading group! Usually, I have the repeating group set up as follows: type of content: the table I’m getting the data from Data source: get Data from an external API → Airtable → Pick the table that matches the type of content. But since I’m fetching the API call. the script returns (using javascriptToBubble) a value list. I tried to use the options display list in RG and fed it the returned value. but it didn’t work. getting the error “Airtable plugin data load error: Could not find what you are looking for” I inspected the RG to get th
My question is essentially summed up in the title. If I have a python code saved down on my computer (or G-Drive), can I make an automation in Airtable that will run the python code? I would be using the Python Code because it already does what I need (runs a SQL script), and if I don’t need to learn how to do that in Javascript - then I won’t.
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.