Need development and API help? Ask your questions here!
Recently active
Does it copy the entire source directory to a base or only the built output?
I’d like to prompt the user for the password to an API call but input.textAsync displays the input in plain text on the screen. Is there a way to mask the input so it shows as ********** when the user is typing? Like with HTML input type=password?
I’m seeing this error today in my custom block, but don’t think that I’ve changed anything dramatically in my code. Can someone tell me the fix? Thanks.
Hello, I have been working towards mapping some CSVs into one of my bases using the Scripting Block. Since I’m new to JavaScript, I’ve been using a lot of the documentation within the Scripting Block, which has been super helpful for what I need. One issue I have run into is during the mapping process, where I’m mapping the fields in my Base to the fields within my CSV. The format of mapping a field for me generally looks like this: data.FieldName Where “data” represents the parsed contents of my file and “FieldName” represents the name of the field within that file. My issue is that, in some of the files I would like to use, there are special characters and spaces within the names of the fields. Meaning I would like have a mapping that might look something like this: data.Field Name # For spaces, I attempted to use underscores but wasn’t able to get that to work. When using a special character like # or /, I get errors thrown by the script. From my understanding, I believe this mapp
I am attempting to map a csv file to one of my bases via scripting due to some pre-processing I would like to do, however, I began running into issues with parsing. Figuring that I had made a mistake I created a new script to test a more simple csv with state names and regions essentially hoping I could troubleshoot on my own. This is the output table I get with an csv I upload: And here’s the script I’m using: // Prompt for a file upload let csvFileResult = await input.fileAsync( 'Upload a CSV file', {allowedFileTypes: ['.csv'], hasHeaderRow: true} ); //Display table w/ parsed contents let csvRows = csvFileResult.parsedContents; output.table(csvRows) I’ve been looking at the spreadsheet importer example and the documentation within the block but have had no luck thus far, any help would be much appreciated. Thank you, Sam
Has anyone found a javascript chart library that they like, that also works with React? I’m assuming that is one of the requirements as I seem to have struck out using d3.js inside my simple example. Really excited to create a richer charting block, if I can only find the right library. Thanks!
Hello all, We just launched a website to help small independant shops to sell gift cards during the covid19 crisis. Every week, we send them the list of their clients orders via Airtable. Today, I put all the orders in one table, then filter one by one the orders for each merchant and create manually a new table for each merchant where I paste the filtered orders. Can we create these new tables automatically ? A script or formula would have to filter each merchant and create tabs accordingly. Can we update these tables automatically ? A big thank you, we really need help, this project is volunteer and we already help 3000 small shops in France ! Jonathan
Hello, I know there is an API limit of 5req/s to query AirTable. What about Attachments’ URL ? Can I directly use a link to the attachment’s URL ? is there a secret/token in the URL that should not be displayed ? Is there a cache mechanism on AirTable side ? Or should I download and cache the attachment ?
I want to know if I can write some script to send data from the table to ManyChat chatbot using an API request.
In the “hello world” tutorial, the command block run runs indefinitely without reporting anything to standard output. I’ve collected some debugging information regarding the Express npm module via the DEBUG environment variable: DEBUG=* block run 2>&1 Wed, 25 Mar 2020 17:01:53 GMT express:application set "x-powered-by" to true Wed, 25 Mar 2020 17:01:53 GMT express:application set "etag" to 'weak' Wed, 25 Mar 2020 17:01:53 GMT express:application set "etag fn" to [Function: generateETag] Wed, 25 Mar 2020 17:01:53 GMT express:application set "env" to 'development' Wed, 25 Mar 2020 17:01:53 GMT express:application set "query parser" to 'extended' Wed, 25 Mar 2020 17:01:53 GMT express:application set "query parser fn" to [Function: parseExtendedQueryString] Wed, 25 Mar 2020 17:01:53 GMT express:application set "subdomain offset" to 2 Wed, 25 Mar 2020 17:01:53 GMT express:application set "trust proxy" to false Wed, 25 Mar 2020 17:01:53 GMT express:application set "trust proxy fn"
This does not work. It throws some exceptions. useLoadable(cursor); useWatchable(cursor, ['activeTableId', 'selectedRecordIds']); const table = base.getTableById(cursor.activeTableId); const record = useRecordById(table, cursor.selectedRecordIds[0]); This works. But is this the correct way to do it? Feels like there should be a much simpler way to do this. useLoadable(cursor); useWatchable(cursor, ['activeTableId', 'selectedRecordIds']); const table = base.getTableById(cursor.activeTableId); const queryResult = table.selectRecords(); let record = null; try { record = queryResult.getRecordById(cursor.selectedRecordIds[0]); } catch (e) { record = null; }
Hello all - I have recently noticed that in both cases below you are able to create single- and multi-select options in Airtable from inside the app. As far as I was aware this was not possible through the API. Is there some secret endpoint or workaround that I am not aware of? Jotform - If you connect jotform direct to airtable you are able to use the “other” option in both single and multi select field types and it automagically creates the option in Airtable??? Integromat - With Integromat if you use the Airtable node, I accidentally discovered that you can create options in airtable automatically. Hope someone know more :slightly_smiling_face: Thanks in advance.
I’m struggling to find any docs of examples or returning a JSON packet of records from a module.export = function () {} block using the Airtable.js library; Can someone point me in the right direction?
Hi everyone, I am trying to create a roster of members using the Airtable API. Is there any way that I can somehow use the JSON returned from a GET request, order it, then output it to an HTML table? I’m a fairly new developer, so any help at all is appreciated.
Is there any way to solve the problem that occurs when the user clicks the submit button at the end of a form, but doesn’t go to the URL previously configured in airtable? (In fact when clicking on send, the user sees a message with the URL, but is not redirected. A horrible experience). I know that is a common problem among the community. But would it be possible to solve this using the ‘scripting’ block?
Similar to useState intial state. Otherwise, there will always be boilerplate code of if value is null then value is initial value: let [value, setValue, canSetValue] = useSynced('myGlobalConfigKey'); if (value == null) { value = 'initialValue'; } Cheers, Ronen Babayoff Superblocks.at
Hi, I’m trying to import a dataset of permits in the city of Austin, TX. My goal will be to update this daily, so I can filter by permits add on a given day. Every time I hit “Run” on my script, it only adds about 1,000-1,500 records to the table (different every time) and it seems to be skipping records, the length of the data set is roughly 20,000 records. Thanks in advance for any help! Here’s where I’m importing from: https://dev.socrata.com/foundry/data.austintexas.gov/mavg-96ck And here’s my script: // url to be queried let url = "https://data.austintexas.gov/resource/mavg-96ck.json?$limit=50000&$$app_token=[MY API TOKEN]"; // set the table that stores the records let table = base.getTable("Table 1"); // make the API call let response = await fetch(url, { method: "GET" }) // get the API response let data = await response.json(); output.text("Retrieved " + data.length + " Records"); data.forEach(async element => { let newRecord = await table.createRecordAsync({
Sorry for my bad English, I dont know exactly what is “The API is limited 5 requests per seconds” my question is that " If 10 users are requesting data at same time then will they recieve data or not… if yes then how many user can request data simultaneously without getting error… if no they what is the max no of user per second who can receive data which errors.
Hi! I wanted to show a lookup field as <RecordCardList />, but I can’t access the original field. I’m only getting the recordId and fieldId, not the tableId (in field.options). Can someone help me with that? Thanks!
Hi, I’m using sleiman/airtable-php to integrate airtable with my website, the problem that I’m having right now is inserting a public url where my image is hosted to the attachment field of the table; this is the code: $url = "<url-of-the-image>"; $attachment = array('url' => $url); $update_details = array( "ID Verification" => $attachment, ); $update = $airtable->updateContent("Applications/$record_id", $update_details); And I get this error: [error] => stdClass Object ( [type] => INVALID_ATTACHMENT_OBJECT [message] => Invalid attachment object for field ID Verification: "<url-of-the-image>" ) I have also tried to make the $attachment variable an object like this: $attachment = (object) [ 'url' => $url ]; Or do I have to define $attachment differently or ‘sleiman/airtable-php’ doesn’t support attachment fields? Help!
Hi everyone, Last week we sent out the first issue of our developer newsletter! If you missed it, you can read it here: Airtable developer newsletter - April 2020 We’ll be send one out about once a month to share API and platform updates, tutorials, resources, community spotlights, and more. To get the next one in your inbox, subscribe here. Let us know what you’d like to see in future issues :slightly_smiling_face:
Hi Doing a test to implement AirTable with Qlik Sense, and I’m struggling with the setup for the pagination in the Qlik REST connector. How can I do a api-call to just get “total rows” /or “number of records” in a table? Or is the only way to loop until there is no value in the offset field? Thanks for any help Robert Svebeck
:wave: Hey everyone! Just wanted to announce two new features we’ve shipped this week that should make your scripting experience much smoother: :writing_hand: Script editor in sidebar mode Sometimes when you’re building a script, you might want to see your base inline as you’re editing. This makes it easier to reference sample data or the names of your tables/views/fields. To support this, we’ve added the ability to use the script editor in the sidebar: To enable this: Go to a scripting block and click “Edit code” The block will enter fullscreen Press the Esc key or click the x in the top right of the block The block will stay in edit mode :books: Standalone docs site Some of you have noted that the documentation panel in the block is rather small and difficult to navigate. We’ve since mirrored the scripting block documentation on a standalone site so that you can enjoy the entirety of your screen real estate. You can access this site at Airtable Scripting As always, continue
When I edit a script and browse for attachment thumbnails, the editor marks the syntax .thumbnails as an error. Property 'thumbnails' does not exist on type '{ readonly id: string; readonly url: string; readonly filename: string; readonly size?: number; readonly type?: string; readonly thumbnail?: { The autocomplete suggests .thumbnail (no s). It’s a bug: this wrong syntax fails at runtime, but is considered as the correct one by the script editor.
I’m super excited to use the new input.fileAsync() API, but this is my first time working with file blobs in JavaScript, so I’m already scratching my head trying to figure out how to work with my file contents beyond the offerings of the API. Disclaimer - this question has little to do with Airtable and the Scripting Block API itself; it’s basically just a plain old JavaScript question. I already use the CSV import block to import bank statements to my budgeting base. However, my bank outputs 4 lines of identifier data before outputting the table of transactions – so I always have to manually open this CSV, remove those top 4 lines, save it, and then import it. I’ve been meaning to write a script to do this for me (was going to use ruby in MacOS), but Airtable’s new Scripting Block API is just in time to allow me to (hopefully) incorporate this into the import process! So, I’m bringing in my file with let fileObject = await input.fileAsync('Import a CSV', { allowedFileTypes: ['.csv'] }
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.