Need development and API help? Ask your questions here!
Recently active
I need to get all the ids and names of my bases. I know I could do this using a simple call to Metadata API → Sign in - Airtable. However, airtable stopped creating new X-Airtable-Client-Secret's. Is there another way?
Hi there - Does anyone know how to push information from airtable to Instacart? For instance, choosing a recipe using a form and then pushing the ingredients. I am not sure what the best way to do this would be… Suggestions are welcome! docs.instacart.com Instacart Connect - The Instacart APIs | Instacart Connect Documentation Use Instacart APIs to add Instacart capabilities to your branded ecommerce site. You and your customers benefit from Instacart scheduling, full-service shopping, delivery, pickup, and order tracking. Your developers can integrate the selected... Thanks in advance!
Hi, I have this table in Airtable which has for about 10k data. I try to display it with datatable and it takes quite a long time to fully load the table. Is there a way to lazy load the airtable and display it on datatable?
Hi, I am trying to adapt/modify scripts that i have found within these forums in order to update a linked field with a recordID defined as an input variable. I am very limited in knowledge with scripting, through trial and error i have been able to modify and update a single line text field and a single select. I have also managed to clear the cell through a previous failed attempt. Can anyone help me understand where im going wrong? Full Script Here. let config =input.config() let records = config.step2Records let drop = config.drops console.log(drop) let table = base.getTable(“All Drops”); for (let record of records) { await table.updateRecordAsync(record, { "Collection From": [{id: drop}], }) } I have read through all posts similar looking but i am at a loss. I would like the answer but also any reference to learning material would be great. Many thanks,
I’ve been trying to modify a script I’ve found on the airtable community that would allow me to click a button and trigger a script to move a record to another table. But it seems that in the process, it moves every record in the table. Is there a way to make it only move ONE record? let table1 = base.getTable(“New Leads”); let table2 = base.getTable(“Following-Up With”); let result = await table1.selectRecordsAsync(); for (let record of result.records) { if (record.getCellValue(“Move To Following-Up”)) { await table2.createRecordsAsync([ { fields: { ‘Name’: record.getCellValue(“Name”), ‘Email’:record.getCellValue(“Email”), ‘Phone’:record.getCellValue(‘Phone’), }, } ]); await table1.deleteRecordAsync(record.id); } } This is the script I have currently, any help is appreciated
Hello, I’m new to airtable and I want a build a form that allows users to search for their places using google maps. So my question is how to add javascript to a specific field
Hello, I’m trying to delete a massive duplicate records in my table about 10,000 to 20,000 records exist in my table. As i don’t know where to insert the proper condition if the records is duplicate by knowing they are older dates or not up-to-date/current date And I can’t delete them in one go due to script execute time. // Read our table var table = base.getTable("Weekly Metrics"); var query = await table.selectRecordsAsync (); // Check whether any record in that table // match the input let duplicate = query.records.filter((record)=>{ return query.records.find((potentialDuplicate) => { return record.getCellValue("Pages") === potentialDuplicate.getCellValue("Pages") && record.id !== potentialDuplicate.id; //&& record.id !== potentialDuplicate.Id }) }); // console.log(duplicate); let updates = duplicate.map(update => { return { "id":update.id, fields:{ "Duplicate?":true } } }); while(updates.length &
Hi everyone, I’m performing a vlookup essentially at a spesific time each day. It worked the first couple of times, but now keeps giving me an error, any advice/guidance would be greatly appreciated! //"Time Sheet" contains values on which you want to run the vlookup let mainTable = base.getTable("Time Sheet"); let mainTableRecords = await mainTable.selectRecordsAsync({fields:["Title Name"]}); //"Volunteers" contains range to search in let lookupTable = base.getTable("Volunteers"); let lookupRangeRecords = await lookupTable.selectRecordsAsync({fields:["Name"]}); //"Title Name" has the values you want to look up for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue("Title Name"); //"Name" is the range to search in for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue("Name") === lookupValue) { let linkID = rangeRecord.id;
Hi all, This forum has been a huge help in getting me unstuck in many instances. I haven’t found an explicit answer for this one, so posting here. I have an API call to the Airtable API in which I am looking to retrieve a record that matches on a specific field value (not the record id) and I am looking to identify that field by it’s field id rather than it’s field name. Is this possible? If so, what would be the proper syntax? For clarity here a sample syntax with field name as the identifier. NOT({Field Name} = ‘data’) ergo appending option of filterByFormula=NOT%28%7BField%20Name%7D%20%3D%20%27data%27%29
I have not been able to address tables in a base other than the first table (the one that shows up in the API documentation for a base). I have tried substituting a different table name, but that gives me an error. For example, I have a base called “Bug Tracker”. The first table is called “Bugs and Issues”. I can get at it with curl https://api.airtable.com/v0/BASE_ID/Bugs%20and%20issues?api_key=MY_API_KEY As you can see, I have another table in that base called “Testers”; however curl https://api.airtable.com/v0/BASE_ID/Testers?api_key=MY_API_KEY returns {"error":{"type":"TABLE_NOT_FOUND","message":"Could not find table Testers in application BASE_ID"}} How can I get data from the “Testers” table? Thank you
I’m using a custom script to get records form the base I am in. To do this, I am using using: base.getTable('Incoming'); Now, I’d like to create new records using data from the records in base.getTable('Incoming') in a table that lives in a different base. How can I reference a different base from this script?
Hey Guys, I’m looking for a (simple) automation that automatically deletes all empty records. My Airtable is being feeded with empty records due to a dirty API. So I need to run a script automation on schedule to clean up these blank records… I have zero experience writing scripts. I tried to use some older script from the airtable community but it does not have the most up to date syntax i guess – because it’s full of errors. Greets from Germany Pascal
Currently, I load data from my base then individually go through them individually to convert the data to strings. Is there a way to read the data as string when loading? let people = ; base(“Employee”) .select({ view: “Grid view” }) .eachPage( function page(records, fetchNextPage) { records.forEach(function(record) { let pp = new person(); pp.name = record.get(“Name”); pp.role = record.get(“Role”); pp.cards = record.get("(Relevant) Cards"); people.push(pp); }); fetchNextPage(); }, function done(err) { if (err) { console.error(err); return; } } ); class person { constructor() { this.name; this.role; this.cards; } formatRole(){ if(this.role != null){ let is = ; for (let i = 0; i < this.role.length; i++) { base(“Employee”).find(this.role[i], function(err, record) { if (err) { console.error(err); return; } is.push(record.fields.Name); }); } if(is.length == 1) this.role = is[0]; else this.role = is; } } }
Hello, is it possible to use wordai api to implement in the airtable script? i want to spin some words in the columns.
I have a scripting app that will post to a Discord channel hooked up to a button field. Works fine if I use it in my logged in Airtable environment, even in a Gallery view. However, when I share that same Gallery view outside of my logged in environment, the scripting app button shows as disabled. I didn’t have this problem when it was a URL button instead. I can’t find any documentation on this or anyone else having this issue. Thanks for any ideas or insights!
Hey team! We are Bitskout, a UNESCO awarded software platform that allows users to create smart plugins powered by no coding & no training needed A.I. and add them to the tools they use. We are thinking about building the next integrations and several of our users use Airtable and we decided to check it out. I can’t seem to find a definite answer about how to create a custom action - that’s usually a way we integrate with other tools like Asana or Monday.com. This is what we want to do: Is it possible? If yes, please point us to the documentation or an example. Thanks! ilia P.S. Use case examples for Asana and monday.com
Hello, I’m using postman to create records in a table with data coming from another system. I am trying to use the JavaScript code provided in the API documentation (see below), however I’m getting the below error. Any help would be appreciated. Thanks! Error { “error”: { “type”: “INVALID_REQUEST_MISSING_FIELDS”, “message”: “Could not find field “fields” in the request body” } } JavaScript provided in API Docs var Airtable = require(‘airtable’); var base = new Airtable({apiKey: ‘removed’}).base(‘removed’); base(‘Table1’).create({ “Session_Title”: “test”, “Timestamp”: “tes”, “Duration”: “test”, “Coach_Emp_ID”: “test” }, function(err, record) { if (err) { console.error(err); return; } console.log(record.getId()); });
There might be a very simple way to do it or not but can anyone help me? I want to add a new column in my table using the api from my python module. How can I do that?
Hi We use a script to create airtable records through API. Attachement (pictures) are stored on a public webserver. The URL is passed by API request and Airtable dowload the attachement on his own cloud to be available in the attachment field. This solution worked properly for a year maybe. Since december 2019 we get some “broken files”. It seems that Airtable fails at downloading the attachment ant the attachment appears whit a generic icon instead of a picture preview. The picture can’t be downloaded properly. It is very inconsistant : we have records with for exemple 4 pictures in the attachment field and one of them appear broken. Deleting the record and recreating it the same way may fix the record. The picture is always available on our webserver. As we have a long history I could determine that this problem began to occurr on last december. I read some similar issues on the forum that have been fixed by “patching” the airtable with the support Can I have any help on this issue?
Is there a method on base(‘tableName’) that can get the length (number of records) of the table? Here is part of my code: var Airtable = require('airtable'); var base = new Airtable({ apiKey: 'myApiKey' }).base( 'myBaseId' ); base('tableName'). Here are the methods I see when typing: I also saw that someone suggested this: const table = await input.tableAsync('Copied'); const primaryFieldId = table.fields[0].id; const queryResult = await table.selectRecordsAsync({ fields: [primaryFieldId], }); const recordCount = queryResult.records.length; console.log('recordCount', recordCount); However, I’m getting an error saying: SyntaxError: await is only valid in async function (also, I wasn’t sure if input was a variable that was set somewhere else). My other idea is to GET all of the records and implement a counter, but I wanted to see if there was a cleaner or better way.
I’m working on a rather bulky script, and because I’m trying to keep it clean I try and create functions for repetitive tasks. But it seems that using functions inside the scripting block also results in a poor logging behaviour in the output screen. Take the following code: let firstCreatedFieldID = await base.getTable("Test table").createFieldAsync('test', 'singleLineText'); console.log(firstCreatedFieldID); let secondCreatedFieldID = await base.getTable("Test table").createFieldAsync('test', 'singleLineText'); console.log(firstCreatedFieldID); It neatly outputs the created field ID of the first command, and outputs the expected error of the second command. But now, if I functionize this script – which is this example seems silly, but in a larger script it of course makes total sense – like this: createField(); createField(); async function createField() { let firstCreatedFieldID = await base.getTable("Test table").createFieldAsync('test', 'singleLineText'); console.log(f
I need a script for updating multiple records all at once for my automation that is scheduled to run monthly. I am running a counter system that is adding for every run, then every month i want to reset that counter to 0. The field here is a number field and everyone based on a view needs this counter changed to 0 whats my script? thank you!!!
Hey all, Happy Friday I’m wondering if it’s possible to import CSV files with script and outside of Airtable? We have guys in the field that use Stacker but it would be nice instead of them manually creating 4 records, to only have to upload the file via one record. I found this resource Importing a CSV file using Airtable scripting | Airscript Thanks
I’m trying to use the scripting app to: Get all of the records from one table (this Table is called “Incoming”) Copy all the records from the Incoming table to a different table called “Copied” Here is my code: let tableIncoming = base.getTable('Incoming'); let tableCopied = base.getTable('Copied'); let query = await tableIncoming.selectRecordsAsync(); let arrayOfIds = query.recordIds; let records = query.records; let recordsWithFields = []; console.log('query:', query); console.log('arrayOfIds:', arrayOfIds); for (const record of records) { let newRecord = { "id": record.id, "fields": record, }; recordsWithFields.push(newRecord); console.log('recordsWithFields', recordsWithFields); } ///// let recordsObject = { records: recordsWithFields }; console.log('recordsObject', recordsObject); await tableCopied.createRecordsAsync(recordsWithFields); However, I’m getting the following error: Invalid record format. Please define field mappings using a fields key for each
Has anyone managed to accomplish this? I don’t have the best JavaScript skills and am wondering if someone has already created a script like this.
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.