Need development and API help? Ask your questions here!
Recently active
I am able to use the API to obtain URLS for images. I can access those URLs from my browser when logged in. However, my API is unable to access the images when using a GET (I am sending the authorization token header): <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>XXXXXXXX</RequestId><HostId>YYYYYYYYYY=</HostId></Error> HTTP/1.1 403 Forbidden Content-Type: application/xml Transfer-Encoding: chunked Connection: keep-alive Date: Fri, 14 Jan 2022 02:36:39 GMT Server: AmazonS3 Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src https://*/favicon.ico; sandbox Access-Control-Allow-Origin: * X-Robots-Tag: none X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff Referrer-Policy: no-referrer X-Cache: Error from cloudfront Via: 1.1 61e47cd082bb04a8fb8ae61dd54f6b32.cloudfront.net (CloudFront) X-Amz-Cf-Pop: SFO5-P1 X-Amz-Cf
Hello all, I have been messing around with the API and PHP to try and display a list of records. I have been sort of successful in retrieving records but when it is linked to another table it just shows the Record ID instead of the value from the other table. Anyway around this? For instance in the code below $model is returned as the Record ID instead of the Model Name. if ( array_key_exists ( 'Model', $fields ) ) { echo '<h2>Model</h2>'; echo '<ul>'; foreach ( $fields[ 'Model' ] as $model ) { echo '<li>' . $model . '</li>'; } echo '</ul>'; } Thanks.
Hello, I understand that there are some limits to update records in a table but I cannot find a execution time limit in the documentation or this forum for custom Apps. In my case I would like to update all records of a table so I’ll have to pace the calls to updateRecordsAsync. But I also need to fetch data to an API endpoint with some quota too (in our example 50 / seconds) so the update process overall might take a long time depending on the table size. Taking some margin this operation (fetch data and update record for 5K records) could take ~150s. Will it be a problem ? Thank you in advance for your help Best regards
I have a script that I run through an automation but sometimes also want to run manually. Ideally, I’d like to use the exact same code in both so I don’t have to maintain two scripts. However, the API seems to behave differently in the two environments. Using this exact same code block: let myTable = base.getTable('Some Table'); let query = await myTable.selectRecordsAsync(); for (let record of query.records){ let val = query.records.map(record => { let vals = record.getCellValue("Linked Stuff"); // this field references another table console.log(vals); // ... the rest doesn't matter return 1 // some kind of sum over the records in vals, etc. } } the log statement shows that in the scripting block, “vals” is an array of objects: However, the same code run in an automation (debug view) produces an array of strings in that variable: Is this a temporary bug? Which behaviour should I expect in general? I can work around this for now but of co
There’s no API call for exporting a table as CSV right? (couldn’t find it in API documentation) Has anyone written a script that mimic that functionality by iterating through all the records, replacing linked record IDs with names, and then, generating said CSV? If not, I’ll work on writing one…
My goal is to send an email to every (50+) people every month that reminds them to submit timesheets. I tried to set this up in Zapier, however Zapier will not run the same row twice… #fail. So I set up an Integromat account, however Integromat requires a Last Modified Time as a trigger, so unless a row has a modification I have no way to trigger it for an email… I’m kind of perplexed on how to do something very simple…
hey everyone, I’m not sure why but I’m getting an empty result when using filterbyformula with a date function. I’m trying to receive all records that hold a certain date in a certain field. The field also might be empty on some records just if that matters, but I double checked there are records for these fields. Here’s my query… GET https://api.airtable.com/v0/appXYZ/Bestellungen?fields%5B%5D=Datum%20Abb.&fields%5B%5D=SU%20Beleg&filterByFormula=IS_SAME(%22Datum%20Abb.%22,%222021-12-20%22)&view=Buchhaltung%20Online%20DE So i’m doing filterByFormula with "IS_SAME(“Datum Abb.”, “2021-12-06”) I tried IS_AFTER and IS_BEFORE also to double check and even have more records to show but all I get is an empty result. I tried using other formulas on others fields that worked fine but I can’t get this to work. Am I overlooking something? Is the space in the field name causing any issues here? I mean it is URL encoded correctly but i’m still not sure if it could be an issue. I can’t s
Lately, when Zapier updates attachment fields with images, it briefly shows the attachment, but seconds later it completely deletes anything in that field. Even when there we’re already attachments, it deletes them. I saw that this problem happened over a year ago in closed threads, but now I’m experiencing it and it’s causing huge issues with my client. Support isn’t recognizing this issue as a known bug. Has anyone solved this?
I’m creating a custom app which uses a date input field. My computer clock is set to GMT+2, ie my time is 2 hours later than GMT. When I toggle the GMT setting on the date field, the local time appears 2 hours behind the GMT time when using record.getCellValue: Local date time (GMT setting off): ‘2022-01-01T10:04:00.000Z’ GMT date time (GMT setting on): ‘2022-01-01T12:04:00.000Z’ I can’t understand why the local time is earlier than gmt when it should be later. Also, I can’t understand why the local datetime string is being formatted as a utc datetime string, as this doesn’t follow ISO8601. When I use record.getCellValueAsString, it returns the string ‘1/1/2022 12:04pm’, regardless of the gmt setting. I notice that the datetime string returned by the REST API seems to change in the same way as record.getCellValue, even though the docs say that only a utc datetime string is returned. Any help/insights appreciated.
dear airtable community, i have a record that i want to move to another table when the checkbox is filled. to do so i have set up an automation you can see down below. now i want to add the feature, that the moved record should be deleted in the first table and therefore i need a custom script. unfortunately i dont have any experience in scripting and therefore am reliant to your help. if anybody could come up with a suiting script that would be highly appreciated! i browsed the forum already but without any success. thanks in advance and stay safe! :slightly_smiling_face:
Hi all, I am trying to adapt a script from postman where I successfully tested my API call. My issue is that the API secret key needs to be encrypted when I send the request but this requires Crypto-js. Is there a workaround available in Airtable scripting block to make this work: var CryptoJS = require('crypto-js') // the Authorization header needs to have this very particular format, which the server uses to validate the request // the access key is provided for the server to retrieve the API key; the signature is encrypted with the secret key var hmacString = (method + '\n' + onNonce + '\n' + authDate + '\n' + headers.get('Content-Type') + '\n' + path + '\n' + queryString + '\n').toLowerCase(); var signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256(hmacString, secretKey)); var asign = 'On ' + accessKey + ':HmacSHA256:' + signature; headers.append('Authorization', asign); For reference the above code is from here : onshape-clients/postman at master · onshape-publ
Hi! I have a sort of complicated situation and I’ve been able to figure out what i need to do, but not the way to actually accomplish it. I have a base with three tables in it: Jotform (A) | Supplies (B) | Split Requests (C) Table A is bringing in responses, Table B is a list of every unique item that has been requested in the jotform, and Table C is where I will split up requests with multiple items in Table A to separate ones. In the Jotform, people can select multiple items in one form submission. even though someone might send in one form submission, that submission might include 50+ items. The jotform takes the info for each item (data points like item,qty,notes) and separates them by comma, and each item by a line break. that’s my way in with parsing out the data. I need to take a cell that might say: Apples,50,red apples Apples,49,granny smith Peaches,23 Oranges,44 and split that into separate requests in Table C. then i need to link that record back to the original record in Ta
Hello! Vega-Lite is a library for creating sophisticated charts, visualizations, and interactive graphics. The new Vega-Lite block brings the power of this library into your base. → Click here to join the beta. Once you click that link, the “Vega-Lite” block will be available in the list of blocks when you go to install a block. We’d love your feedback – please reply with thoughts and suggestions in this thread! P.S. we’ll be open sourcing this block in the next week or two, stay tuned.
Hey guys! I would be very interested in working with the Airtable metadata API. A lot of my use cases are straight up not implementable without it. I have filed a request to get access a while ago and I know that you guys are currently not giving out any new metadata api access tokens for new developers. But is there any timeline/roadmap on how this will evolve in the near future? Would be great if you could shed some light on that. Thank you.
Hi I am rather new to coding and was rather proud of myself to get the following script working. I just wanted to list all the field names, types and descriptions, for each table in my base, in another table called “Field list”. It worked on my test base, but when I run in on the base I wanted to use it with, it only writes approx 14 records. Oddly in the console, it lists all the fields and descriptions. I tried using await - but get the above error (I think this is something to do with trying to write too many records in one go? I am sure my script is bad and also suspect this is a simple error. Any advice appreciated. Script below Thanks, Andrew const tables = [“Transactions”, “Suppliers”, “Master Budget”, “Primary budget lines”, “Secondary budget lines”]; tables.forEach(function (table_name) { console.log('Looping through ',table_name); let input_table = base.getTable(table_name); for (let field of input_table.fields) { let name = field.name let description = field.desc
Hey Y’all, Is anyone familiar with Google Data Studio? Context: I’m playing with an idea of archiving data from Airtable. To do that, I’m routinely exporting the JSON output from the API, and appending a CSV in Google Cloud Storage. I’m using that CSV to create a report in Google Data Studio. Problem: I’m at a loss of how to leverage Linked Records in visualizations, which output from the API as an array of Record IDs. Currently, Data Studio only sees them as strings. Questions: What are my options for replicating many-to-many linked record relationships in Google Data Studio? Will I need to load my data into Big Query first? If so, what are some best practices/suggestions for working with Big Query I can leverage? Links are much appreciated! Thanks in advance!
Hi I’m trying to build a script that updates a multiple select field from one option “option1 / option2 / option3” into multiple options after I map through the string to make each word an individual option. Example Before: option a : "option1 / option2 / option3" After: option A: option1 option B: option2 option C: option3 Any ideas on how this could be done?
I’m trying to simply copy text from one column to another. Only about 20% of the records are being copied over. However the console logs each name correctly… Im using this script, which i’ve edited for my own use from here: Using a script to add values from one field to another Scripting app Hi @Jens_Schott_Knudsen1 - try this script: // set the table let notesTbl = base.getTable("Notes"); // get the table records let notes = await notesTbl.selectRecordsAsync(); // loop through the records for (let record of notes.records) { // set variables to the record values let notes = record.getCellValue("Notes"); let notesHistory = record.getCellValue("Notes History") // set variable for today's date let now = new Date().toLocaleDateString("en-GB"); // define the new… // set the table let table = base.getTable("Inventory Item Summary"); // get the table records let itemCode = await table.selectRecordsAsync(); // loop through the record
I have a script that calls an API and writes the JSON objects to my table. This has hit the limit of what I know about scripting. Can anyone help modify my script so that on the next call, it will update any records that exist and insert any records that are new. I assume I need an IF statement to look for an existing ID and validate if the associated string matches ELSE create a new record. My existing script is: let response = await remoteFetchAsync(“APIURL”, requestOptions); let json = await response.json(); let table = base.getTable(“Titles”); for (i=0; i < json.length; i++) { let recordId = await table.createRecordAsync({ “Title”: json[i].Title, “ID”: json[i].ID }) }; Thanks!
Currently, I am using the API to get record(s) information. I have a query like this: filterByFormula=Search(‘478-1160-1’,Upper({MD Part Number})) which the syntax is working either by returning 1 or more records. However, I am wondering if there is a wild character that I can pass in case that instead of “dashes” there is spaces or other character. So I can do something like: filterByFormula=Search(‘478%1160-1’,Upper({MD Part Number})) Thanks in advance.
Hi! We sync Airtable records to our own bases via Airtable API. The thing is when a record is deleted in Airtable it just vanishes from Airtable API. To discover deleted records in API we have to iterate all records in both source and destination bases. Then delete records in destination with Airtable Ids that are missing in source. Is there a way to track deleted records in Airtable to delete them in destination base without a one-by-one comparison? Thank you.
Given this record “fields”: { “Opportunity name”: “Timbershadow expansion”, “Owner”: { “id”: “usrTqRt8glK7HcmEg”, “email”: “katherineduh+collab8@demo.htable.com”, “name”: “Casey Park” } I want to perform a filter to exclude it. Neither of this worked and I can’t find an info on the pages: var filter = “NOT({Owner.name} = ‘Casey Park’)”; var filter = “NOT({Owner}{name} = ‘Casey Park’)”;
Has anyone been able to make an api call to remove.bg from scripting or a script within an automation?
It’s curious to me that the last mod time for any cell is not available through the scripting, REST, or metadata API as part of any records’ metadata. For example, I would think that for Airtable to display the data in a last mod time field, especially comparatively when more than one field is specified in the config, the last mod time would need to be stored somewhere. Perhaps I am just thinking about it incorrectly. That the cell values update accordingly when the last mod time field is reconfigured (e.g. a specific field has a date from months ago, but when the last mod time field is reconfigured to show all fields and something was updated today, it shows a date-time value from today) makes me think the data must be somewhere… just not accessible :frowning: :man_shrugging: Per the API doc on lastModifiedTime, the cells are read only and creating or updating such fields is unsupported. Where or how does Airtable gets this data when a last mod time field is created and configure
Hi - I saw this tutorial but it isn’t quite specific enough. DEV Community Using Airtable as backend service The hell of finding the right backend When it's time to write a Single Page Application in... How is it possible to duplicate this with a bit more specificity? Embed a javascript section into a website?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.