Need development and API help? Ask your questions here!
Recently active
Is there a way to make createRecordsAsync create a new value when it is not present in a single select field? await table.createRecordsAsync([ { fields: { 'Print Name': prnt.name, 'Printer': { name: prnt.printer }, }, } In this example, I have two fields: ‘Print Name’ is a text field and ‘Printer’ is a single select. Is there a way to pass a value to Printer that isn’t already in the base? This happens on the GUI side if you’re copying and pasting values. I’m wondering if you can do it inside a script.
Hi, my code is working locally just fine but not on the server. The code’s purpose is to create a new record is created in Airtable. When I push this code to IBM Cloud Functions, which is equivalent to AWS Lambda if folks are more familiar with AWS, the code seems to finish before Airtable’s “create record in base” function executes. A little about the code: it’s an analytics function. It will take a search term, like “dog food”, figure out all of the products tied to that search (say there are 64 products) and for each of those 64 return five different scenarios based on whether our main Airtable has that data: relevant result (in this case, 50% or 32 relevant results) not found in database (in this case 28% or 18 not found) found, but missing country (in this case 8% or 5 missing country) found, but missing manufacturer (in this case 14% or 9 missing manufacturer) edge case (in this case 0% or 0 edge cases) All code samples are below. The code is two pieces, one is a “createRecor
I am wrote code (below) inside a Twilio function which utilizes the Airtable API which first looks up a record in specific table (“clients”) in an Airtable base. It then pulls field data from that record (using record.get), and then using JSON in the “Callback”, enables me to utilize that field data later on in my Studio flow. It works perfectly. What I’m trying to figure out now is how to reverse that procedure. I’d like, once again, to first find the Airtable record. But then, instead of using “record.get” to pull field data in; I would like to write/update fields back into that Airtable record. In other words, after the line that reads: “if (record.get(“Client_ID”) === clientnumber)” instead of the two record.get commands that pull data from the fields, what would the code be to write data (say just a literal string) back to those two fields? Thanks in advance for any help you might provide! My Function Code to Fetch Airtable Data Into My Studio Flow const airtable = require(“airt
Hi there, I hope someone can help me :slightly_smiling_face: I have been using page designer to create invoices, but want to automate the process a bit more. Page designer has a built-in line-items functionality and I’m trying to build the same, but the document gets created in Google Docs. I’ve tried a lot using Zapier, but wanted to reach out to you guys for any suggestions. I know of Documint, Formstack etc., but find these options wayyyy too expensive. Thanks & Cheers!
I’ve written an automation script that I’d like to migrate over to the scripting app. I know that there are some differences between the two, but I’m having a lot more trouble than I thought. The script connects to an external API and pulls data from the API into my base. I seem to be running into issues with the async functions I’ve written to connect to the API and pull the data in. The code works when it’s not wrapped up in a function, but fails when it looks like the example below: async function testFunction(){ let response = await fetch('https://api.github.com/orgs/Airtable'); console.log(await response.json()); } testFunction(); This code above works as an automation script, but not in the scripting app.
Is the fact that the Scripting app linter recognizes this method a bug, or a sign of things to come? The capital B seems to imply React shenanigans. I know there have been calls for table creation to be added to the app, but I didn’t think it would actually happen. I still don’t, but I guess that’s one way to place it behind a paywall in style come September (assuming Airtable actually comes through with it this time around lol). Either way, I’m afraid that trying to run this yields a full stack’s worth of a debugging mess instead of a new table: Edit: or have I just broken the app by running it on an iOS version of Safari? :grinning_face_with_sweat:
Hi, would it be possible to define a custom formula? For instance I want to make one that generates a UUID that can be used across a variety of platforms. Thanks in advance
Hey all, I am attempting to use the Javascript API to get records in a Node.js server from a base with 10,000+ records. I have used the offset parameter in the past with CURL but am not getting an offset when my query returns. Here is the query at the moment: const results = await productsBase('Products').select({ filterByFormula: `OR(FIND("${BRAND}",{BRAND}),FIND("${PRODUCT}",{PRODUCT}))`, maxRecords: maxRecords, }) return await results.all() Thanks in advance!
Hi I’m playing around with scripting (not a programmer) and I’ve run into a situation where I can’t update assign the collaborator object. I’ve modified my code to represent what I’m looking for Collaborator is the collaborator field on my base. I’m trying to assign a collaborator (through a previous function) named ‘assignCollaborator’ await table.updateRecordAsync(record, { "Collaborator": { "name": assignCollaborator} }) The errors I’m getting say that the fields don’t exist but I can create references like this let collabName = record.getCellValue("Collaborator").name Some explanation here would be super helpful. Thank you
Does anyone have any tips for creating multi-line tooltips in Custom Apps? My tool tip is a long sentence and it doesn’t appear at all if the window is too small. I’m trying to add new line characters and also tried the following which isn’t doing the trick. <Tooltip content={() => {return <Text>"LONG TOOLTIP TEXT HERE"</Text>}} placementX={Tooltip.placements.RIGHT} placementY={Tooltip.placements.CENTER} >
Hey everyone,I’m trying to send out an email using automations, but I can’t figure out how to do it correctly….I have a USERS table with USER_EMAIL along with DAYS_TENURE (how long they’ve been signed up)I have a PROGRAMMING table with a DAY_ID column, and a few additional columns with relevant data. For each user, I want to find their DAYS_TENURE value, then find the records in the PROGRAMMING table with the matching value in the DAY_ID column, and email them the 3 additional columns from the PROGRAMMING table. I think I need to use scripting to do this, but I’m running into issues. I’m more of a SQL and python person, so there’s something I’m missing for javascript… In my code, I’m trying to do a nested for loop…the outer loop loops through each unique DAY_ID from the PROGRAMMING table, and the inner for loop adds the users from the USER table to a javascript object if their DAYS_TENURE matches the DAY_ID. For the sake of simplicity, let’s say I have DAY_ID values of 1, 2….and for DA
I’m trying to import data from an API. I’m able to authenticate via my terminal, but I’m trying to write a script to automate that process (the access token is only good for 24 hours, so they recommend refreshing the authentication before every request or once per day). As I understand it, fetch() is the way to do an HTTP POST. I’ve written a function to do this, and I keep getting a 401 Unauthorized error. It looks like nothing after the url is getting passed on. I’m sure this is some kind of syntax error on my part, but I’m not familiar enough with JavaScript or API’s to know what it is. Any help would be appreciated. Code is below: async function authenticate() { let authentication = await fetch(authenticate_url, { method: 'POST', header: 'content-type: application/x-www-form-urlencoded', data: `grant_type=refresh_token&client_id=${clientID}&client_secret=${client_secret}&refresh_token=${refresh_token}&username=${username}&password=$
Hi all, I came up with the following design for the internal BI system. The first table is used to store the payments. (Payments table) I also need to calculate the monthly sales statistics for each sales representative along with their quota (a predefined value that differed from month to month and added manually each time) For that purpose, I have an additional table. (AM table) The combination of (sales_rep, month, year) creates the unique id for the AM table and the linkage between two tables works very smoothly. However, I believe there is room for improvement since I have to Link unique-id-am field to AM Quota manually every time. I just drag the cell to AM Quota as you usually do when copying the column. I want to automate this process and write a script that will perform this action for me in the add new row event. I thought of doing something like that, but obviously AM Quota doesn’t allow me to do that due to the conflicts of type. let table = base.getTable("Payments"); le
Hi. I want my formulae field ot be able to call a script I made. Is that possible and how? app is called times10 function times10(x) { output = x * 10 } I would then call it using the formula field. =times10(5) which would print out 50.
It’s Aug 2021. I read the posts from 2020. No help. Just starting here. Trying to do Hello World App., But on OSX Catalina (10.15.7), Blocks will not install. I tried the suggestion from 2020: “npm install -g @airtable/blocks-cli@0.0.52” Either way, lots of warnings about “Please upgrade to version 7” and then failure: npm ERR! code ENOENT npm ERR! syscall chmod npm ERR! path /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/loose-envify/cli.js npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/loose-envify/cli.js’ npm ERR! enoent This is related to npm not being able to find a file. It would be great to get off step one. Thanks in advance.
Hello, I’m looking for an API or automation to remove sharing from all collaborators of a workspace with a single click. Thanks.
Hi, I’m new to scripting in Airtable and scripting in general :slightly_smiling_face: I’m having trouble getting started and was hoping someone can point me in the right direction. I’m trying to build a script where for each new record in a table (“User_Answers”), I would like to score it against all records in a different table (“Company_Answers”). User_Anwers looks like this: User ID | Answer 1 | Answer 2 | Answer 3 1 | True. | True. | False 2. | False. | False. | False Company_Answers looks like this: Company ID | Answer 1 | Answer 2 | Answer 3 1 | True. | True. | False 2. | False. | False. | False What I’m struggling with at the moment, is the basics and I can’t seem to find the answer in the documentation. How do I get the value of a cell into a variable? (For example, the value of answer 2 of user 2.) How can I set a variable with an array with all the field names in a tabl
This category is for developers to discuss building custom extensions and connect with each other. If you’re looking to get access to the developer platform in order to build custom apps, fill out this form. and you’ll be granted immediate access. And Apps are the new Blocks! Read more about our announcement here. Share what you’re building, and learn more about what other people are building! You’ll occasionally see Airtable developers hanging out here to provide support.
Hello, I am attempting to update a record with an attachment via scripting automation and it appears that the attachment is getting uploaded properly but immediately deleted automatically. Screenshot: Was wondering if anyone might know why this is happening. Is the upload URL improperly formatted? I have done projects similar to this before but this is the first time I have run into this issue. Thank you for the help.
Greetings, folks: All I want is to create the next record: let nuevoRegistro = { 'ALUMNOS': [{ "id": regAlumno.id }], 'ANHO': [{ "id": registroAnho.id }], 'CENTRO': [{ "id": registroCentro.id }], 'isAlta': { name: "Yes" }, 'CLASE': { name: clase }, 'CURSO': [{ "id": regCurso.id }], }; With the following function: let crearRegistros = async function (tabla, nuevoReg) { return await tabla.createRecordAsync(nuevoReg); } And what do I get when I run this? await crearRegistros(tabla, nuevoRegistro); U: Validate this value before parsing I couldn´t find any info about scripting errors. I hope someone did and would like to share what I’m doing wrong. Thanks!
Hello! I’m trying to build a linked record editor. I’ve discovered that Airtable’s own grid component (the same layout as the Grid view type) isn’t available to use in the UI kit. Is there any way to embed Airtable’s grid component in the app? Thanks!
Hi, If I have a column with the field type “URI” it doesn’t actually check that the inputted data is a valid URL. Is there a way for me to define a custom field type with the API/Apps. The ideal situation would be a custom field type that is validated by Regex. Thanks in advance (:
Hi all. We have a custom-app in which its returned some data. We would want to bind this flow, so, when user selects something at the custom-app, the referred record(s) are picked at the table. We tried a lot of ways with no success. Custom-app data comes from an i-frame. We are able to have the records array but we still are not able to pick records as it is shown in the screenshot. Thanks in advance
I’ve got a script that chunks through API requests out to a 3rd party, and instead of outputting a ton of status text, I thought it would be a great UX if they could see the progress of those requests and be able to stop them early, all in the same button. Is this possible to update an input button’s label after it has been sent to the UI? If that isn’t possible, is it possible to update an output string similarly? I’ve tried a few things that might have worked normally outside of airtable, but haven’t had much luck as most of these communication objects don’t return themselves to be overridden later. Would be happy to hear any weird ways this can be accomplished as well (another table in the base that contains the value, etc). It doesn’t have to be elegant, just has to be update-able haha
We’d like to create an outbound notification by sending (http POST) a message to a 3rd party API endpoint on certain events. We are looking to use the built-in triggering and scripting features of Airtable. Has anyone tried to do something similar? Thanks!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.