Need development and API help? Ask your questions here!
Recently active
Hi Everyone! I’m trying to set a 5-10 seconds delay for an automation. I’ve checked this post : https://community.airtable.com/t/i-need-a-delay-method-settimeout-is-undefined-not-found-window/28125 And I’ve tried the following script: function timeout(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } await timeout(50000)//waits 5 seconds The editor gives an error and my automation can’t complete. Do you have any clue of how I can (A) fix this issue or (B) set a delay in a different way ? Regards,
Hi all, I pulled JSON data through an API that looks like this: {'odata.metadata': 'https://opendata.cbs.nl/ODataApi/OData/80416ned/$metadata#Cbs.OData.WebAPI.UntypedDataSet', 'value': [{'ID': 0, 'Perioden': '20060101', 'BenzineEuro95_1': ' 1.325', 'Diesel_2': ' 1.003', 'Lpg_3': ' 0.543'}, {'ID': 1, 'Perioden': '20060102', 'BenzineEuro95_1': ' 1.328', 'Diesel_2': ' 1.007', 'Lpg_3': ' 0.542'}, I have created corresponding column names in my table. I have also read through the API docs and set up my Base ID / Table ID / API key. I managed to GET and POST requests into/from Airtable with dummy / hard coded data as presented in the API docs. I have tried to POST the JSON data into Airtable in different ways, which resorted in all the error messages you can think of :grinning_face_with_big_eyes: . So how do I structure the JSON data so that Airtable can interpret it? Look forward to hearing from you
Hello - I have a base that manages products for a website through Webflow. I have built and tested a tool that will import products from an XML source from the supplier that my client uses; however, for the product descriptions it gives the bullet list in an array (XML) that provides up to 24 bullets. I have them mapped and they sync to 24 distinct columns accurately, but now I’m having some trouble navigating how to get those 24 fields converted into a bullet list in the rich text field I have for the “Full Description” - while ignoring empty fields. Any support or insight would be greatly appreciated! Brian
Hi folks, I’m using filterByFormula param to filter records of a table but I’m able to select for a specific date. Below and example: request: https://api.airtable.com/v0/appFOOBAR/Spese?filterByFormula=AND({Importo}=111.22,{Data}='2022-04-01') response: { "records": [] } while with the request below I got a result: https://api.airtable.com/v0/appFOOBAR/Spese?filterByFormula=AND({Importo}=111.22,not({Data}='2022-04-01')) response: { "records": [ { "id": "recXXXX", "createdTime": "2022-05-24T09:38:50.000Z", "fields": { "Tipologia": "Spesa", "Data": "2022-04-01", "Importo": 111.22, "Name": "Prova 1" } } ] } so the example using not operator shows that there’s a record with Data=2022-04-01, I don’t understand why this record isn’t extracted using the first request.
I’m developing an app with airtable API and then there is a page that listed items and that item has 3 filter categories, so I want to make a filter function but each filter category must can count how many items can be filtered again example category 1: item 1(3) item 2(1) item 3(2) category 2: item 1(3) item 2(2) item 3(4) expected result filter: category 1 = item 1 category 2: item 1(2) item 2(1) I’m stuck on that case, so can anyone help me?
***I know this might be irrelevant here, But Somonoe might have gone through this Hi, I use Airtbale as my database on bubble.io. therefore I use the Airtable plugin to get data and display it in a repeating group list. However, the plugin only allows for CRUD operations. I want to filter the data. So I Wrote a script that fetches the data from Airtable API using Curl. All is good so far. I get the data I need, My problem is how can I display it in the reading group! Usually, I have the repeating group set up as follows: type of content: the table I’m getting the data from Data source: get Data from an external API → Airtable → Pick the table that matches the type of content. But since I’m fetching the API call. the script returns (using javascriptToBubble) a value list. I tried to use the options display list in RG and fed it the returned value. but it didn’t work. getting the error “Airtable plugin data load error: Could not find what you are looking for” I inspected the RG to get th
My question is essentially summed up in the title. If I have a python code saved down on my computer (or G-Drive), can I make an automation in Airtable that will run the python code? I would be using the Python Code because it already does what I need (runs a SQL script), and if I don’t need to learn how to do that in Javascript - then I won’t.
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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.