Need development and API help? Ask your questions here!
Recently active
Hey! I’m trying to send an array of customer data to an API webhook on a external service (e.g. Sendgrid/Zapier), using a POST request in a scripting block. Using the basic fetch() function, CORS is preventing it to work. Using a CORS proxy like https://cors-anywhere.herokuapp.com/ isn’t an option because I don’t want to send sensitive data through this service. What’s the best way to fix this? Best Dominik
Hey AirTablers, My marketing manager would like to have a single view of all her marketing tasks in a single table. The marketing tasks are spread out across multiple bases. I have already converted the tables into sync tables and have brought them all into a single view. Now I would like to have all the records in each table of the new bases aggregated into a single table view so we can have meetings and not hop around. It would be great if we could make changes to this view ad have it sync back to the other tables but that is not crucial. However, having all the records in one view would be great. I used a script to pull the records from each table but would like to aggregate the records before outputting. The code below demonstrates what I have accomplished so far: let table1 = base.getTable("The Union"); let query1 = await table1.selectRecordsAsync(); let table2 = base.getTable("Suli Fund"); let query2 = await table2.selectRecordsAsync(); let table3 = base.getTable("Solo Magic")
Really new to scripting and I feel like this should be possible but I’m not sure how to manage it. When I copy and paste the information from my source (a website) into my table, it obviously only fills up the first column (“Name”) with not only the names, but all of the copied info into individual rows. What I would like to do, is create a script or automation to cut and paste the information between the actual names into the second column (called “Notes”) which is where I have automations to pull from that content and auto populates info into the corresponding fields. Here is my attempt to visually show what I am trying to accomplish. To be clear on how the data is pasted on the table, just before the actual name (which is unique) there is always the same field type. It begins with “Date” and ends correspondingly. I want to collect all of the text in the fields between each actual name, and paste it into the “notes” field of the name that it belongs to (just above it.) Eventually I
Hello Community, I was able to connect Typeform to Airtable, however when I choose a “Picture Choice” field in Typeform, my table doesn’t recognise the field and I cannot connect the Typeform field to my column in Airtable even when I make a ‘multiple select’ column out of it. Does anyone know how to connect my picture choices from Typeform to multiple select columns? Much appreciated, Bruno
I currently have a VueJS project up and running locally. However, I am now trying to get the data stored in my Airtable Base and use a Vue JS v-for loop to display it. I have installed axios as a dependency (using npm), followed the steps in this tutorial Airtable + Vue.js for Static Websites - TaxJar Developers and now have a v-for loop, using a slightly different HTML tag, in my template. After inspecting the DOM I can see that the for loop prints a span tag for every record I create in my Base. In one way my JS must be connected to the Base, However, these span tags are empty and I am still struggling with getting the data from the BASE. <div v-for="record in records" :key="record.id"> <span v-for="(col, colIndex) in columns" :key="record.id + '-' + colIndex"> {{record.fields[col]}} </span> </div>
In Baserow (another online spreadsheet), it’s possible to create as many tokens as you need to access your bases/sheets/tables. Each token has specific access rights (create, read, update, delete) for each table, so that way you can put some API keys in your code without worrying about the more sensitive data getting exposed. It would be great to see that kind of feature with Airtable.
Hi there - I have it working to update individual records in updateRecordAsync but it’s replacing the cell values. How can I keep from updating the cell values but just update by adding? This is for a Look-Up field so it requires a different format than string.
I am trying to push multiple values in a look-up table at once to a single update field. So far I am filtering the record, finding the IDs of the values in one of the values. Pulling out specific ones and then I am not sure what to do to update multiple values inside of a new field with a look-up table. Note, I didn’t copy and paste properly. The syntax is not the problem, the problem is that I do not know how to get the multiple look-up values to update. //// CODE BELOW testID = “recZnhmuRKPJEvVE0” let t_results = base.getTable(“results”)// let thisrecord_as = await t_results.selectRecordsAsync(); let thisrecord = thisrecord_as.records.filter(f_record => f_record.getCellValueAsString(“cli_res_id”) ==testID ); for (i=0; i<thisrecord.length; i++) { let this_spec = thisrecord[i].getCellValue(“Input_Look_Up_Field”) let this_fm_id = thisspec.id var pushval = { fields: { "UpdateField": [{id: this_fm_id}] } } } if (pushUpdates == 1) { await t_Client_results.updateRec
Has anyone used nocodeapi and is it actually a secure way of accessing my Airtable API without doing a lot of back-end development?
I have some multiline text I for some reason do not seem to be able to split into parts. My text is: “506070 80” let arr = multi.toString().split(" "); console.log(arr) //["506070 80"] Does anyone know how I can split this? If i make real space in the multiline text it splits as expected.
Hi there - Currently, I am trying to do a data automation script to check if values meet specific criteria and then make recommendations for what is there vs what isn’t. The script is working as intended, however my CPU time is exceeded (3438 ⁄ 1000ms). Any recommendations on how to fix?
Here’s what I have let table = base.getTable("-Some Matter Name-)"); let field = table.getField(“Request Date”); await table.updateRecordAsync(record,{ “Date Requested”: new Date() }); I haven’t done a lot of programming for a while now, so I sort of have an idea but not exactly how to write it
I’m surprised I can’t find anyone else having asked about this; is there any scope for: increasing the PATCH limit from current max of 10 or making it explicit in API documentation that PATCH is limited to 10 … so users aren’t left troubleshooting an error that can be quite subtle (I had to tell browser console to unfold several layers of nested error logging).
I am just curious if it is possible to write a script that uses a multi select date picker calendar to create bulk records with same details via script. Use case - I want to create jobs on specific dates, times, locations, etc. in bulk. I can see this being used for a ton of different use cases though. Example - Select Multiple Dates with Calendar Picker - (1/13, 1/20, 1/21) Shift #1: Enter Employee Quantity per date - (2) Fields (option to pick the fields that need data added) Enter Location - (123 Main St) Enter Start Time - (07:00) Enter End Time - (15:00) + add another field Shift #2: Enter Employee Quantity per date - (1) Fields (option to pick the fields that need data added) Enter Location - (123 Main St) Enter Start Time - (09:00) Enter End Time - (17:00) Enter Event - (Basketball) + add another field + add another shift So my created records would be a total of 9 records: 1/13 - 0700-1500 - 123 Main St 1/13 - 0700-1500 - 123 Main St 1/13 - 0900-1700 - 123 Ma
I am trying to use AirTable as part of a node.js app to lookup users. Here is how it should work: The table has multiple columns, including one for ID. The API looks up the user ID by listing all and filtering by ID. If there is no record found for the user ID, it will create a new record for it. I tried to attempt this using the code below, and it works fine when a user is found, but when it doesn’t, it outputs a 422 error with the status text “Unprocessable Entity”. I would really appreciate if someone could show me how to do this, or show me what I did wrong in my code. (The code is in Node.js and I used request and axios because I was copying existing code that was in Node.js request and I only know how to use Axios) request({ headers: {'Authorization': 'Bearer <TOKEN>'}, url: `https://api.airtable.com/v0/<APPID>/Users?maxRecords=1&filterByFormula=${encodeURI(`{ID}=${<ID OF USER>}`)}`, json: true },function (error, response, bod
Ok so I know that this would be fairly complex, and may not be possible, but if it is, how would I go about making a login system using Airtable. I am trying to see if I can use Airtable as the backend database to something, and I’d like to try and refrain from using an SQL database, if possible. Of course, if completely necessary, I am completely comfortable doing so. Any help is appreciated.
Hey there. I have a custom app that’s installed in a couple Tables. I would like to convert it to a Marketplace app so that others can install it. How can I make that happen?
I have a bunch of property data I am getting each month for multiple properties. My end goal is to build monthly summaries for each property like this: Avg price for each floor plan(1br,2br,studo) amount of units available at by floorplan (1br,2br,studio) Eventually I’d like to put these calculations in some type of chart to compare these metrics at these levels. Is there a way to run these calculations in Airtable dynamically? Maybe using scripts? My goal is to create these charts where users can assess these trends. Any advice would be greatly appreciated!
I’ve read in this thread that the Airtable block CLI requires Node versions below 15. Unfortunately, I’m on an Apple Silicon Mac trying to help my fellow developer with a custom app project. As it turns out, as far as I can tell, Node 15 is the minimum that builds on Apple’s arm64 architecture. This in effect means that until block is updated to support Node 15, I cannot help build custom apps. I have tried installing older versions of Node with NVM, and they fail to build. Is there any way that I can use block with Node 15, or any idea of the timeline for it to be ready?
I’m trying to limit the available choices when picking a field for my app. Looking through the FieldPickerSynced documentation I found “allowedTypes” property. Per and example I found here: Error: Cell values for field X are not loaded - #3 by Maximilian I added the “import {FieldType}” line. I can pick a table, but I can’t pick a field and it doesn’t limit my choices to a specific field type. If I removed the “allowedTypes” property, I can select any field. The table I’m testing this on only has two columns (autonumber, link to record). What am I missing? import { initializeBlock, TablePickerSynced, FieldPickerSynced, useGlobalConfig, useWatchable, useLoadable, useBase, } from '@airtable/blocks/ui'; import {cursor} from '@airtable/blocks'; import {FieldType} from '@airtable/blocks/models'; //<--ADDED THIS LINE import React from 'react'; function CopyDataset() { // YOUR CODE GOES HERE const base = useBase(); const globalConfig = useGlobalConfig(); const tableId = globalConfig
Hello out there, I am not experienced in writing code and I am hoping that someone can help me make a workflow dream come true! I’ll do my best to explain what the goal is below, but please let me know if it is unclear. In my Program Management base, I recently followed this example to add tasks from a Task Template table to specific projects, just copying/pasting the code: https://www.airscript.dev/2020/10/04/generating-tasks-for-projects The code copies every task from the Task Template table into the project. What I am hoping for help with is: We have several different project types, each that involves its own set of tasks. Is there a way for me to add to the above code so that I can pick a specific set of tasks in the Task Template table, based on an identifier? Currently, to separate out which project types that tasks are associated with in the Task Template table, I have a ‘multiple select’ field that includes types like Solo Exhibition, Juried Exhibition, Traveling Exhibition, e
Happy New Year! We’re excited to open up a beta for a new remoteFetchAsync function in the Scripting App. One of the most common issues we see users run into when writing scripts is in trying to use the fetch API to communicate with an external service. Because Scripting App scripts run directly in the user’s browser, fetch requests will be blocked by the browser if the target server doesn’t support Cross-Origin Resource Sharing (CORS). The new remoteFetchAsync method transmits the request from Airtable’s own servers rather from the user’s browser, thereby getting around CORS issues. remoteFetchAsync works very similarly to fetch and expects the same inputs, except for a handful of “gotchas” stemming from the fact that this is run from a backend. We’d love to get your feedback on this new API. To sign up for the beta, fill out the form here and we’ll enable the beta on your account. You’ll then be able to check out the documentation for remoteFetchAsync here.
Hi guys, So I have an “email address” field which when a new entry is made an email is triggered and sent to someone. I’d like that email to be sent after a certain amount of time… like 5-6 hours. How can I write that as a script?
Hi, Here is my code using record.get([“Attachments”]); : function showListe() { base("Works") .select({ view: "Grid view" }) .eachPage(function page(records) { records.forEach(function(record) { var li = document.createElement("li"); li.textContent = record.get(["Attachments"]); document.getElementById("root").appendChild(li); }); }); } which gets me : [object Object] [object Object] If i do record.get([“Attachments”][“url”); i get nothing… Help!
Hi, I’m having trouble filtering data from a table that is linked to another. I am getting the id of a company and when I want to show all the branches of the compant it return an error or and empty array. I am trying to filter them by the ID of the company. The structure of the branches is: { ‘ID_COMPANY’: [ someId ], ‘COMPANY’: [ companyName ] } What I was trying to do was: filterByFormula={ID_COMPANY}="someId" and it didn’t work, but when I did this: filterByFormula={COMPANY} = "companyName" it did work. Blockquote Can you help me?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.