Need development and API help? Ask your questions here!
Recently active
Hello! The API seems to not return the profilePicUrl on the Collaborator field, even doe the collaborator has a profile picture. Does anyone have the same problem?
I’m a developer and plan on writing A LOT of different scripts. Let’s say I create a script that sums the values of a column. I plan on using this script (function) in multiple scripts. Is there a way I can essentially call this script in separate scripts instead of having to copy and paste code all the time? In other words, can I create global functions? Can I call a script in another script? The same concept applies to global variables. My script will use the name of one of my columns. But if I change the column name, my script won’t work. I have to manually edit the script and change the column name. Global variables, or at least global to the table (doesn’t have to be the entire base), would enable the script to update automatically.
I’m not a programmer, I’m trying to update a record based on the conditions selected. I’m battling to understand the ‘await’ function. I believe it’s a promise and that it splits the code until the conditions are fulfilled? I kept getting an error if I put the await inside the if conditions. I’ve re-written this a few hundred times and tried looking up what other people have done and now I’m throwing in the towel. Below is the full script, any guidance would be hugely appreciated. // Change this name to use a different table let table = base.getTable("Game Tracker"); // Prompt the user to pick a record // If this script is run from a button field, this will use the button's record instead. let record = await input.recordAsync('Select a record to use', table); let seats = record.getCellValue("Employees"); let segmentSize; await table.updateRecordAsync(record, {"Segment": segmentSize}) if(seats) { if(seats > 300) { segmentSize = "Enterprise"; } else if (sea
I am attempting to write multiple linked field values to a sigle new record. When I invoke the createRecordAsync method on the table, more than ten records (all with the same cell values) get written to the table. When I define the function as Async and use an await, no records end up getting created. Code snippets below. let operatorNamesField=tableOperators.getFieldByNameIfExists('Operator Names'); let operatorNamesRecord=useRecords(tableOperators, operatorNamesField); let operatorNameOptions=operatorNamesRecord.map(operatorNamesRecord=>({ label: operatorNamesRecord.getCellValueAsString(operatorNamesField), value: operatorNamesRecord.id })); //note: all of the select field options are formatted as above, but not shown for brevity <Select value={machineId} options={machineNameOptions} onChange={setMachineId} /> <Select
Hello, Is any of you guys familiar with the new native script url to attachement ? It is looking pretty good, working really smoothly. But it seems to have a cache issue : the image captured is the same throughout the day. Do you know how long the cache is preventing a fresh image to be attached ? Does anyone knows how to edit the script in order to have a fresh new image everytime ? Thanksfor your help. Hereafter the script code : let settings = input.config({ title: "Convert URLs to attachments", description: `This script will download all attachments from a URL into an attachment field. The source field can be a URL field or any text field containing a URL. Each cell should only contain a single URL.`, items: [ input.config.table("table", { label: "Table" }), input.config.field("urlField", { parentTable: "table", label: "URL field", }), input.config.field("attachmentField", { parentTable: "table", label: "Attachment field",
Is it possible to access a base outside of a base in which an app is installed? That is, if my application is integrated in one base, can it use something similar to the useBase hook on outside bases to which I have access?
hello, i am fetching data from table and prefer to filter them before displaying, to do like operator WHERE in SQL, how can i do this with airtable?
Hi I need your help today. I would like write a script to update à LinkToFild with multiple Record Links. I write this script but “await tableLudique.updateRecordAsync” doesn’t work. Can you help me ? let inputConfig = input.config(); let rentedgames = inputConfig.listingrent; let proposedgames = inputConfig.listingpropose; let tableLudique = base.getTable("Profil Ludique"); let recordsPulpo = await base.getTable("Liste jeux de PulpoLudo").selectRecordsAsync(); let record = inputConfig.record; console.log(proposedgames); console.log(rentedgames); for (let rentedgame of rentedgames) { for (let proposedgame of proposedgames) { if (proposedgame == recordsPulpo.getRecord(rentedgame).getCellValue("Référence")[0].id) { proposedgames.splice(proposedgames.indexOf(proposedgame), 1); }; }; }; console.log(proposedgames); console.log(rentedgames); await tableLudique.updateRecordAsync(record, { "liste des jeux à proposer": proposedgames, }); Thanks for
I created a table that has cells with email templates I want to send. The email templates in specific cells have tags that reference specific records I have chosen. I am trying to pass the email templates to an If Then statement in a script but the output it puts is with the tags instead of the record information. Below you can see the script, followed by the output, followed by the output I want. Do you have any idea how to fix this? SCRIPT // Change this name to use a different table let deals = base.getTable(“Deals”); let templates = base.getTable(“Templates”); // Prompt the user to pick a record from deals then from templates // If this script is run from a button field, this will use the button’s record instead. output.text(“Templates matched with Records”) let record = await input.recordAsync(‘Select a record to use’, deals); let temp = await input.recordAsync(‘Select a template to use’, templates); // You can use temp.getCellValue("Field name") to access the template var select
Hi, I am currently connecting to airtable data via the API. I am able to sort my response in certain fields using desc and asc. However for non text fields in particular single select fields where in the UI you would sort First-Last. What would the parameter be for sorting these fields?
Part of my custom APP takes a number of different user inputs from a UI, and writes some of the resultant information as a new record in a table. In particular I want to do the following: Write a string value to a linked field in an existing table The string value to be passed is already guaranteed to exist as one of the linked options (since the user selected from a Select menu which is in turn populated from the table. *There are some other fields which need to be written as part of this record. The code looks something like the following. `` let machineNameField=tableTasksByMachineNumber.getFieldByNameIfExists(‘Machine Name’); let machineNamesRecord=useRecords(tableTasksByMachineNumber,machineNameField); let machineNamesList=machineNamesRecord.map(record=> {return(record.getCellValueAsString(machineNameField))}); let machineNamesListFormatted=machineNamesList.map(x=>{return({label: x, value:x})});` Machine Selection <Select
Hi, I am currently struggling with a script which runs in the scripting block but not within an automation. I have the following error while testing : However, it seems like I am respecting the restrictions given on the Airtable support site, so I don’t understand the problem. (I can share my code, if necessary)
I’m developing an API on Node.js + express on Heroku, and every time I fetch anything with POST, I get a 400 Bad request error. Postman requests to the same endpoint work perfectly. So the only hypothesis I have is that I need a ‘Host’ header in my Airtable request (when I remove the ‘Host’ header in Postman. I get the same 400 Bad request error), but I don’t know what this ‘Host’ header should be. To reproduce: Create a simple Node.js+express app on Heroku where you return the same body as you get: app.post('/', (request, response) => { response.status(200).send(request.body); }) Create Airtable automation with fetch (or an app with remoteFetchAsync): let response = await fetch('https://....herokuapp.com/api/', { method: 'POST', body: JSON.stringify('Hello World!'), headers: { 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json'
Hi. I’m writing a python script to go into the database and retrieve data matching specified times that things have happened. So for example, event_a happened July 15, 16, 18, 21, 22 and 23 at 1500 each day. I was wondering if there was a way, using the python api, to have it only search as far back as, say, July 19th. One week ago. I know that the get_all, search, and get_iter functions all take a max_records argument, but that isn’t what I was looking for. I’m not saying only look for the first 100 matches. I’m saying only look back in time a week. Does anyone know how I could go about doing that? Thank you in advance.
I’m using Keyboard Maestro to build a script to update a record based on user input. The user will input the customer’s record ID, info to update and the script will be built like so: curl -v -X PATCH https://api.airtable.com/v0/xxxxxxxx/Students%2C%20Parents%2C%20Prospectives \ -H "Authorization: Bearer xxxxxxxx" \ -H "Content-Type: application/json" \ --data '{ "records": [ { "id": "'$KMVAR_ATRecordID'", "fields": { "Status": "'$KMVAR_Status'", "Lesson Day": [ "'$KMVAR_Lesson_Day'" ], "Teacher": [ "'$KMVAR_Teacher'" ], "Instrument": [ "'$KMVAR_Instrument'" ] } } ] }' This fails, with the API saying that “You must provide an array of up to 10 record objects, each with an “id” ID field and a “fields” object for cell values”. However, if I remove the “Teacher” line the script works correctly: curl -v -X PATCH https://api.airtable.com/v0/xxxxxxxx/Students%2C%20Parents%2C%20Prospectives \ -H "Authorization: Bearer xxxxxxxx" \ -H "Content
How do I get all unique values in a given column using the API. I can see the list of these values in the API docs but no query on how to get them?
Hello Everyone, I am looking for a script that solves a basic problem. I am running a cleaning service, and certain jobs(like glass cleaning, vacuuming, bathroom care) need to be done regularly on certain days of the week (for instance the fridge needs a once a week Fri clean). I filter out jobs based on the room and attach QR codes on the walls that will only show the active jobs in the room that day of the week. This way, I give my workers a set jobs and no one gets overwhelmed. I’ve made my workspace simple (at least to me). I have three tables (jobs, people, building/room) and I have fields with in the jobs that specifies the day of week I want it cleaned. I want the day of week (multiple select) to turn job status to active on the appropriate day. On the not appropriate day, I want the jobs go to inactive. There’s more work to do on the project than this, but this is a good benchmark. If any of you think you can help me let me know.
I’m using a base to record survey answers. The questions are constructed in a way that all answers are Yes/No. I’m using a single select field for the answers and I want two fields that will provide the total number of “Yes” answers and the total number “No” answers for each record. I realize I can create two additional fields for every question that will store numeric values for each answer choice and then use two SUM fields to provide a total for each type of answer, however this will result in two additional fields for every question. I’m hoping someone has an idea for a more elegant solution; most likely involving a script.
Is anyone seeing any errors for Integromat scenarios which are querying Airtable? Getting “Operation Timed Out” errors across multiple scenarios and accounts. Ruchika
Hi there, I hope you are great! (I am not sure if this is the right category to post my topic but please feel free to suggest any changes.) When I try to get data from the HTTPS API, it gives me a certain amount of records & an offset value if I want to get the rest of them. I have a database of 3800+ records, and repeatedly using offsets for more data might kind of slow down my app. Is there any way that I could retrieve as many records as I have, without worrying about offsets/page limits? Could it be a query parameter I should add? So it just gives me all the 3800+ records at once… Here’s the API URL I am using to get my data from (I am trying to get all values of a single field like Name) api.airtable.com/v0/Base_ID/Table_Name?api_key=API_Key&fields[]=Name Any help is appreciated! Thanks a lot!
Hi - I think I need a scripting app to solve my problem, but I’m new to Airtable scripting and so am reaching out for help. I have a table that I’m populating every day, but I want a 2nd grid/view with only the latest record showing. So I wanted to use a ‘latestrecord’ checkbox column, and use a script that would fire on a create record trigger to basically reset the checkbox on every row, and then only set it for that latest record that was just inserted. My 2nd view would be filtered on this checkbox - which would then be used in a combination of charts (on all content) and summary apps (just on the latest record) in a dashboard. I’m struggling with the scripting syntax, and so just felt it would be easier to stand on the shoulders of giants, and ask the community! Many thanks in advance, Dave. Note: I’m struggling with even reset all the checkboxes - the following code runs but just doesn’t seem to work (resetting/clearing all of the ‘LatestRecord?’ checkbox columns to be blank/un
I want to create a very simple script. What I want it to do is to call a URL (the URL being called activates a sync between Airtable > Shopify. What is the code to call a URL?
I’ve done a ton of searching and can’t find any answer to the possibility of using an Array (list) in one field of a base as a search input for another field. I do not want to ARRAYJOIN(values) as I am not searching for the total string, I want to take an input SEARCH list of any values, and search each list item independently within another field. I’ve built a complex Theater scheduling base where there are company members, teams which contain company members, staffing which is a member, availability of each member, and junction tabled them to fit into a scheduling table that is connected to a Show table (date,title) My goal is to be able to compare the list of members on a team against their individual availability. Is it even possible to search each item independently (Team Member) that is within an ARRAY/List (Team) within another field that also contains ARRAY data (Member Availability)? I’m assuming this will need scripting to take the input search list then go one after the oth
Hi all! I’ve been working on utilizing scripting within automations for a project. When a record in a table “MPList” is updated, I want to see if that record’s sort name matches any sort names in another table “memList”. If there is a match, I want the trigger record (from MPList) to be updated. I’m attaching my code below, and I think that one issue I’m running into may be with the input.config() process. The “toMatch” string in the test output window displays the ID, Name, and color for the text field it was pulled from. So, I’m not sure whether the Name of toMatch is correctly being tested for equality with the “Sort Name” field from the other sheet on line 9. let toMatch = input.config().toMatch; let mpList = base.getTable("Imported"); let memList = base.getTable("Members"); let query = await memList.selectRecordsAsync(); let result = false; let member = false; for (let record of query.records) { if (record.getCellValue("Sort Name") == toMatch) { await mpList.updateRec
Hello! I have two tables: visualSKU and visualSKUTypes. Column “type” in visualSKU linked to visualSKUTypes. How can I get full query of linked table? Instead of record id in “type” I want to get full data of visualSKUTypes:
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.