Need development and API help? Ask your questions here!
Recently active
Hi, I want to query and filter a table based on several filters sent via the URI as parameters. I found the Airtable API doc suggesting that I use the AT API encoder and use FIlterByFormula. I tried it and it all works perfectly. but for only one formula. meaning it only works for one column. but I have around 8 columns I want to query. How can I add more than one FilterByFormula in the URI? If the URI Looks like this: “https://api.airtable.com/v0/app0uHEtrxyWp3uzn/tbl1MB1FIAfGmnX4I?api_key=NULL&filterByFormula=REGEX_MATCH(Socials_Lookup,‘Instagram|Twitter’)” how can I make it like: “https://api.airtable.com/v0/app0uHEtrxyWp3uzn/tbl1MB1FIAfGmnX4I?api_key=NULL&filterByFormula=REGEX_MATCH(Socials_Lookup,‘Instagram|Twitter’)&filterByFormula=REGEX_MATCH(Parent_Category_Bubble,‘Animal|Food’)” And keep adding appending to it, This is me testing it on Postman. When I try to add more than one Formula:
Hi, I am an online marketing consultant from Belgium and currently working on a side project (app). Still in the first phase of testing out the different possibilities (doing some market research at the moment). I all goes well I would like the get an app developed in Q1 2023, but I’m wondering if I should develop a basic MVP first, and looking at Airtable for this. But I have two questions: is there a way to have a nice design for an Airtable form? Nothing fancy, just something that looks good enough? Templates? Integration? … is there a way of using the data in the Airtable Base for notifications? Like you should have in app? Kinda automated of manual. The MVP would be used on a smaller group of customers to test things out, so need something simple that just works. Thanx for any advice of information. Have nice weekend, Joeri
Hello, I want to be able to import transactions from Quickbooks, and link those transactions to a Client record from another table (Clients) in the base (relational). The first issue that I ran into was having an automation update multiple records at once. It seems the solution to this is a script. I modified one that seemed popular here to the following: let config = input.config() let records = config.QBRecords //.step2Records must match the Name field of the input field. let table = base.getTable("Quickbooks 7-14-22 YTD"); // Replace with your table name. for (let record of records) { await table.updateRecordAsync(record, { "Client": [{id: config.clientRecord}] }) } However, it’s throwing an error: “Error: Field “fldOyEuNcD7vGj42h” cannot accept the provided value. at main on line 5” Can anyone help with this? I have a feeling it’s something dumb… but I can’t seem to fix it. Thank you in advance. Script: Automation: Quickbooks table:
I was wondering if there was a way to sync data from Airtable to any forms or data table plugins in wordpress. I have a list of tourist attractions and prices in Airtable, If I change a price in airtable, will I be able to update that price in a Gravity Form? It’s early enough that I can switch to another form plugin or even use a data table plugin. I’ve looked at zapier and IFTTT and neither seems to be able to do this.
Good afternoon, I m trying to script so that in a specific view of my table, ever 15 minutes, the first row will have box checked. As checked rows are filtered out, another one will be in first row for the next run. I managed to script that it check all the boxes at once with this script: let table = base.getTable(“Table Name”); let view = table.getView(“View Name”); let query = await view.selectRecordsAsync({fields: }) let updates = query.records.map(r => { return {id: r.id, fields: {“Checkbox”: true}} }) while (updates.length > 0) { await table.updateRecordsAsync(updates.slice(0, 50)) updates = updates.slice(50) } Thanks!
I’m creating records via API and everything works well EXCEPT for creating single select options. I’m passing strings in an array and only pass options, which already exist. Still I get this error back: Does anyone know why?
Hello everyone, I have a base with 12 tables and a few plain text and rich text fields in each. I’m looking for a way to find and replace the name of my company everywhere (any table, any field). The marketplace script only lets me choose one field in one table at a time… Thanks a lot for your help. Joachim
Hi there, I’m writing a script to compare two tables (views actually) and mark the records that match. I wrote a script that compares View 1 to View 2. And then needed a way to compare the other way around, View 2 to View 1. The problem is I got a big chunk of duplicated code and surely there’s a better and more elegant way to accomplish this. Right? :thumbs_up: Here’s the setup section of my script, nothing fancy: //get table let table = base.getTable("Table 1"); //get records in the App View let AppView = table.getView("App"); let AppRecords = await AppView.selectRecordsAsync({fields: ["DateApp", "Payee", "Amount"]}); let AppExpenses = AppRecords.records //get records in the Bank View let BankView = table.getView("Bank"); let BankRecords = await BankView.selectRecordsAsync({fields: ["DateTransaction", "DateProcessed", "Payee", "Amount"]}); let BankExpenses = BankRecords.records :thumbs_up: Here’s where I compare compare View 1 (App) to View 2 (Bank). And update the records: /
This is my current scripting code to do cumulative total based on customer field. // change these names to pick a view: let table = base.getTable('Sales'); let view = table.getView('Overall'); let result = await view.selectRecordsAsync({fields: ['Customer','Sales Amount','Cumulative by Customer'], sorts: [ {field: 'Customer'}, {field: 'Sales Date', direction:'asc'}, ] }); let runningTotal = 0; let currentCustomer = ''; for (let record of result.records) { // change the field names here to adapt this script to your base let currentAmount = record.getCellValue('Cumulative by Customer'); // skip records if (currentAmount !== null) { continue; } console.log(record) if (currentCustomer != record.getCellValueAsString('Customer')) { currentCustomer = record.getCellValueAsString('Customer'); runningTotal = 0 ; } runningTotal += record.getCellValue('Sales Amount'); await table.updateRecordAsync(recor
Hi all, i’m running a speed test and i see that my website is greatly slowed down by an static airtable javascript file. I was wondering if anyone can help to understand why and how to optimize it. Current setup: Running an embedded airtable form on a carrd website Direct link to file that’s causing the slow down. https://static.airtable.com/js/by_sha/a915f8b6/shared_form_view-br.js Thank you!
Hey everyone:) Looking for a Script that adds an option to a “multiple select” when a new record is created in a near by Table. It’s a base that works as an app for Sending Whatsapp messages. there is a “multiple select” field that needs to be connected to another table with costumer names and phone numbers. so that when a new record is created the costumer name would pop as an option in the multiple select field. Any ideas ?
Hi all, I would like to use absolute imports in my app, I have the following file structure ./ /.block /build /node_modules /src /components /NavBar index.js /UI /Input index.js App.js index.js block.json package.json jsconfig.json To avoid a bunch of …/…/ in my imports I am trying to use absolute imports. I have { "compilerOptions": { "baseUrl": "src" }, "include": ["src"] } In my jsconfig.json however my absolute imports are not being found when I run the app in Airtable. Anyone have any thoughts?
Hi everyone, I’m a new user on airtable and I would like to create a table which contains a number field type, but when I run the script, I got this notification : We have a table A containing the list of clients we work with and each client has their own table. So when we add a new record in this table A, we are supposed to create a new table for this new client, that’s why we need this script. In the part of script below, I have those lines that I think is the right syntax to create a new table for the new client. const tableName = await input.textAsync(‘Choose the name of this new client’s table’); const primaryFieldName = await input.textAsync(‘Enter the name of the primary field’); const primaryFieldType = await selectFieldAsync(‘Choose the right type of the field’); // selectFieldAsync is a custom async function that prompt the user to select the type of the field let tableId = await base.createTableAsync(tableName, [{ name: primaryFieldName, // type: primaryFieldType, options:
I’m using postman to query records in a base. Using the GET command https://api.airtable.com/v0/appXXX/XXX?fields[]=Creator. This return an array of values including the name of the Creator. How would I go about filtering by a Creator name? So only records from a specific creator are returned. Thanks!!
Hi! I’m working on a script to batch update linked fields and it seems to work for the most part but eventually throws this error: I have checked for duplicates in the tables I’m working with but there are none. Any ideas what might be causing this? Here’s the script for reference: //Define the company table and query let cmpTbl = base.getTable("Companies"); let cmpQuery = await cmpTbl.selectRecordsAsync(); //Define people table and query let pplTbl = base.getTable("People"); let pplQuery = await pplTbl.selectRecordsAsync(); let updates = []; // Search for matching records and batch update for (let allPeople of pplQuery.records){ let cmp = allPeople.getCellValue("Company") for (let allCompanies of cmpQuery.records){ if (cmp === allCompanies.getCellValueAsString("Company")) { let cmpID = allCompanies.id updates.push({ "id": allPeople.id, fields: {"Companies 2.0": [{id: cmpID}]} }); }
Hello, I’m able to successfully make post requests to my Airtable base via the api using a netlify function. My POST request body contains four values (we can call them w, x, y, z). What my function currently does is create a new record and adds each value to their respective field. What I’d like to do, before creating a new record, is to first check if any records in my base have all 4 identical values for each field provided in the post request. If a record does, I’ll return a success response, if not I’ll create a new record with the POST values. I see that the select() function may be a good start but am having trouble understanding how to check if a record matches each value in a post request. For reference I’m using node.js to send this request here’s my create function that is working correctly: let fields = JSON.parse(event.body) const { w, x, y, z} = fields // This is where I'd like to check if my table already has a record // with each value in the post request as a field awa
Has anyone used Airscripts to pull data in from Cin7 via API? Also, does anyone have recommendation for best API to use? I think you have to use async and await in Scripts? JavaScript has so many options. Plus, I just started using Airtable yesterday. I was think about using the below but adding Cin7 requirements. They just use HTTP auth so I need to add that piece for accessing still. import fetch from ‘node-fetch’; const getPokemon = async() => { try{ let id = 1; let url = https://pokeapi.co/api/v2/pokemon/${id}; const res = await fetch(url); // Returns a promise so we need await const data = await res.json(); // Returns a promise so we need await console.log(data); }catch(err) { console.log(err); } }; getPokemon();
Hi! I’m working on an airtable script where I’m trying to re-link records that were previously linked in another base. Context: I shared two tables from an OLD base to a NEW base. These tables had records that were linked(in the old base). After sharing them to the NEW base, the links got lost. I’m now trying to re-link these records. I have two tables, “Companies” and “People”. The “Companies” table has fields with the company name and employees. The “People” table has fields with people’s names and their affiliated company. Here’s the script I have written to attempt to solve this issue. //Define the company table and query let cmpTbl = base.getTable("Companies"); let cmpQuery = await cmpTbl.selectRecordsAsync(); console.log(cmpQuery) //Define people table and query let pplTbl = base.getTable("People"); let pplQuery = await pplTbl.selectRecordsAsync(); console.log(pplQuery) for (let allPeople of pplQuery.records){ let cmp = allPeople.getCellValue("Company") console.log(cm
I already reported this on the github javascript library, but I think more core developers might see it here as well. I want to filter the results of the airtable rest api based on the field ID using the filterByFormular parameter. The reason for that is, that the name could always be renamed, using the ID is future proof. A simple filter look like this: Name = "Joe" But instead I want to use the id: fldnwAXj3iM53qu4y = "Joe" After tons of googling it turns out that this is simply not implemented. I also tried it out with the id in brackets, but that still does not work (so it is not undocumented). I think this is a critical feature for the rest api, to build robust apps on airtable. It should be a quite simple feature with a huge impact. Might be worth a look.
Hey everyone, I’m new to using scripts and I’m hoping someone can help me out. I’m running an automation that runs a script which includes the input from the trigger but I have no idea how to add the input to the script. Here is the script, the input is supposed to be sent as the body to the webhook url: let response = await fetch('https://hook.eu1.make.com/o3pnw2043wkr9zs9mcavdrix', {method: 'POST', body: '*Input should go here*'}); console.log(await response.text()); Thank you
Hello, I am a beginner in the API world and I am a little lost in my research. I have a script that sends data with webhook into a google script. I check with webhook site if my data was send correctly and I succeeded to retrieve the data from my airtable (after I choose the right row). My question is, how can I get the data (from the payload) with variables into my google script doPost function ? I want to retrieve data from my airtable to generate a google doc after. I hope it’s clear enough. Best regards
Hi friend, i am new to airtable scripting, i am trying to send a webhook to third party API, let url=“https://connect.pabbly.com/workflow/sendwebhookdata/IjQ0NDI0NiI_3D”; let config=input.config(); await fetch(url+config.recordid); In airtable, it show test run is successful , but on the third party side, no record is received, am i doing anything wrongly?? please kindly help!! thanks
Dear all, I am new to Airtable. I wish to find out how powerful is the Airtable scripting language (is it Javascript?). Is it powerful enough to automate anything within an Airtable base? For examples: to validate a user input on a field and able to undo if it’s invalid; change the colour of a field; hide a button on the fly, etc. Can I attach a script to a button on a form? Airtable is known as a low code platform, does that mean bases are usually developed without writing much scripts? Thank you very much in advance. Martin
Hello. I’m writing a VSC extension, and using the example javascript code provided in the airtable api docs generated for my base. The code gets the records from airtable, but then logs an error. The extension doesn’t crash, but fails in airtable.lib.run_action.js line 70 where it calls callback(base._checkStatusForError(resp.status)); with a rep_status of 200 Is this an airtable problem, or should I be adding reject code, catch code or similar? rejected promise not handled within 1 second: TypeError: Cannot read properties of undefined (reading 'offset') /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102 stack trace: TypeError: Cannot read properties of undefined (reading 'offset') at /Users/dave/Documents/Projects/vsc extensions/airtable-docs-ext/node_modules/airtable/lib/query.js:118:28 at /Users/dave/Documents/Projects/vsc extensions/airtable-docs-ext/node_modules/airtable/lib/run_action.js:70:17 at processTicksAndR
I need a script that will run when I push a button that will check to see if a field is “TRUE” or checked and if it is, than will send the webhook out with the recordID. This will help our workflow because we want to make sure that all needed fields for a Zapier automation are present before a webhook is sent.
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.