Need development and API help? Ask your questions here!
Recently active
Hi - Has anyone managed to successfully encrypt information via scripting or otherwise? Would love help or suggestions. @Bill.French listed an encryption solution and I love it. Field-level Encryption: Does Anyone Care?
I have a base which records are being created automatically via an Integromat integration. Part of the process is creating a thumbnail image pulled from a URL link. All this happens through Integromat, an integration someone did for me. Lately, I have been getting empty thumbnail icons in Airtable after new records are being created. All links work ok but there is no thumbnail. If I manually delete the empty thumbnail and re-upload it via the link that is covered, the image shows perfectly. I have over a hundred records with no thumbnail. Would love to create a script that I can assign to a button that allows me to replace the empty icon with a fresh image pulled from the link. Any guidance as to how to start structuring the script would be super appreciated. I am very new to scripting and javascript. Tried searching for solutions here but maybe I am not searching for the right thing. Thank you!!!.
Is there any way to securely store and fetch secrets in Airtable (API keys, etc), and then access them from within a Script (not an App)?
I’ve created a script which counts the number of rows grouped by the column ‘Deal stage’. I now want to tweak it to sum the values in column ‘First credits’ and group by deal stage, rather than count the number. Any ideas? It’s basically a =SUMIF equivalent. let table = base.getTable('Origination'); let result = await table.selectRecordsAsync(); let recorddeal = result.records.filter(recorddeal => recorddeal.getCellValue('Deal stage')); let records = result.records.filter(recorddeal => recorddeal.getCellValue('Deal stage')); function countByField(records, groupByField) { let counts = {}; for (let recorddeal of records) { let key = recorddeal.getCellValueAsString(groupByField); if (key in counts) { counts[key] = counts[key] + 1; } else { counts[key] = 1; } } return counts; } let categoryCounts = countByField(records, 'Deal stage'); const primaryFieldId = table.fields[0].id; const queryResult = await table.
Hi, I built below script to use a filed in a new record created as input as project but it doesn’t work and I cannot understand why:
Hi, I’m trying to run the below VLOOKUP type script. When I type it in I get a strikethough on mainTable.selectRecordsAsync - I’m not a programmer and wondering 1) if this is why my script is not running and 2) how to fix it. Any help is appreciated. Thanks! let mainTable = base.getTable(“Price Book”); let mainTableRecords = await mainTable.selectRecordsAsync(); let lookupTable = base.getTable(“Inventory”); let lookupRangeRecords = await lookupTable.selectRecordsAsync(); for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue(“Number”); for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue(“Item”) === lookupValue) { let returnValue = rangeRecord.getCellValue(“CA INV”); await mainTable.updateRecordAsync(record, { "CA Inv": returnValue }); } } }
Per the documentation, it appears that we can’t send cookies in headers for fech() commands. I’m trying to access an API with a GET request in which the only authentication method I have available is a session cookie. Does anyone know of another way to be able to make a cookie/session-based get request from within an airtable script/automation?
The script is below. I have to tables. Provider AIS API Info and Global APIs. Field “Provider ID” from the Provider AIS API tab should be looked up in the Global APIs tab, in field Provider ID. The matched records should return the “Is it global?” Field back into the “Global API?” field of the Provider AIS API info tab. The script is below: let mainTable = base.getTable("Provider AIS API Info"); let mainTableRecords = await mainTable.selectRecordsAsync(); let lookupTable = base.getTable("Global APIs"); let lookupRangeRecords = await lookupTable.selectRecordsAsync(); for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue("Provider ID"); for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue("Provider Summary") === lookupValue) { let returnValue = rangeRecord.getCellValue("Is it Global?"); await mainTable.updateRecordAsync(record, { "Global API?": returnValue
Bear with as I’m new to this product! Does anyone have a recommendation for building dashboards with AirTable Data? I’d love something that could pull data from multiple sources, but has a strong ability to integrate with airtable. Someone suggested to just copy and paste data into google sheets and build something in google data studio, but I want something that has a live connection and more robust integration features. Thanks in advance!
One of the big limitations for Airtable users who are trying to use Zapier is that we only have 2 triggers: “New Record” and “New Record In View”. The problem with “New Record in View” is that it will only trigger once for the entire lifetime of the record (in that view). But I have discovered some pretty cool workarounds! In regards to Zapier not being able to trigger multiple times for the same record, I have discovered 2 relatively acceptable workarounds to this issue. (Meaning that these workarounds are not really “full solutions”, but they should be acceptable for a wide variety of use cases.) Both of these workarounds require a paid Zapier plan: As described in this Airtable blog entry, we can use Zapier’s Code by Zapier module as the trigger for any Airtable action (such as searching records to give us the records we’re looking for). You don’t even need to know any JavaScript — you just set Zapier to run this simple JavaScript code that always returns “true”: output = [{status
Hi - I am new to Script, hoping someone can help me have this function return an array or values rather then just one. EX) Zip code 10001 exist in multiple cells in “ZIP” and was hoping to return all values associated with 10001, not just one value. //Substitute “Us Enterprise” for table name which contains values //on which you want to run the vlookup let mainTable = base.getTable(“US Enterprise”); let mainTableRecords = await mainTable.selectRecordsAsync(); //Substitute “ZipCodeData” for table which contains range to search in let lookupTable = base.getTable(“ZipCodeData”); let lookupRangeRecords = await lookupTable.selectRecordsAsync(); //Replace "Zip Code " with column name which has the values you want to look up for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue("Zip Code"); //Replace "Name" with columnn name which value should be returned for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue("Zip") === lookup
Hi, I have an automation which sends emails using the in-built Outlook integration. Sending plain email works fine, but I can’t seem to get it to send any attachments. While configuring the step which sends an Outlook email, I can specify a field in AirTable which holds a pdf file in the attachment section. However, when the email is generated no attachment is sent with the email. Is this feature working or is there something I need to do?
Hi, I would like to download attachments via API or download link keeping the original file name. I managed so far to download all attachments using the URL airtable generates for each attachment using a HTTP get request to the link. The issue is that when downloading through the URL it gives new generic names for all files such as: file (1) file (2) … file(103) Etc. Do any of you know a solution to this? I am currently setting this up in Integromat. Thanks!
Hello I’ve built a cryptocurrency portfolio app that uses an automation as follows: The trigger is a “At a scheduled time” set to once every 15 minutes. The Action is “Run a script”. The script fetches Cryptocurrency prices, converts them to £GBP and then writes them to a table for inclusion in some formulas. When I share this base, the automation is not shared, I must provide setup instructions to the recipient so that they recreate the automation. This is true even if the base has been copied to a Workspace with a Pro plan. I see that recently, the scripting App has become free to all users so wonder if I can remove the Automation but replace it with a Script App that will be able to trigger on a schedule, programatically. Is this feasible? Does anyone have any experience, advice or suggestions for a better solution? I can see similar questions were asked in this category but well over a year ago. Many, many thanks
I realize this is constantly asked in variations but I cannot find a solution to the issue. Most auto-linking scripts replace the contents of the field, in lieu of appending the new linked record to the field. I’ve attempted to concatenate the array of IDs, but that throws an error on the field write. //Define the company table and query let cmpTbl = base.getTable("Speaker Calls"); let cmpQuery = await cmpTbl.selectRecordsAsync(); //Define contact table and query let cntTbl = base.getTable("All Interested"); let cntQuery = await cntTbl.selectRecordsAsync(); //Loop through the records and find the Contact ID for (let record of cmpQuery.records) { let cmpid = record.getCellValue("Campaign Name"); let cmpid2 = record.getCellValueAsString("mem"); let cmptest = record.getCellValue("Scouted"); console.log(cmpid2); //Loop through linked table and match ID values for (let cntRecord of cntQuery.records) { if (cntRecord.getCellValue("Campaign Name") =
Hello everybody, heavy airtable user here. While developing the production+ecommerce+shipping tool for my company, I started to crash repeatedly against the microsoft integration walls. Basically there isn’t any integration to push/pull data from airtable to MFlow. The only solution is using third parties integrators like Zapier. As crazy as it’s sound, microsoft don’t provide this integration inside the Microsoft Flow integrator. This is also very condensed in a post on their forum which is 4 years old now, with people still asking for it: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Airtable-Connector/idc-p/598121#M21464 I hope that maybe some pushing from Airtable itself could work, ending in a long awaited integration, as many of us end up with some company using microsoft soon or later… Hope somebody can answer on this!
Hello! I have written a script which should be taking Airtable data (the actual use-case is URL redirects data) and posts to Shopify, however, I’m getting really stuck with this final element of my script! I’m using the scripting app in Airtable. I’m fairly confident that this is an Airtable scripting app nuance because when I run this script in node with hardcoded Airtable data it all works as expected and posts my data to Shopify! In the script below, I’m able to get the Airtable data as expected, and I’m also able to POST to Shopify outside of this function. However, I need this URL inside of a loop (forEach) so that I can POST each of the individual data sets to Shopify. For reference, URLSettings() updates the body element of the JSON I am posting to Shopify. I am needing to loop in each item of the array and post one-by-one. For reference, the console.log(result) below gives me an empty array. const hardcodeArray = [ '{"redirect":{"path":"/products/orange","target":"/collecti
Hi, I’ve got a view which filters all records with an empty ‘Name’. As I capture ‘FirstName’ and ‘LastName’ separately, I want to routinely combine these into a single text field (a formula won’t work for this case) I added an automatic script, running every 15m which seems to work with one exception. I do not know how to reference the combined ‘FirstName’ and ‘LastName’ field, anything in quotes is treated a string. Sure there must be a way, hope someone can help; let records = input.config().step2Records let table = base.getTable("People"); let view = table.getView("emptyname"); let selectFieldName = **`???????`** for (let record of records) { await table.updateRecordAsync(record, { [selectFieldName]: **`???????`**, }) }
I built a small table and am accessing it via Airtable API. Any tip as to how I can randomize the results I’m getting? Meaning: for each API call, get the value of a different row. Cheers
Slowly piecing together a Regex script in the Scripting App, but I’m stuck with table.updateRecordAsync not reading the field that’s active in the loop. If I hard-code the field name in with quotes it then works as I hoped, but if I use the field.name from the loop, it won’t parse. So the below works (but isn’t very useful as I’m trying to cycle through fields rather than hardcode a string); await table.updateRecordAsync(record, {"🔍Test_1": String("test1")}); “test1” will successfully write to each record for field “ :mag: Test_1”. But when I swap out the hardcoded Field name string with field.name it unfortunately fails to parse. await table.updateRecordAsync(record, {field.name: String("test2")}); Running Console log on field.name, it comes up as expected - so I’m not too sure what I’m doing wrong and will appreciate some help. Full code below - and keep in mind that I’m still learning Javascript - I’m finding it tricky to break my old coding method and habits to learn the new techn
Hi! I’m wondering if it’s possible to have an API key not from a personal account but a service account reserve to our apps? Maybe some of you have best practices when dealing with that kind of configuration (staging, production environments etc). I’m on the entreprise plan if it’s relevant.
Hi, I have created a Typeform with one of the question is a user input “Long text field” I have problem with AirTable not showing users input text from Typeform. Any ideas. Thank you.
I’m using API calls through Excel VBA to GET, POST, PATCH data tables linking several 3rd party platforms. For purposes of explanation of my issue, assume the following basic data. Table-1 contains (3) records, with Field-1 containing data “A”, “B”, “C” respectively. I can make a List GET call and it retrieves all 3 records properly with correct values in Field-1. I can make a record GET call for record (1) and it retrieves record (1) with correct Field-1 value of “A” Now I PATCH record (1) with a new value in Field-1 with “X”. In my Airtable web grid view instantly showing the updated value of “X” If I make a list or record GET call again, it still shows record (1) with a Field value of “A” even though I’m looking at the grid view with correct data of “X”. The next day making the same call and I get the correct value of “X”, as if it sat in a cache till an evening update. I can DELETE record 1 and I still get the same original GET results with record (1) and field-1 value of “A” even
I am new to the scripting app. I have a form that people fill out when they come to my office. It feeds into a table called Arrivals (QR Code). I want to create an automation that will run a script when the form is submitted: If the person is a guest, they submit their email. When the record has that guest email, I want to check another table, Data About People, to see if there’s a record there for them. If yes, link the Data About People record to the newly created Arrivals (QR Code) record. If no, create then link. I’m getting an error with this code: let mainTable= base.getTable("Arrivals (QR Code)"); let mainTableRecords = await mainTable.selectRecordsAsync(); let lookupTable = base.getTable("Data About People"); let lookupRangeRecords = await lookupTable.selectRecordsAsync(); for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue("Guest Email"); for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue("E
I want to refresh my airtable tables from an SQL DB once a day, thus I want to delete all records in a table, then reload. I know I can use curl, to load them, and i’ve got that to work, but i’m not sure of the most efficient way to delete all records. i could list them all, get the record id, then delete each record in a loop. Has anyone else automate a table reload? we are using this to prototype reports, and make them easily available on the web. thanks, Steve
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.