Need development and API help? Ask your questions here!
Recently active
Good morning everyone, I can’t seem to figure out the correct syntax for updating a Linked Field within a record. My test base is simple, two tables, a name field in each, and a linked record between the two. Table First Table Second Example of my simple script below. It’s odd that in the Airtable GUI users may paste text straight into the “Second” link and it creates the items in the Second table. But scripting requires the object/array to be formatted - which I’d appreciate a hand on. :pray:t2: let table = base.getTable("First"); let query = await table.selectRecordsAsync({fields: []}); let recordId = query.records[0].id; //Updating the Name works as expected await table.updateRecordAsync(recordId, { "Name": "Example Record", }) const data = ["Item 1", "Item 2"]; //Needing a hand to stamp "Name" items into the Linked Record. await table.updateRecordAsync(recordId, { "Second" : data }) output.text("Updated a record!");
Hello, I’m reading documentation here on the rate limits for the Blocks API and I’d like some clarity around these two statements: Batch methods ( updateRecordsAsync , createRecordsAsync , deleteRecordsAsync ) may only update/create/delete up to 50 records in one call. Additionally, writes are rate-limited (maximum of 15 writes per second). Your app will crash if this limit is exceeded. Two questions: What is a “write”? Does calling a batch method count as 1 write? Assuming that a batch method counts as a single write, does this mean that it’s possible to update 750 records a second (15 batch methods a second * 50 records per full batch) via the Blocks API Many thanks
Airtable is already a great way to give folks in our business the ability to edit a wide variety of datasets. With Interface Designer, we expect to move even more of our data into Airtable. But Airtable is just one piece within a large ecosystem of business systems. We need to connect with a wide variety of custom internal systems and off-the-shelf systems. Event buses like Kafka make it easy to add new connections. Instead of connecting each system to each other system, you just connect everything to the event bus. It would be great to have a Kafka Connector for Airtable so we can stream out every single update to other systems that care about them. Other databases like Snowflake and Redshift have connectors. There are two ways to build this on the current system: the Script app and the API. Both approaches work, but they involve a lot of custom coding. It would be great to have an officially-supported option.
Hi all,Hoping someone can help me with this,I have a table with a list of brands and a score for each brand. The brands are labelled by category, some brands have multiple categories. I want to be able to automatically rank these brands by their score, and have that rank update if I filter.E.g if I filtered to just 'makeup' the rank would update to only rank the brands categorised as makeup.Included an example table that's simplified,Hoping this is possible!Thanks in advance,Charlie
Hello dear members of the community, I hope you’re doing well. I am requesting your help because Airtable removed the “editable shared view” that I was using before. I therefore need to find a workaround. I would like to use a script, so that when a partner edits a Linked Field (here ‘Status’) in his Table View, it will directly compare its value to the Status of the client in my Lead Table (lookup field) to update it, based on the one the partner selected. I have been able to prepare what I want using VSCode but I know nothing about scripting in JS or JSON. Could someone please help me ? I am adding some pictures to show the structure and what I imagined. Thanks a lot in advance for your help, Pierre
I am looking to export data from my airtable into JSON format. I am working with a Firebase Application, and I want to be able to collect data in AirTable, export it, and then dump it into a Firebase JSON based Database. Has anyone written a script/block/app that takes appdata and puts it into a JSON format? Thank You
I'm trying to generate some content using OpenAi's new ChatGPT API and I'm having an issue with updating the record field in my table with the response from their API. I have no idea why but for some reason I can't update the Long Text Field with the string in their response payload. Here is my script. Weirdly, it will work if I do a regex search using `exec` on the response first and then try to update the record... but it's only the first paragraph. // generates blog post content let table = base.getTable('Blog Posts'); let openaiUrl = "https://api.openai.com/v1/completions" let record = await input.recordAsync('select a record to use', table); if (record) { // construct the body let body = { "prompt": "Write a 1,000 word blog post about how to become a " + record.getCellValue("Trade") + ".", "temperature": 0.7, "max_tokens": 1024, "model": "text-davinci-003", "top_p": 1.0, "frequency_penalty": 0.0, "
Hi, I created a custom extension and a button to call this extension from a specific record. I would like to use a field from that record in my code, but I keep on getting React errors because of the order in which it is loading.I can't use record.getCellValueAsString within a useEffect hook to capture when useRecordActionData is loaded as it is considered using a hook within a hook.My end goal is to set number to the value in the Phone field of the selected recordTypeError: Cannot read properties of null (reading 'getCellValueAsString')Any ideas would be helpful. const [number, setNumber] = useState(""); let recordActionData = useRecordActionData(); let base = useBase(); let tableId = recordActionData == null ? "null" : recordActionData["tableId"]; let recordId = recordActionData == null ? "null" : recordActionData["recordId"]; let table = base.getTableByIdIfExists(tableId); let record = useRecordById(table, recordId); setNumber(reco
I am using a modified version of the currency conversion script kindly provided in this thread https://community.airtable.com/t5/development-apis/custom-currency-calculations-using-scripting-panel/td-p/136067 by @Vivid-Squid but I don't want to have to run the script each time and select which record I want it to run on. What I'm after is that when I input an amount in the 'Amount (GBP)' field it automatically runs the script to populate the 'Amount (Home Currency)' field.Any ideas how I do this?My script looks like this (it basically converts an amount in GBP to equivalent amount in the users local currency): let table = base.getTable('Currency'); let record = await input.recordAsync('Pick a record', table); let currencyType = record.getCellValueAsString("Local Currency"); let apiResponse = await fetch(`https://api.exchangerate.host/latest?base=${currencyType}`); let data = await apiResponse.json(); let conversionRate = data.rates.GBP; let result = await tabl
I'm looking to see if the solution below is viable to develop as a script inside Airtable.We use a loans table and a transactions table to manage a ledger in Airtable. In the transactions table, users enter either capital advances (loans out to clients), or capital reductions (payments against the principle). We also have interest only payments and a few other types for bounces and reverses in this table, but for this all we really care about is the principal impacting records. This goal of this script is to calculate the accrued interest between any two principal transactions and run this daily to update and hard code it so we always have a daily total of interest accrued on each account. Here is the rough flow I made in make.com (although it takes too many operations) List all active loansIterate through each loanGet loan informationList all principle transactions from the first to lastIterate through principle transactionsGet the first prin
Right now I have a multiple select field as follows: The script I’m trying to run has already identified the record IDs of all records with “Split Invoice” as a status. What I’m trying to do now is to remove that split invoice status and leave the rest (For example Estimated, Invoiced, those can all stay). What’s the best way to do this? All I can think of is to create an array of all statuses except for “Split Invoice” but I’m not sure how to write the syntax for that either. Code below: let table = base.getTable("Items"); let queryResult = await table.selectRecordsAsync(); var rec_IDs = [] var rec_names = [] for (let record of queryResult.records) { try { for (let status of record.getCellValue("Status")) { if (status.name === "Split Invoice") { rec_IDs.push(record.id); rec_names.push(record.name); } } } catch(e) { { continue; } } } // Script operations go here // As a fin
I'm trying to do a simple post request with Ruby and net/http but it keeps throwing the same error, here's my code: require 'uri'require 'net/http'data = { fields: { "Video Title" : "Top 10 funniest videos of 2022" }}uri = URI(https.....)headers = { 'Authorization': 'xxxxx', 'Content-Type': 'application/json'}http = Net::HTTP.new(uri.host, uri.port)http.use_ssl = trueresponse = http.post(uri.path, URI.encode_www_form((data), headers)puts response.body # {"error":{"type":"INVALID_REQUEST_BODY", "message":"Could not parse request"}} I've tried a bunch of things from google including downloading Ruby air table gems but they always throw the same error, I have a hunch that the object is not properly structured, If I send an empty object I get a different error: data = {}....response = http.post(uri.path, URI.encode_www_form((data), headers)puts response.body # {"error":{"type":"INVALID_REQUEST_MISSING_IELDS", "message":"Could not find field \\"fields\\" i
I have a board where I track ice cream names and the flavours they come in. Names are self generated where are flavours are common names such as vanilla or chocolate and so on.I want to use the npm airtable code here:https://www.npmjs.com/package/airtableand what I want to achieve is if a new flavour is added to the list of flavours, I want to also add this new flavour to the list of options available on the Airtable multiple select field. I am trying to mimic the code here:https://airtable.com/developers/scripting/api/field#update-options-asyncconst table = base.getTable("Tasks"); const selectField = table.getField("Priority"); await selectField.updateOptionsAsync({ choices: [...field.options.choices, {name: "Urgent"}], });However using the npm package it seems these functions are not available.I also tried using Curl as below:curl --request PATCH \ --url https://api.airtable.com/v0/meta/bases/{baseId}/tables/{tableId}/fields/{fieldId} \ --header 'Authorization: Bearer {myToke
Hi All, I would like to use the Airtable API to create a new table in an existing base. I've tried using Python/ PyAirtable as well as https requests via Postman. The API reference uses the following:https://api.airtable.com/v0/meta/bases/{baseId}/tables However, the last bit seemed rather strange to me plus I'm getting the following error: { "error": { "type": "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND", "message": "Invalid permissions, or the requested model was not found. Check that your token has the required permissions and that the model names and/or ids are correct." } } I'm using a personal token, with the required scopes (i.e. schema.bases:write)And the following payload (copied from the example): { "description": "A to-do list of places to visit", "fields": [ { "description": "Name of the apartment", "name": "Name", "type": "singleLineText" }, { "name": "Address",
Hello!I am getting error while requesting api - using your javascript examplevar Airtable = require('airtable'); var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('XXXXXXXXXXXXXXX'); base('Settings').find('recKrP4fJsCmnavbd', function(err, record) { if (err) { console.error(err); return; } console.log('Retrieved', record.id); });GET https://api.airtable.com/v0/undefined/Settings/recKrP4fJsCmnavbd? 404AirtableError {error: 'NOT_FOUND', message: 'Could not find what you are looking for', statusCode: 404}
Hi All,I am looking for a FIND or SEARCH formula to use in a GET URL.I need to lookup an ID, lets say "1234" and that ID is within a Multiple Select Option Column.the column on the table is a lookup and has multiple ids all in a string. example: 1234, 3563, 235234, 1435I am wanting to do the lookup to find the Record that the "ID" is within the multiple ids.The formula i'm using now, is looking up a Single entry, not an entry within multiple.What would my URL Formula Looklike?Here is what i'm using now.api.airtable.com/v0/"APP"/"MYTABLE"?filterByFormula=FIND("ID",{Client+ID})&maxRecords=1&pageSize=90Thanks
Before starting this, I will say I have no background in writing script. Any script/code I have posted was created using OpenAI API.What I am trying to create is an automation that upon an update in a selected Single Select Field will begin an automation that utilizes a script to input today's date & time in an adjacent Time/Date field.When I entered the code below into the Edit Script window and ran a test, the test failed with an error stating "ReferenceError: document is not defined at main on line 12" Can anyone provide feedback of what I need to change to make it work? var today = new Date();var options = { timeZone: 'America/New_York', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true};var timeString = today.toLocaleString('en-US', options);var dateString = today.toLocaleDateString('en-US');var dateTimeString = dateString + ' ' + timeString;var dateTime = document.createElement('div');dateTime.innerHTML = da
Hello there!My goal is to get a video from my Airtable record and Transform it with Cloudinary.I've tried using the Airtable "Search" and "Watch records" module(both successful at picking up the right record), and then retrieving with Make's HTTP module as well as directly to Cloudinary's Upload module.Both HTTP & Cloudinary modules seem to be failing at retrieving anything with the Airtable URL. Do you have any tips on where I am going wrong? New to APIs in general so it's tricky for me to troubleshoot on my own.
Hi! I would like to write a script that automatically creates time slots one week in advance. These time slots are every Tuesday and Wednesday from 9am to 2pm (6 time slots/day). For now, I type them manually but there is certainly a better way… Let me know what you think :slightly_smiling_face:
Dear community,I'm seeking your help on this critical matter:My client is in Europe, it is a GDPR breach if their data leaves Europe, does Airtable has storage in Europe? My client needs to upload videos to our tables. The attachment bucket seems to be a S3 bucket in the US. Do you have a quick workaround for this matter? Happy to provide our own data storage on S3 which is in Europe.If we don't resolve this we have no choice but to move away from lovely Airtable :((Thanks
Hey everyone! Excited to join this community as a developer.I have submitted my app for the Airtable Marketplace on 21 November, but I still haven't heard from the review team. Is it normal for app reviews to take this long? What's the usual turnaround time?
Hi, I am trying to create a rather simple table view of linked records with some editing capabilities. As far as I managed to discover, the grid element is not available in the SDK, so am using using the Primereact library. It is going pretty well overall, expect that I cannot get primeicons to be displayed. All I get is a square instead of the actual icon (similar to what is described here) I am fairly new to React and frontend development, so perhaps my question will not make sense to everyone and I am not sure this is even supported, but I’ve seen that some people are using primereact with Airtable SDK, so I am thinking there must be a way to display these icons?
Writing valid .jpg URLs to an attachment field - one of them is saved as normal, one of them fails to show a preview whilst loading, then gets cleared completely. I saw it 1st in Data Fetcher and then wrote a script to reproduce it: // This URL is fine const url1 = 'https://upload.wikimedia.org/wikipedia/commons/7/7a/Galileo_moon_phases.jpg'; // This URL does not work for some reason const url2 = 'https://www.haven.cz/_scripts/slir/w1200-h1200/eshop/batohy-hydrovaky/luminite-ii-18l-green/1-batoh-luminatte-ii-green-male.jpg'; const table = base.getTable('Table 5'); let query = await table.selectRecordsAsync({fields: table.fields}); for (let record of query.records) { await table.updateRecordAsync(record, { 'Image1': [{url:url1}], 'Image2': [{url:url2}], }); } console.log('Done') Here’s a video of the issue: Loom | Free Screen & Video Recording Software | Loom @Will_Powelson @SeanKeenan please let me know if there is someone better from the Airtable team t
The tutorial by Jonathan Bowen has been incredibly helpful. So far my script calculates the sum of the “Amount” in the “Monzo Transactions” table. My next step is to figure out what to add to the script so that the next part of the process will update a record in the “Monzo Account Balance” table which inserts the sum every time the script runs. (either in the “Mozo Balance” field or “Total Amount field”) If anyone can offer the script that would need to be written to complete this process (or advice) I would appreciate it. Thanks
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.