Need development and API help? Ask your questions here!
Recently active
Hi, I’ve been using Airtable for just over a month now and loving it, been able to create workflows that I’d have needed a whole dev team for before! Just brilliant. But now I’m straying into the world of scripting and feel a little lost, despite lots of reading, testing and trial and error. Think I need to do a course, but in the meantime I’d really appreciate some help. My base is all focused around event planning. For the challenge in question there are x3 tables: 1. Speakers - a list of speakers at an event 2. Sessions - a breakdown of the event sessions. Each session is a row, with speakers associated with each session listed in columns (Speaker 1, Speaker 2, Speaker 3, Speaker 4, Speaker 5) - and yes, I know this is not ideal and I can use a single field to reference multiple speakers, but this is how I’m supplied the data (in old school spreadsheets which constantly update), and yep, number of speakers varies per session! Speakers are linked to the Speakers table as linked recor
Hi there - We have a database with 8000+ records and have been creating a hash with them. It is crashing our automation and exceeding the limit. What are some tips to not exceed the limit?
Hi Team, I have created 1 view and 1 form within air table. As soon as i submit the form 1 row gets inserted in the view. Subsequently, The view is attached to Run Script which gives call to external REST API. Below are the fields displayed on the form. FYI. I have mentioned the fields type as well in the bracket. Field names: customer(Single Select),source category(Multiple Select) and source url(Long text) ,target category(Multiple Select),target url(Long text) and email(Single Line text) etc. Requirement: I would like to dynamically pre-filled the source category and target category fields based on the selection of the value of customer field. Could you please guide and point me to the example/link where i can get idea how this is possible to do in air table?
Hi, I want to get from a table all the records, filtered by one of the columns. For example: I have a field called “SKU”. There are many records in the table with the same SKU, different dimensions of the same products. I want to get, with CURL, all the records with SKU = 1000. How can I do that? Thanks!
Hi there - When I am testing my script, it is popping up and asking which record do I want to test. Will this always be the case or how can I have the variable passed from step 1 in the automation which is the record which is updated?
Hi there :slightly_smiling_face: I’m new to coding and Airtable and I need some assistance. My script is to update a record with user input. The issue I’m running into is in line 7. The script runs but I’m assuming it is this error that stops it from actually updating the cell. I understand the error but I’m just not sure how to remedy it. I’d also like to know how to output the new_date variable within the text output line above it.
Hello Community! I have the below script that will create X number of records based on the Episode Count, but I would like to tweak it to auto-number those episodes each time. For instance, Show 1 has 5 episodes, then each episode record would be numbered 1, 2, 3, 4, 5 //Tables let projects = base.getTable('Shows'); let episodes = base.getTable('Episodes'); //Record Input let record = await input.recordAsync('Please select a project', projects); //Record variables let quantity = record.getCellValue('Ep Count'); let order = record.id; //New record array let recArray = []; //Iterate by quantity if(quantity > 1){ for(let i=0; i < quantity; i++){ //Push to the array recArray.push({ fields: { 'Shows': [{id: order}], } }); } //Create new records await episodes.createRecordsAsync(recArray); } Any insight would be so incredible appreciated :pray: Thank you!
I have an automation that I need to count all records that meet a certain criteria. The number of records that meet this criteria exceeds 100, so the find records tool isn’t useful. There is a scripting block in the automation and I would like to count them there, but I’m not seeing an easy way to do this. I only need the step to return the count of records that meet the criteria, not the actual records themselves. Has anybody done something similar? Ideally I could make a view with the criteria filtered and then have the scripting step return the number of records in the view, but I don’t see any documentation for a function to fetch record count within a view in the API docs. Also don’t see a way to use selectRecordsAsync with an offset to capture all records that meet a criteria instead of just the 100 allowed by the function as it currently exists. Any thoughts?
Hi, I’m writing a program in Node.js using AIrtable API that fetches the record from Airtable and sends it to WhatsApp. The problem I’m facing is that for example, there are three columns COL1 | COL2 | COL3 I’m trying to achieve that if any of the columns are empty, it skips that one and moves on to the another. But when I execute col1 == null || col1 == undefined it returns false. This statement returns true only for the last column. Also when I execute col1.length it returns 1 but for the last column, it returns Cannot read properties of undefined (reading 'length') I don’t understand why the empty cells/ column before the last one doesn’t return undefined.
Hi, Professionals here, I encounter a problem, I want to use EmailJS service to send HTML emails. I try the automation of Airtable, the actions of “finding records” and “sending email”, but it is not as intelligent as I want, So I want to use EmailJS service. So I wrote the below code in Airtable script. let params = { service_id:'service_gbwx81a', template_id:'template_6euwe2d', user_id:'cxkTio1YLQSY241rj', template_params:{ to_name:"Stone", from_name:"Stone", reply_to:"Stone", message: "ABC", } } let headers = { "Content-Type": "application/json", }; let options = { method: 'POST', headers: headers, body:JSON.stringify(params), }; console.log(JSON.stringify(params)); let emailJSURL = 'https://api.emailjs.com/api/v1.0/email/send'; await doRemoteFetch(emailJSURL, "POST", params); async function doRemoteFetch(url, postOrGet, body = null) { let success = false let fetchedData = null let fetchOptions =
Hello, How do I pass function parameters as JSON field name for updating fields in Airtable using Airtable REST API and Node.js? The code const updateField = async (id, field_name, updateValue) => { base('table_name').update([ { "id": id, "fields": { field_name: updateValue } } ], function (err, records) { if (err) { console.error(err); return; } }); }
I am creating a proof of concept script which you can see below: const data = { title: 'AirTable Pusher', content: 'Push, push, push this.', excerpt: 'The short version' }; let response = await remoteFetchAsync('https://staging2.conveyancingqld.com/the_vision.php', { method: 'POST', body: JSON.stringify(data), headers: { 'Content-Type': 'application/json', 'Authorization' : 'Basic d2h5d29udHlvdWNvbm5lY3Q6Y2N1WSAxWWhkIDdsTmkgMzdWSSB5MVlyIDYySEs=' }, }); console.log(response); The return on the server side if you check at the time of this writing is: {“a”:1,“b”:2,“c”:3,“d”:4,“e”:5} It returns some JSON data - I want to access that in the AirTable script - however when I check the Console log response it says the following: {type: "basic", url: "https://staging2.conveyancingqld.com/the_vision.php", status: 200, statusText: "OK", ok: true…} type: "basic" url: "https://staging2.conveyancingqld.com/the_vision.php" status: 200 statusText: "OK" ok: true header
Hello, i am setting up a Google Apps Script to update some records from our student information system. I was able to set up an array of records in the required format for patching the data in Airtable, i also got it to work, however whenever there are more than 10 records i get an error, so i am trying to figure out the best way to process them 10 at a time using plain JS or Google App Script. I was thinking of implementing a for loop to send a patch request for every record, but that did not seem like the smart way to do it. I wondering what was the best way to break it down 10 at a time Thanks Anto
I tried to use input.buttonsASync but it’s impossible. I receive this error: “ERROR TypeError: input.buttonsASync is not a function at main on line 2” Can you help me?
Mi update with curl doesn’t work and i dont know where is the error Record id, url and key are corrects (they works with delete and create rows), but not with update. ¿Can someone help me? Thanks for your time!
Hello there, I’m having troubles to set up the “hello world” to develop a custom app. I’ve followed the guide as well as search for possible solutions without success. I’m using Chrome on Mac, “block run” is running with “https://localhost:9000” but both Airtable and Chrome are unable to access to localhost due CORS issue. I’ve tried to use chrome extensions to allow all origins but any luck. Tried to use a Proxy, no luck. I think the problem is in the Node server since if I try to reach localhost:9000 with Postman, I get the listing of Browser-sync and not the compiled React app source. Thanks for any heads-up
Today is my first foray into scripting with AirTable and i feel like the best method of learning how to script is to figure out a use of it that would be easy and useful. So i want to create a button that would copy certain fields and input them into a new row. For instance, my company manages affordable housing vouchers and we want to keep track of units that do not work out, but the voucher recipient (potential tenant) will still be searching for a new unit. Instead of rewriting over existing data, i wanted to make a button that would copy these fields: Participant Name Specialist Name Action Program URL NOTES and input them into a new row with an updated STATUS of “Back OTC”. So we know that this person previously attempted to move into a unit, but that unit didn’t work out, now they are OTC (on the clock) to go find a new unit. Does that make sense? i feel like making a button do this with a script should be a perfect way of getting my feet wet into scripting in general. I appreci
Hi there I’m new to automation scripting and would appreciate some help I start my app with a trigger when a record is added to a table. How can I use (reference) the fields from the trigger record in my script? Trigger return a record with the name of a city I want to query another table inside my script and find all the records with that city and then do some other calculations based on the records returned from the query. Please let me know how to do it, and if possible, where can I get some ‘more advanced’ examples
I have managed to create a get request (I’m 90% no code) and then info is coming back but how to then write it to a field?. let table = base.getTable("TARIC Code") let url = "https://www.trade-tariff.service.gov.uk/api/v2/commodities/"; let config = input.config(); let response = await fetch(url + config.commodityCode ); console.log(await response.json()) I want to take the result directly into a field to then sift through it for what I need.
Hello, Can someone help me to write a code to extract all the URLs associated with my attachment in a particular record? As you can see here, i have 3 photos where i need to generate “https://dl.airtablexxx1,https://dl.airtablexxx2,https://dl.airtablexxx3” in a field named “joined” Thank you for helping me
I found a script that fetches info from IMDB (Image, synopsis, etc.). My question is how do I alter this code to remove the need for user input. Here is how the script works as is, and I’ll insert the code below. Titles are put into the script, When it runs it asks for the user to click a button to pick which title to fetch. Then it shows you the data. And adds it to a record. I want to eliminate the need for a button and have the script fetch all the titles within the list. // Get an API key from OMDB here: http://www.omdbapi.com/apikey.aspx const OMDB_API_KEY = 'xxxxxx'; // Shows all the button groups together and waits for a button click // Returns the first button that was clicked async function chooseFromButtonGroups(label, buttonGroups) { output.markdown(`## ${label}`); return await Promise.race(buttonGroups.map(([label, options]) => input.buttonsAsync(label, options) )); } async function addTitle(title) { const info = await fetch(`https://www.omd
Hi guys, I’m not a developer, or programmer by any means, and I’m struggling to have two different types of fields syncing. It seems my only problem is that Field2 (the target) is a Linked Record field, and Field1 is a Single Line text field. I have no clue what to do at this point… The script i have so far looks like this // get the table let table = base.getTable("Table1"); let query = await table.selectRecordsAsync({fields: table.fields}); // loop through the records for (let record of query.records) { // now update Field 2 with the array of IDs in Field 1 let msCopy = await table.updateRecordAsync(record, { "Field2": record.getCellValue("Field1") }) }
I want to use scripting to go around AirTable restriction of syncing into one base and not being able to reflexively update the other. The goal is that we have one person in the company that manages property owner data, and I am looking for a way to allow him to have his own space. Right now the plan is to sync W9 submissions from one base to the Property Owner Data manager base upon entering a certain view. In the other Base, the PO Data manager will be able to review the W9 submissions and put in an approval or denial with an attachment that would go back to the home base–updating the status. I know that On2Air and other pay for services offer this. And i can always leverage emails. But I was wondering if perhaps by using a button column in the sync receive base that would ignite a script that would read into the original base, find the matching row and update it to show that it has been approved. Is this possible? Drew
I saw a few posts regarding posting a webhook, but didn’t see this type outlined below. I used it to send a prefilled form URL from AirTable through to Integrately (or Zapier etc). I’m not a particularly good coder so any feedback would be welcome! let inputConfig = input.config(); //URL is defined here let url = "URL OF THE WEBHOOK GOES IN THESE QUOTES"; //This is what the webhook is sending. You can customise the name of each parameter in the brackets. let payload = { "Variable1": inputConfig.Variable1, "Variable2": inputConfig.Variable2, "Variable3": inputConfig.Variable3, "Variable4": inputConfig.Variable4, } let postOptions = { method: "post", headers: { 'Accept' : 'application/json', }, body: JSON.stringify(payload) } //This is the code to post the webook with the parameters await fetch(url, postOptions);
Some applications like Twilio ask for a webhook where they can POST responses. Therefore Airtable is a good candidate for such integration. However, Airtable always return { success: true } after the webhook succeeds, which triggers an error on Twilio: Invalid Content-Type: application/json; charset=utf-8 supplied Is there a way to prevent Airtable from returning such response? I’ve found this topic already Silencing webhook received responses but no solution was provided. 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.