Need development and API help? Ask your questions here!
Recently active
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!
Trying to use scripting and automation blocks/apps to send HTML emails (similar to sendgrid block) but there is currently only support for sending markdown rendered emails currently. Any workarounds or upcoming updates that anyone knows of?
Hi all, I have created a table with teachers and their availability. Each line corresponds to a teacher, and my columns are the different weeks of the year. The field type of my columns is a linked record, so that I can have multiple date filled in for one week. It looks like this: Name of the teacher // availabilities w1 // availabilities w2 // availabilities w3 // … Tom Sawyer // Mon. Jan. 1st, Tue. Jan. 2nd, Wed. Jan. 3rd, Thu. Jan. 4th, Fri. Jan. 5th // Mon. Jan. 8th, Tue. Jan. 9th // Mon. Jan. 15th … I would like to write a script to go through these “availability” columns and for each record in it, create a record some place else. So that I would have something like: Name of the date // Name of the teacher Mon. Jan. 1st // Tom Sawyer Tue. Jan. 2nd.// Tom Sawyer and so on Then, I could match the records with the same name, so that I have all my teachers available for one given date. Is there anyway to do this using the scripting app? I am very new to js so don’t really know wher
I’m writing a small package for the julia programming language intended to wrap the airtable REST API to make it a bit easier to access within scripts. Julia has a pretty strong culture of including automated testing of packages, and I was wondering if there’s a sort of dummy table with an open api key that could be used for this purpose. I can create a dummy account and use that, but wanted to know is there a sanctioned way to do this if not, is there any reason not to make a dummy account
Hi everyone, Is there any way on a script to link to a record directly from the script window with the output object ? My usecase is the following : We use a script to detect all missing information in a table and show records where some are missing. We use output.table for that and it works great, but it lacks a way to be able to expand the corresponding records to directly modify it without being forced to do a search on the view panel to find the same records. Thanks for the help :winking_face:
//Can someone look at this simple example I cooked up. I expect Object.keys to return keys and //Object.values to return values. its easy to setup I just used a new blank template, named it Table and //put some names in Name and Done’s in Status. dictionary = ; let table = base.getTable(“Table”); let queryResult = await table.selectRecordsAsync(); for (var record of queryResult.records) { if (record.getCellValueAsString(“Status”) == “Done” ){ dictionary.push({key: record.getCellValueAsString(“Status”), value: record.getCellValueAsString(“Name”)}); } } output.table(Object.keys(dictionary)) // Why doesn’t this output keys output.table(Object.values(dictionary)) //why does this output keys and values? // this is the output I am getting
Hi, I am trying to have an app that dynamically shows information from calling a service whenever a new cell is selected. This is working, but it seems to be stuck in an endless loop and continually re-renders even when the selection is not changing. Any React guru who knows a better way please chime in! import React, { useState, useEffect } from 'react'; import { initializeBlock, useBase, useRecords, useGlobalConfig, useSession, useLoadable, useWatchable, Heading, Box } from '@airtable/blocks/ui'; import { cursor } from '@airtable/blocks'; import ConfigField from './components/ConfigField.js' const _ = require('lodash') const axios = require('axios') function UpdateAsin() { const base = useBase(); useLoadable(cursor); useWatchable(cursor, ['selectedRecordIds', 'selectedFieldIds', 'activeTableId', 'activeViewId']); const table = base.getTableByIdIfExists(cursor.activeTableId) const globalConfig = useGlobalConfig(); const c
Hello Airtable engineers, I’d like to build a few custom apps for my airtable, the first of which is a form to input records into a predetermined table. I’ve dabbled a fair bit with vue.js but never a single project with React, so I’m a total newbie. To aid me on my learning journey, I’m looking for some examples that I can pull apart. Specifically, I’m wondering if anyone has a simple data entry form for creating new records in a table. A field for creating linked records (to a different table) would be an extremely helpful example. Any advice or examples you might have are greatly appreciated! Cheers, Kris
I’m getting a weird behavior when iterating over Records, it looks like the code is skipping items. I’m thinking it is either my code or a cache bug. here is an example
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.