Need development and API help? Ask your questions here!
Recently active
So this is what I am using to get my data from airtable import axios from "axios" formSubmitHandler = e => { axios .get( "https://api.airtable.com/v0/" + app_id + "/" + view, { headers: { Authorization: "Bearer " + app_key } }, ) .then(resp => console.log(resp)) .catch(error => console.log(error)) e.preventDefault() } This works very well, however when I try to post something into the same table and now using this: formSubmitHandler = e => { const { name, email } = this.state const data = { "records": [ { "fields": { "Name": name, "Email": email, } } ] } console.log(data) axios .post( "https://api.airtable.com/v0/" + app_id + "/" + view, { headers: { Authorization: "Bearer " + app_key } }, data ) .then(resp => console.log(resp)) .catch(error => console.log(error)) e.preve
I’m trying get all of the records form an api call into an object so I can use the data in other calculations. I can’t, however, get the function to return what I want. I’ve tried lots of combinations of async/await and .then(), but I can’t get it to work. “aTotalRecords” gets filled up with the data, but I can’t get the function to return it. Can someone help me figure this out? Thanks in advance. Here’s the code I have: async function getAirtableData(){ // var Airtable = require('airtable'); var base = new Airtable({apiKey: oConfig.oConfig.airtableAPIKey}).base(oConfig.oConfig.airtableBaseKey); var aTotalRecords = []; // for keeping allthe records base('Polygon Transactions').select({ maxRecords: 500 // view: "Grid view" }).eachPage(function page(records, fetchNextPage) { // This function (`page`) will get called for each page of records. records.forEach(function(record) { aTotalRecords.push(record.get('tx_
Hello, I am trading account and software activation code. I need to improve this system, anyone who can help me please contact Telegram @gamikeystore
Hi. Is there a very simple example of how to consume multiple pages when calling GET on the airtable API? I have a simple API Call class, much of which I got from this forum, but there are multiple pages in my data. Here’s my code: class AirtableGet{ constructor(inputSheetName, tableName){ this.inputSheetName = inputSheetName; this.tableName = tableName; // text name of the table in Airtable; ex. "Balance Tracking" /** Airtable Variables */ this.ss = SpreadsheetApp.getActiveSpreadsheet(); this.inputsSheet = this.ss.getSheetByName(this.inputSheetName); this.myAPIKey = this.inputsSheet.getRange(9, 2).getValue(); this.baseKey = this.inputsSheet.getRange(10, 2).getValue(); this.cAirtableAPIEndpoint = this.inputsSheet.getRange(11, 2).getValue(); this.url = this.cAirtableAPIEndpoint + this.baseKey + "/" + encodeURIComponent(this.tableName); };// end constructor /** get request */ getFromAirtable (){ var options = { m
Hello, I’m struggling with setting correctly a Date field. Basically I have a field with Date type which I set to Date.now() when something happens. If anything else happens I want to blank out the field and leave it emtpy. If I try… myDate = null; I get an error reading “Type ‘null’ is not assignable to type ‘number’”, and it seems the only way I can get rid of the error is by using… myDate = 0; Now, when I run the script and my “else” is executed I can’t seem to assign 0 to the field, and I’m getting an error reading “j: Can’t set cell values: invalid cell value for field ‘myDate’. Cell value has invalid format: .0 must be a string, .1 must be a string, .2 must be an object” So, the question: how can I manually assign null/empty to a Date field so that no value is displayed? Thanks in advance for your help.
Cross-posted, but updated I’m using the popular script for downloading attachments from a url to an attachment field, but I’m running into issues. The url I’m using is a direct download link to an mp3 file in Box, and this script is working properly half the time, but in some cases rather than downloading the mp3 file, it’s scraping the html of the download page instead and loading it into AT as (what looks like) a text file with an mp3 extension. I’ve opened the file preview for one of the incorrectly downloaded files in Box and it looks like it’s asking for Box credentials, but I’ve double-checked the urls in Box pre-download and they’re all set to be downloadable with just access to the link, so it isn’t (or shouldn’t be) a permissions issue. I’ve been able to open them even when not logged in to Box. When I download one of the files it is unsurprisingly corrupt. Has anybody run into this before?
When I block run, I get an error when trying to open the app in Airtable: Can‘t connect to your local app, did you block run ? It works in Safari and I suspect it’s a CORS issue. Does anyone else have the same?
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?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.