Need development and API help? Ask your questions here!
Recently active
I’m using code found from this post and am struggling to figure out how to get past an error of “Error: Field “fldJl8IjqgJizFULv” cannot accept the provided value. at main on line 29” The goal: Separate a list of records into separate records to input into another table along with assigning fields of “Projects” and “Status” What I’ve tried: I’ve performed the script successfully with creating a record with the task name for each task, but when I try to define other fields I end up getting the error mentioned above. Here’s my code so far. Any help is appreciated! I’m so close to getting this, just need a bit of help to the finish line console.log(Hello, ${base.name}!); let inputConfig = input.config(); console.log(The value of ProjectType is ${inputConfig.ProjectType}); console.log(The value of ClientName is ${inputConfig.ClientName}); console.log(The value of TaskName is ${inputConfig.TaskName}); // pick tables from your base here let projects = base.getTable(‘Projects’); let tasks = b
We’re using a view to contain company distribution groups. When a user filters into view, I’d like to add the Active Directory user with that email address to a given M365 group. All I need to be able to do is grab the email address off of the selected record within the script > HTTP call. Is it possible to get the selected record (the record that filtered through and caused the automation to happen) so I can provide the email address off of it to my Power Automate flow?
I’m trying to create a basic badging award system for volunteers as they progress within an outreach program. And I’m wondering if I’ve finally reached the point where I need to learn JavaScript to do what I want in Airtable. The Basics: Match Log table contains all instances in which a volunteer signs up for a workshop. Using pivot table extension I can see each volunteer by row and a count of each workshop that a volunteer has led. The visualization is useful but I want to use the values stored in pivot table to trigger other actions e.g. assigning a badge if certain conditions are met. Doing it manually is a real pain. Would the below be a reasonable approach to writing a script? Is this achievable for a semi-savvy newb? Or should I look to hire a consultant? Loop through each volunteer Loop through each workshop, return count value Assess each value against condition(s) IF condition == True then create a link to Badge table I should also say I’ve posted the same question el
Hi all, I’ve read up in this forum on how to see the Field IDs for the fields in my table. However, I’m struggling with how to to actually use the API to reference those field IDs. Using Python, I’m able to grab the record through the API and convert the data to JSON. I then assign a field in the record to a variable: json_variable = json_data['fields']['Name'] However, after trying some different variations of this, I can’t seem to figure out how to access the field ‘Name’ just by using its field ID. Can anyone help with this? The motivation behind this is to avoid hard-coding Field Names so we can change them in Airtable without the program breaking. Thank you!
Hi there! I’m not a developer but I trying to write a script. Please tell me if is possible to use a variable to define the field name inside updateRecordAsync method. await table.updateRecordAsync(record, {"Phone": value}) the method accepts variables for “record” and for field “value” but I want to use a variable for “Phone” (without quote marks) like the example below: let fieldName = "Phone"; await table.updateRecordAsync(record, {fieldName: value}); I want to let users set up fieldName using input.config Please help. :pray:
I’m guessing the answer is no, but is it possible to add a new option to a Single-Select or Multi-Select field programmatically from a script? At first I tried to just brute force it - I tried to enter a string value for the Single-Select field via table.updateRecordAsync(). This is a way we can add new options via the main UI, although the UI presents a context menu for doing so. Next, I tried to see if I could push() a new value into table.getField("Single-Select Field").options.choices but the API returns the options as immutable, since it’s a get[***]() function: Any way to do this, or any plans to support it in the future?
Hi all, I’m new to scripting in Airtable and I got a bit confused about my error. I’m using two variables for the script projectID which is the ID of the project that is linked to the test record linkedIndicatorIDs which are the IDs of all the indicators that are linked to the test record When I run this script it gives an error “Error: Field XXX cannot accept the provided value.” for the project field although via the console.log I see that the correct projectID is being used. I don’t really understand why it doesn’t work for linking the project if it does work for the indicator (I tested succesfully the script without the project linking). let inputConfig = input.config(); let table = base.getTable('Progress General Indicator 🚫'); let indicators = inputConfig.linkedIndicatorIDs; let projectID = inputConfig.projectID; for (let indicator of indicators) { console.log(`Adding indicator ${indicator} to the new record.`); console.log(`Adding project ${projectID} to the new
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.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.