Need development and API help? Ask your questions here!
Recently active
Hello everyone and thank you for being such a helpful community! I’m trying to get Facebook Ads data to Airtable using Parabola.io, all new records, no links. I have this body: { “records”: [ { “fields”: { “Campaign Name”:"{Campaign Name}", “Ad Name”:"{Ad Name}", “Fecha”:"{Reporting Ends}", “Impressions”:"{Impressions}", “Amount Spent”:"{Amount Spent}", “Clicks (All)”:"{Clicks (All)}", “Purchases”:"{Purchases}", “Website Leads”:"{Website Leads}" }, “typecast”:true } ] } Using POST and Content-Type: application/json in header, but I get: { “error”: { “message”: “Invalid request: parameter validation failed. Check your request data.”, “type”: “INVALID_REQUEST_UNKNOWN” } } Sent request is: { “data”: { “records”: [ { “fields”: { “Ad Name”: “Ad 2”, “Amount Spent”: “1379”, “Campaign Name”: “ADC | jul. 20 | ADC | DCTO | RMKT”, “Clicks (All)”: “18”, “Fecha”: “2020-07-29”, “Impressions”: “838”, “Purchases”: “0”, “Website Leads”: “0” }, “typecast”: true } ] }, “headers”: { “Authorization”: “
There are an API to have record team discussion (chat)? thanks
My engineers use my account’s API key to POST information into our Airtable base. Sometimes the data doesn’t always come through, the POST request appears successful but the data won’t make it to the table. This happens a lot. I wonder if it’s because my engineer uses my account’s API key and since I have an open session using the base with my account Airtable gets confused as to how the same person is editing the base in two different ways…
Wanted to share this script in case it’s helpful for anyone else with a similar need. I initially came up with the idea so I could randomly review a list of records and assign single-select field values using buttons for each one. This is one of the first scripts I started with, and have come back to it with improvements as I’ve learned — thanks to the incredible help from some teammates :raised_hands: ! This version’s been edited for a general audience so that it’s hopefully adaptable to other bases easily :slightly_smiling_face: Note, it uses the Script settings beta, and to see what it looks like in a base, here’s an example in Airtable Universe. // SCRIPT SETTINGS let settings = input.config({ title: '👓 Random record reviewer', description: 'Pulls a random record, then prompts you to choose a select field option.', items: [ input.config.table('table',{ label: 'Table' }), input.config.field('field1',{
I’vs just updated my node version, and trying to init a new block. keep getting this error: Initializing block using https://github.com/Airtable/apps-hello-world template :x: Something failed! Cleaning up… :x: Error: a.isDirectory is not a function couldn’t find anything helpful when googled it.
I have a table (“Containers”) with 3000+ records and for each record I would like to do a Vlookup from another table (“F”) in the same way as is done in Excel. I came across the below script. The problem is the script runs out of time before it can update every record so I have to run the script multiple times. It seems the script is looking through all 3000+ records every time and not zoning in on the records that have not yet been updated. The result is I got about 2500 records updated but now the script only finds 10 or so to update each time compared to 150 at the beginning. I tried to use “Paul view” to limit to running the script only on un-updated records but it does not speed things up at all so maybe it is still running on all records. //Substitute “Containers” for table name which contains values //on which you want to run the vlookup let mainTable = base.getTable(“Containers”); let view = mainTable.getView(“Paul view”); let mainTableRecords = await mainTable.selectRecordsAsy
This previous post details accessing the special NODE_ENV environment variable within a Custom App. This is all well and good, but leaves me wondering if it’s possible to store/access custom environment variables through a custom app? Reading through the documentation/tutorials at Create React App, my guess is this is not currently possible in a Custom App because it’s run using block run instead of react-scripts and npm start? Attempting this by adding .env files in both the root directory ({block_name}/) and entry point ({block_name}/frontend) and running a console.log outputs undefined in the inspector. Am I correct in assuming that accessing .env variables (besides NODE_ENV) is not currently possible? Does anyone have any good workarounds/alternative solutions? At the moment, I’m just defining these variables as constants in their respective files. (For reference, I’m looking to use .env variables for two main use cases. 1) development vs. production server endpoint to send API req
Hi Airtable script gurus! I need help. I am working off of a code that searches for key words and returns results. The code works when var “districtRecord” is an input. However, I need to run the code on 10k+ records, so using the input would take forever selecting one at a time. I attempted to update the code to run through all the records in the table, and broke it. I keep getting an error saying there is a missing “)” on line 1. "SyntaxError: missing ) after argument list on line 1 at l on line 1 at Generator._invoke on line 1 at Generator.forEach.e. [as next] on line 1 at e on line 1 at s on line 1 on line 1 on line 1 " Here is the entire code: let districtTable = base.getTable(“Districts”); let districtRecord = await districtTable.selectRecordsAsync(); let searchQuery = districtRecord.getCellValueAsString(“Keywords”); let resultsField = districtTable.getField(“Results”); //this is the attempt to run through all records: for (let record of districtRecord.records){ async function se
Hi ! I’m trying to figure out why I can setup an URL but not a filename to the attachments when updating fields via API. Here’s my code, which doesn’t work but doesn’t provide error at all: for (var i = 0; i < result.airtable.selectQueryResult.rows.length; i++) { await lib.airtable.query['@0.5.2'].update({ baseId: `app84oJeleATU5N53`, table: `My bundles`, where: [ { 'Name': `${result.airtable.selectQueryResult.rows[i].fields['Name']}` } ], limit: { 'count': 0, 'offset': 0 }, fields: { 'QRCodeImage': [ { "url": `${result.airtable.selectQueryResult.rows[i].fields['QRCodeLink']}`, "filename": `${result.airtable.selectQueryResult.rows[i].fields['Name']}`, } ] }, typecast: false }); } Thanks a lot for any help
Is it possible to update a record without providing a record id. For example, in my table, I have another unqiue key (e.g. unique_id), Can I use it instead like the following? { “unique_id”: “1234567”, “fields”: { … } }
An extension of Airtable’s Currency Conversion script: Airtable Scripting Rather than assuming what currency you want to convert to, this script pulls in the list of all known conversions into its own table (using USD as the base currency). You can then create links to this table to pull out the corresponding currency conversion rate. Re-running the script updates the conversion rate, which then propagates to all linked records and calculations. Base in Universe at Currency Conversion Import Script - Airtable Universe
I am newbie to airtable and scripting We have a table to store our product inventory and associated photos. I am trying to write a script to download photos selectively based on user criteria. User will select a Item (Saree, Bottle), then he will select a brand (Karishma, Jonam) then he will select a catalog. Based on these selections, we want to download all photos. I have a schema product with Item Name Brand Name Category Name & Other Fields unfortunately not getting a clear idea how to use group and filtering together to achieve this. Looking forward to expert help
Hi everyone, I want to retrieve modified records through scripting app. Is there a script that gives me back the retrieved record so I can continue working with that record? For example if a certain field is modified it will store that field in a variable. Thanks!
Hi could anyone help me with the script to automatically populate a rich formatted long text field with checkboxes any time a new record is created? Haven’t been able to find anything else in the community Thanks!
Hi guys, I was trying to call my CircleCI endpoint from the custom app which contains only one single button with the following request: const deploy = async () => { const url = 'https://circleci.com/api/v2/project/bitbucket/xyz'; const token = 'asdasdsa21321423141adasdas'; const body = { branch: 'branchName', }; try { const response = await fetch(url, { method: 'post', body: JSON.stringify(body), referrer: 'http://airtable.com', headers: { 'Content-Type': 'application/json', Accept: 'application/json', 'Circle-Token': token, }, }); const data = await response.json(); console.log('response data', data); } catch (error) { console.log('error', error); } }; As a result, I am getting an error: Access to fetch at ‘https://circleci.com/api/v2/project/bitbucket/xyz’ from origin ‘https://devblock--adasd--vvy7sfo.airtableblocks.com’ has been blocked by CORS policy: Response to preflight request do
I am embedding a view on my website - one of the fields is a button with a script that adds a record in another table to log the button press timing and some metadata. However, as soon as I embed the table/view, the button field seems to be disabled on the embedded website, and can’t be clicked (screencap below) :thinking: Any ideas/advice on this would be greatly appreciated :pray:
Hi, I am trying to load all rows of a base. The code I use is: const airbase = airtable.base('XXXXXXXX').table('someTable') await airbase.select({offset: 0}).eachPage((records, processNextPage) => { records.forEach(record => console.log(record.get('someField'))) processNextPage(); }); I get this error below after 3 records have been printed on the console. I tried to add query parameters (maxRecords: 1000, pageSize: 100), but the result is always the same: 3 records are printed. When I set the pageSize to 1 I see that three records are printed as well (multiple pages are loaded, I assume), before it crashes with the same error. at /project/node_modules/airtable/lib/query.js:109:28 at /project/node_modules/airtable/lib/run_action.js:70:17 at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:58112) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch
Is there a way I can delete all records that are three days older than the current date using the API?
I have just started playing with blocks…err… apps Following the instructions, I have launched “block run” and obtained the message: :white_check_mark: Your block is running locally at https://localhost:9000 (this is in a virtual machine, so I have redirected port 9000 and I can reach the url in question) So far so good… However, when trying to enter this address in the block configuration, I was getting a connection error. The page in question could be reached in the browser, but the app would not want to connect. Upon inspection, I noticed in the console that the site was trying to reach the following file: http://localhost:9001/__runFrame/ping.gif and getting a “404”. So, if you happen to not have redirected port 9001 (not expected) as well as 9000 (expected), it will fail. Redirecting port 9001 makes it work. I would suggest fixing the documentation to mention this (Airtable Blocks SDK), or fixing the code. Cheers
Hi there, I’m attempting to integrate my airtable database api into a React project. I installed airtable using ‘npm install airtable’. I also followed all the directions on airtable.com/api to configure my api/base and create a function to list the records. However, when my app attempts to run that function, I get the error “Failed to execute ‘fetch’ on ‘Window’: Illegal invocation.” When I click on the error in dev tools, its source appears to be in the airtable base file–which I don’t have access to as it’s part of the npm package. I did see this topic mentioned in another post, and tried what was recommended there, however, it did not solve my issue. Has anyone else run into this issue and found a work around?
Goal: To connect the database on Airtable to QlikSense via the REST API and retrieve more that 100 records using pagination. Problem: Unable to retrieve more than 100 records at a time using the REST API Airtbale provides. We use Airtable to manage our databases and there is a need to visualize our data through Qlik. Airtable provides a REST API and Qlik provides a data source connector. Even though we are able to connect to the database via the REST API the main issue arises when we have to retrieve all records in the database. This has to do with the Airtable pagination. Airtable only allows 100 records to be retrieved and if more needs to be retrieved pagination needs to be used. Airtable provides a pagination type of offset however doesn’t provide additional details. The two ways we’ve been trying to approach this issue is through the. List item The Qlik data engine Using the Qlik connection tool The issue that’s been run in to constantly with this approach is that it says the
Hi all, Having a bit of issue with setting up an Automation. I was wondering if someone could help me? When a new record enters “Tab B”, I want it to link to “Tab A” if the ‘Vehicle Registration’ matches. “Tab A” will already have all Vehicle Registrations listed, so any new records entering “Tab B” will not be random or different. At the moment I’m having to manually click on the Linked Fields column in order to add the record from 'Tab B" to “Tab A”. I have a feeling this might be an easy to do in JS but I’m confusing myself at the moment. Any help would be greatly appreciated! Mitch
Say I have an Airtable base listing details of “Executives” by record… And say I wanted to throw up a rough prototype site to show the profiles of those executives on individual pages… How would I do that? For example, the page http://www.example.com/profile/bill-gates/ should use the Airtable API to get and show details from Bill’s record. It seems to call for a single “profile” web page, and maybe an index to list each executive first. But I can’t wrap my head around how to interrogate the URL slug for an executive’s name handle to pass to Airtable… If there is no such page at “bill-gates”, why would it not throw a 404? If the idea is I should create a page at /profile/index.html, how would I get it to understand “bill-gates”? And/or do I need a system whereby the URL slug is an Airtable “rec*” ID? I realise this is probably due to my general programming stack capabilities more than Airtable per se, but still. FYI, PHP is what I’m most familiar with, but simple Javascript may be a go
We’ve got a monorepo for all our development. The blocks cli seems to assume it’s in its very own repository, and there doesn’t seem to be any way to configure the location of config files and the build directory. Are there any command line arguments or config options to override the default locations?
Hi guys. Im making some app and i found that field.options.isReversed is always false for multipleRecordLinks fields. Looks like this option must be true for auto-created fields (when something referencing record from anothr table) And it would be a great tool i really need for my automation. But its always FALSE. I missing something or its a bug? Or maybe this option not for this case at all? sorry 4 potato Eng. Peace!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.