Need development and API help? Ask your questions here!
Recently active
I am running into an issue where the records that I’m updating with the app on the iPad are not getting updated in the actual base. Let me explain. I use Airtable to inspect products. I have fields for photos, multi select fields, note fields etc. the record already exists in Airtable and I search for it and update it. Sometimes when I update it, the iPad will act like it’s updating everything as I’m doing it but not actually update in the base. I am typically running 4-6 mobile devices in different tables at the same time all working on different records. Does the Airtable app make a api call and is it possible I’m hitting the 5 per second limit? Is there something anyone can recommend trying? Thanks.
Is it possible to pass a variable to a base in the URL? I’m looking to send a URL to a client, embed their Account ID in the URL, and then have them be able to click a URL or button that also includes that Account ID, so it would need to be accessible in formulas and buttons.
I have most of my app built in AT and I’m loving it but I have hit a snag. I was using Zapier Dev console to authenticate with Oauth2 with the intention of posting XML but it only allows JSON for some bonkers reason. So that solution has hit the breaks. My feeling is that I no longer want to use a third party connector and will instead use the scripting app to authenticate and then output the XML direct from inside AT itself. If that isn’t possible then I was looking to use Google Sheets/App Script as a go between. I did look at the API solution, Datafetcher but haven’t had a response back by email so not sure it’s there thing. Any advice or devs who can solve this and I’m all ears/yours.
Hi all, I’ve been using Airtable for a few years and have finally decided to try my hand at writing a few scripts to streamline our workflow. I’ve coded a fair amount before but am new to JavaScript, so please excuse my ignorance. My current project is writing a script that will be called from a button field. This script will make a request to a taxonomic database, retrieve classification data for a single creature, and populate a series of self-linked columns within the table. I have a working script that gathers the data and reformats, but I’m stumbling across the last step of assigning data to the linked fields. Throws this error after the last line: Can’t set cell values: invalid cell value for field ‘kingdom’. Cell value has invalid format: must be an array. Linked records field value must be an array of objects with property ‘id’ corresponding to linked record id. I understand that the issue has to do with needing the data to be formatted as an array for linked fields, but I’m
Hi everyone, I want to use metadata API to get details of all the bases used in my project. I hit the following API with my auth token- https://api.airtable.com/v0/meta/bases Reponse- {“error”:{“type”:“NOT_FOUND”}} Kindly help and do let me know if something is missing from my end. Thanks in advance!
Hi community! I’m setting up a script so I can mark order line items as “Delivered” by ticking a checkbox on the order tab. I’ve find a really useful post where a boiler template of code was provided (can’t seem to find it back). // Setup const config = input.config() const ordersQuery = await base.getTable("ORDERS").selectRecordsAsync() const orderLinesTable = base.getTable("ORDER LINE ITEMS") const orderLinesRecords = await orderLinesTable.selectRecordsAsync() const checkedOrder = ordersQuery.getRecord(config.recordID) // Collect linked tasks and find those that aren't checked let orderLines = checkedOrder.getCellValue("ORDER LINE ITEMS") let uncheckedTasks = orderLines.filter(linkObj => !orderLinesRecords.getRecord(linkObj.id).getCellValue("Mark As Delivered")) // Build array of updates let updates = uncheckedTasks.map(linkObj => { return { id: linkObj.id, fields: { "production_status": DELIVERED (PARTYSPACE) ✅ } } }) // Update t
Hi, I’m looking for an app to build an Airtable Web App/Website, where the user can order directly from the application, with an add to cart button and thus a global cart payment. I’m currently using Softr and I’m new to it. There is the ability to add payment button but the user has to pay for each product separately. Maybe I should create an automattic table for the orders, so that I can calculate the global amount, instead of ordering each product, and thus create an paymetn button for the global amount. Is there a simpler way to do that ? I’m stucked
I would like to use a scripting automation to check if a record exists. i.e. Does John Doe exist already in the Name column? The results should be simply yes or no. I’m not great at scripting and am looking for some fast track help!
Is there a way to duplicate a base with the API?
Hello, Given: var Airtable = require('airtable'); var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('app6wt6DBFn40vPRg'); base('Project List').select({ // Selecting the first 3 records in Master List: maxRecords: 3, view: "Master List" }).eachPage(function page(records, fetchNextPage) { // This function (`page`) will get called for each page of records. records.forEach(function(record) { //do stuff }); fetchNextPage(); }, function done(err) { if (err) { console.error(err); return; } }); How can maxRecords be determined dynamically via an API call? Is this the only way? Get the number of records in a table via API API Yes, a webhook with a script action. Even with a very full table, this will run in about 5s, whereas, an API process might require 15 seconds or more and will slow even more at scale. I tested the following on 37,000 records with 58 fields. I believe that by selecting fields: you are essentially ens
I have two tables: Member Profile Update Profile Members can submit updates to their profile using a form that goes to the Update Profile table. They pick the member to update when they submit the form, linking the two records. I then review the updates and would like to click a button that runs a script copying the details from Update Profile to overwrite the linked record in Member Profile. Can someone help point me in the right direction for how to script this? I’m particularly lost as to how to read the contents of a specific cell from the current record. Thanks!
Hi there is there any option to retrieve column names? Something similar to Google Sheets: Method: spreadsheets.values.get if range A1:X1 provided, then column names are returned.
As the title says. How would this be written differently to avoid this error? My test environment only had 10 records, tonight was its first scheduled automation run and it grabbed 95 records for this process. // After Club Automations let table = base.getTable(“Children”) let view = table.getView(“Present”); let query = await view.selectRecordsAsync ({ fields:[“Pts this week”, “Spent Today”, “Total Spent”, “Points”, “Attendance”, “Last Club”], sorts: [ {field: “Pts this week”}, ] }); let totes = 0; let today = new Date() for (let record of query.records){ // Multiply 'Pts this week" by 10, add to ‘Points’, Subtract 'Spent Today, write new total to “Points” field totes = 10 * Number(record.getCellValueAsString("Pts this week")); totes = totes + record.getCellValue("Points") - record.getCellValue("Spent Today"); await table.updateRecordAsync(record, {"Points": totes}); // Add ‘Spent today’ to ‘Total Spent’ and clear ‘Spent today value’ totes = record.getCellValue("Spent Today") + recor
Hi there, Can anyone help me? I have built a custom app for a customer (about 2 years ago) and I am now working on a different computer. I do not have a copy of the files. Is there a way I can download the code if I know the security details?
Hello! I’m writing a custom app to print information from my base on adhesive labels using a Zebra TLP2824 Plus printer, via Zebra Browser print. I’ve written the script below to gather, format and print the required information, but my amateur at best programming knowledge is holding me back a little bit. The functionality I’m going for is the following: once a button in an Airtable view is pressed, labels print for all records linked to a parent record. This works when the app is loaded from the button itself, but if the app loads without the useRecordActionData already loaded, I can’t get it to load without it throwing the following error: Rendered more hooks than during the previous render. Which is obviously right, because I’m accessing more data than requested initially, but I can’t figure out how to work around this! I’d really appreciate some help. Thanks! import {initializeBlock, useBase, useRecords, useRecordById, useRecordActionData} from '@airtable/blocks/ui'; import ZebraB
The documentation for Script Actions states the following regarding the output API: The output API can currently return a maximum of 6MB of data. There are three ways I can see this being interpreted, and I’m not sure which is correct: Each individual call to output.set() has a 6MB limit Within a single Script Action, multiple calls to output.set() have a cumulative limit of 6MB Within a single Automation with multiple Script Actions, all Script Actions put together have a cumulative limit of 6MB for calls to output.set() Does anyone know which of these is correct?
Good morning, Airtable Community! I am getting into some Python automation scripts and working with Airtable for the first time (translation: relative n00b all around). I am looking to programmatically create a couple hundred records at a time, and each record has a thumbnail JPEG image that I want to include as a Screenshot attachment. I understand that Airtable requires a URL to the JPEG rather than a path to the local file, but so far all of the cloud storage options that I have at my disposal (well, both - Google Drive and Dropbox) construct a unique URL with a long string of arbitrary characters that I don’t yet have access to in my script. My question - how do you smarter folks accomplish this, is there a scriptable step that I am missing? OR, is there a service or trick that I can use to make a consistent, identifiable URL (i.e. http://somestorage.com/SameNameAsTheLocalFile.jpg")? Thanks for any further insight that any of you can provide! Steve
Hi there, I’m hoping to get some help with a workflow I’m trying to figure out. I have a base with records that include a checkbox for an approval, as well as a field who approved it, and a last modified time stamp to track when it was approved. So far I’ve been able to base this off an automation that when the Status (drop-down) moves to “Ready for Review”, the Slack message goes out and asks for a review. Now what I’d like to add is a link/button that will allow the person or people receiving the Slack message to click it, and it should then change the checkbox to checked for the approval (and ideally noting who it was; but willing to let that go if it’s too hard). I’ve been reading up on webhooks and similar solutions, but wanted to poll the community what could be a good way to do that. Thanks in advance for any help. Kind regards, Paul.
Hi, Noob scripter here I’d like to create an automation based on a response from an email, that will trigger an update on my airtable. This is how I want the flow to work. Based on a status I send an email that contains a link for the receiver to click once a job is completed. this link is the webhook I generated via the airtable script. once clicked this webhook updates the status of the airtable record. After doing a lot of reading on the webhook I now understand that you need to create a POST request with an object (excuse my lack of knowledge I’m very noob at scripting) or payload for the webhook to deliver. This has raised a few questions for me. How do I script the payload to be inserted into this webhook for the user. i.e. {"record": Record_ID, "status": "accepted"} Are webhooks unique? because I’ll be sending out unique webhooks and I worry that the URL changes to the last updated record id. Is my logic on the right track with this?
I recently came up with a useful tool for my Airtable toolkit, and I thought I would share it in case others may find useful. On a recent project, I needed to transform a large amount of data into a JSON object for use by external applications. Unfortunately, I quickly ran up against Airtable’s 100,000 character limit on text fields. It occurred to me that if I could find a way to compress the JSON data, I could fit more data into a cell and wouldn’t have to worry about the character limit. There are a handful of javascript libraries out there for text compression, but what I settled on using is the lz-string.js library. It is based on LZW compression, and was designed for use on mobile browsers, meaning that it is fast, and optimized enough to use in Airtable Automations without going over the CPU time caps. Due to its repetitive nature, JSON data compresses very well—results will vary depending on the structure of your data, but with my current data I’m able to fit the equivalent of
I wrote my first script, tested it and it works ! I Used the Script template from " Table optimizer" to convert “wide” table to “long” one. Now I am trying to utilize this script in my Automation routine using trigger and it doesnt run. I coped and pasted script into Automation, but when I test it, it give me error: TypeError: input.config.table is not a function Any help ?
I have written a little vue.js app. I need it to access more than 100 records in my table though. How do I do that? Here is my code.var app = new Vue({ el: ‘#app’, data: { items: [] }, mounted: function(){ this.loadItems(); }, methods: { loadItems: function(){ // Init variables var self = this var app_id = "XXXXXXXXXXXXXXXX"; var app_key = "XXXXXXXXXXXXXXX"; this.items = [] axios.get( “https://api.airtable.com/v0/"+app_id+"/Donor Honor Roll?view=Grid%20view”, { headers: { Authorization: "Bearer "+app_key } } ).then(function(response){ self.items = response.data.records }).catch(function(error){ console.log(error) }) } } }) Any help is appreciated.
Hello, i tried the resp.json, resp, resp.text but the result of my api request hasn’t shown, sometimes it show the redirection:false when i use the resp.json and resp.text it show only “function” const ws = "https://api.writesonic.com/v1/business/content/ai-article-writer-v2?&end_user_id=test1&engine=economy&language=en"; let config = { method: 'post', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-API-KEY': 'apikey' }, body : JSON.stringify({ "article_title": atitle, "article_intro": asection, "article_sections": [ 'Tourist information about the city of Vitrolles in the department of Bouches-du-Rhone 13', 'Tourist information about the city of Abbeville in the department of Somme 80', 'Tourist information about the city of Ablon-sur-Seine in the department of Val-de-Marne 94' ] }), data : data }; try {
I’m struggling to pass an empty date to Airtable without throwing an error. My integration is with python, and so far I’ve tried an empty string and Python’s None (i.e. null) keyword. But with the None keyword I run into this error… ‘422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/…[Error: {‘type’: ‘INVALID_VALUE_FOR_COLUMN’, ‘message’: ‘Cannot parse date value “None” for field Effective Date’}]’) Passing None to other fields clears the fields correctly so I’m really hoping this isn’t an API limitation where we can’t clear dates? Thanks for any thoughts!
Hi all, I have a form which sends data into a grid view. One of these columns has 7 options as a single select each with a rating number followed by a rating name. I created a column within the grid view that runs a script I wrote which essentially checks the input column and isolates the rating number in the new column for quick data pulls. However as our form inputs increase, I created an automation that would run this script every time a form was submitted and lately I have been getting the 15 mutations error. Would anyone be able to help me review my code and see if I wrote an unsustainable program? let table = base.getTable("Intakes/Submissions"); let view = table.getView("Partner Creator Survey External"); let csat = await view.selectRecordsAsync({fields: table.fields}); for (let line of csat.records) { let csatRating = line.getCellValue("CSAT Creator"); switch(csatRating.name) { case "1. Very dissatisfied": await table.updateRecordAsync(line.id,
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.