Need development and API help? Ask your questions here!
Recently active
Hello, I´m using this code to get my csv file, parse and import to table: let csvFile = await input.fileAsync( ‘Pick a CSV file to upload’, {allowedFileTypes: [’.csv’], hasHeaderRow: true} ); What I am not figuring it out is how to make that is always the same file, without me needing to choose one - without input. If anyone knows how to, I would really appreciate.
I have a bunch of dates I need to convert to strings and put into an object. sometimes however my date field is empty and it comes up as null As far as I understand checking if something is truthy I can just check it with if(value) and it only runs if value is truthy - not null, undefined… However even despite el.getCellValue(wipDate) comes up as null, my code still runs the blog inside the if statement. Does anyone know what I’m doing wrong? let month = ''; let year = null; let dateObj = {'year':year, 'month':months[month]}; console.log(el.getCellValue(wipDate)) if(el.getCellValue(wipDate)){ //console.log('inside') month = months[new Date(el.getCellValue(wipDate)).getMonth()] year = new Date(el.getCellValue(wipDate)).getFullYear() }
Context I’ve made an Airtable script to get some info automatically calling an API after populating a single field. Everything is cool besides the fact that one of the fields it’s a linked field to another table. In this case, I would first have to create a new record in the other table and then link it (via the record id) to the table in the first “main” table. Problem I’d like to understand if there’s a way to get back the ID of a newly created record to link the record in the main one. I could read the values in the whole table after creation, filter them and get the ID of the created field. Tho it seems very inefficient since I’d have to read the whole thing just for a single value. I’ve read through the docs but I couldn’t find anything about this use case. Is there a more elegant way that I’m missing? Thanks
Hi Airtable community, I am stumped with a bit of an annoying task here. We have an attachment field in our Airtable base where we attach DOCX files. We want to return this field as a part of an API response from our custom API, and we want to do a full preview of the DOCX as an image, to be served to our website. I know the endpoint returns a thumbnail image, but this is pretty small and blurry. I was wondering if there was a way to fetch a larger thumbnail, or a full page preview, of the DOCX file from Airtable’s API. If anybody knows of how to figure this out, in any way possible, I would greatly appreciate it. Thank you! Jack Tilly
Hey, is it possible to create some Action Buttons to push webhooks with json data with the scripting block?
Hello, I would like to have some info that is not officially provided by Airtable. I am using airtable to manage a database, which I export to a CSV file. I then use this CSV file as a database for a REST API in this way I am not limited by the maximum 5 requests per seconds imposed by the Airtable API. Where I am wondering is about the files uploaded via Airtable, in my CSV I see that the files are uploaded at this address: https://dl.airtable.com/.attachmentThumbnails/xxxxxxxxxxx If I have a mobile app with 1,000,000 active users viewing the image uploader through Airtable, do I face any limitations or blockages?
I’m looping over some records and want to increment ‘i’ ONLY if both conditions below are met: let i = 0; for (let record of taskRecords.records) { if(id.includes(record.getCellValue('ID Lookup')) && record.getCellValue('Stage').includes(stage)) { i++; } } console.log(i); My problem is the second condition. The cell value of the field ‘Stage’ is “This is just some dummy text | this is a string” and it’s searching for “this is a string” (this is called ‘stage’ and is a string from a previous step in an automation). i remains 0 in this case. Can anyone explain why includes doesn’t work on the second condition? Thanks!
What sort of code will allow me to read a .CSV table, and if LAST NAME, FIRST NAME, and DATE OF BIRTH columns in the .CSV file == the LAST, FIRST and DOB columns in my records, would trigger a check box in the last column? Very new at writing code. Example CSV file attached. Thank you!
I have slowly been developing a custom app that interfaces with several external APIs that supply additional data to airtable entries. I started out with the utility as an automation script - here I was able to use remoteFetchAsync() to avoid any CORS issues with my fetch calls. However, since moving to the custom app and React, I am having to go through the proxy at https://cors-anywhere.herokuapp.com/ to run my API calls (and avoid the CORS preflight errors). The issue is the proxy is only for development - I would like to either duplicate what it does myself or find a similar service that does the same thing. I am relatively new to JS and web development, so I am looking for a well documented solution that would be easy to implement in a few hours. Does anyone have any hints on where to look? Since Airtable has the server fetch functionality built in for scripts, is it also possible to use it in custom apps?
Hi there, I’m a developer who has been building some custom apps for a company over the last 6 months to help keep Airtable at the center of their operations and integrate various services and APIs right into their Airtable workflow. One of the most useful features has been using the Button field with an action of opening a custom app. This has allowed the team to trigger various actions right from a record in a view. Something that would be incredibly useful would be to get the field ID from the record action data that we get from the useRecordActionData hook. This way we could create multiple button fields within one table that perform different actions in one custom app. At the moment we are limited to one action per table because we cannot differentiate action data from two different buttons on the same table.
Hi! I am using a react front end with Airtable as my backend, Everything works fine and I am to create and list records, but when I run a .update, I get an error. In my console I get: Access to fetch at 'https://api.airtable.com/v0/appfGOrSlohKglsao/Users/?' from origin 'http://localhost:3000' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response. It seems to be that Airtable is not allowing PATCH requests specifically? I don’t think I need a proxy given everything else works just fine. Am I missing some configuration?
We are using airtable rest apis to manage our employee’s data. In the airtable support article, it was written that the airtable API has a rate limit of 5 requests per second per base. Here is the article link: Public REST API – Airtable Support. So if we upgrade to a pro or enterprise plan then can we get a more request limit on API? Or is there any other way to increase airtable API request limit? Thanks.
For the Python Community out there, I wanted to share airbase, an Asynchronous Airtable API Python Client I’ve made for python 3.7+. A lot of credit to gtalarico and the work he’s done with pyAirtable (previously airtable-python-wrapper) which greatly informed this API client. All suggestions and feedback are very welcomed, as well as any contributions. There is still work to be done in documentation, and helper functions. Here is the repo
Hey guys, I have a base with a few thousand customers in it. Each customer has their own record, which includes the time and date that the customer first made a purchase from my store. I’m looking to generate a list of unique (but memorable) referral codes for each customer in my base. To achieve this, I would ideally like to generate unique codes for each customer by conflating: The customers first name. The first letter of their surname. The running total occurrences of any given abbreviated name. (With 1) and 2) put together being the customer’s abbreviated name.) So, if your name was Bob Matthews, and you were the first Bob M that had ever made a purchase from my store, your unique code would be BobM_1. If you were the second Bob M to ever make a purchase, your code would be BobM_2, and so on. Example list of customers (sorted by when the customers first made a purchase.) Tim Smith > TimS_1 Kate Field > KateF_1 Tim Short > TimS_2 Ben Thomas > BenT_1 Richard Burton &g
Hi all, I had a URL field in AT called “Google maps link”. When I tried to set up a zap to create a google doc triggered by a new record in AT, Zapier didn’t find the field. Then I changed the field to single line and still, Zapier couldn’t find it. Finally, I created a formula field to create a direct copy of the field, and still Zapier is not finding it. I even deleted my original zap and started a new one, thinking maybe there was some issue with my original zap, but still, nothing. Any ideas?
I copied @Justin_Barrett’s script from the below post and modified it for my purpose: Automatically link record based on plain text or formula result Scripting app I would like to create a workaround for the issue that Linked Records are not available in Automations. I am collecting lots of URL inputs from colleagues via the web clipper. For a number of reasons I want to link the records to another table automatically, using a script. The idea would be to trigger the script using an Automation. In short: I want the title of the Calculated site to be copied into the linked record field Sites [how to link record] I feel like this should be fairly simpl… I’m inputting productName (formula field, text formatted) and recordID from the trigger. My tables are Departures with a linked field Product towards the table Products, where the primary field Product matches the productName input. let DepartureTable = base.getTable("Departures"); let ProductTable =
Just getting back into programming after a long pause. Is there an example script out there: Simple php loop and echo rows from table? Thank you!
I was wondering if it’s possible to add multiple filters in the Airtable API URL - I have figured out the way for one filter, but I am struggling to apply multiple filters. Here’s the URL I made, which has a single filter applied : api.airtable.com/v0/<BASE_ID>/<TABLE_NAME>?api_key=<API_KEY>&filterByFormula={City}="MUMBAI" The above URL works perfectly, but if I try to add another filter (using &), it shows errors. I am looking for a way to add these 3 filters : {City} = “MUMBAI” (field type = single line text) {Age} > 25 (field type = number) {Calculation} = “Ok” (field type = formula, result would be either “Ok” or “NA”) What is the recommended/correct way to add multiple filters? Your guidance would be very appreciated. Thanks!
Hey there community - I recently joined the Product team to lead Developer Relations! I get to work directly with the engineers building our developer tools, and advocate for things that this lovely community needs to succeed. Specifically, my role is to listen to, learn from, and contribute to this community on behalf of Airtable. I’m dedicated to making announcements about recent changes, popping into hot debates and discussions on this forum, and answering Airtable questions as they come along. From the outside looking in, this community has been thriving. I’m excited to get to know each of you. That being said, it wouldn’t be a valuable post without an announcement! We recently added the ability to write field descriptions and write description data when creating a field or table using the SDK. Field descriptions can now be edited and specified when creating a new field: Added field.updateDescriptionAsync (docs). Added optional description argument to table.createFieldAsync (docs)
$api_key = ‘[KEY GOES HERE]’; $base_id = ‘appPrp2UDQKyeozka’; // Base ID for entire scorecard machine $table_id = ‘tblhkGjHUAMbsLYDF’; // Table ID $view_id = ‘viwnABjCLiL9eAiip’; // View ID $scorecard_id = ‘recNQHVVwauXgaS3q’; $url = ‘https://api.airtable.com/v0/’ . $base_id . ‘/’. $table_id . ‘/?view=’.$view_id; //’&fields%5B%5D=Criteria&fields%5B%5D=Section%20Link’; $headers = array( 'Authorization: Bearer ’ . $api_key ); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); $entries = curl_exec($ch); curl_close($ch); $airtable_response = json_decode($entries, TRUE); This gives me a response with the items in this view. But they aren’t ordered by the order in the view? How can i fix this?
Hey folks, Seems when we use images from Airtable to render they bring in 10+ cookies with them see attached. Can someone from Airtable team explain why this is the case as this is breaking EU laws… –Artur
I run a kids club and do my database through airtable and would love to automate some updates after club each week. Want to have the “pts this week” column be multiplied by 10 and added to the existing value in the “total points” column. Want to increment the attendance column value by 1 if the “pts this week” column is not blank. Not sure I can swing this with a formula or an automated script run weekly. Zero scripting experience. I know how to do this through third party apps (Wayscipt, Pabbly, etc) but would like to learn here. Thought I’d ask for help and see where I end up as this probably is a very simple script.
Hi I have a price field that I auto import prices from and it comes out as “7 99” because that’s how this specific website shows the price. I want to use the find and replace script to replace the spaces " " with a period “.” however that doesn’t work. Idk code but should this fix be done in my data scraping or can airtable fix it.
The attachments get into my airtable, but… a) they only show as grey paper clips b) clicking on them gives a black screen with an error e.g. “Previews for this filetype are not available screenshot_20211001-083956_google (3).jpg - 315.2 KB” - so airtable KNOWS this is a jpg c) clicking on the “Download” button from that black page, correctly downloads the file - so airtable HAS the file.
Hey all, I have an Airtable set up former employees returning hardware to the company. It’s based on a form where they select whether they will drop-off their hardware in person or ship it to the building. I set up an automation where if they select drop-off, they select a day and time and an event is created on a shared Google calendar. I am working on another automation that adds a member of the IT team as an attendee on each event when they are assigned in Airtable, and it works perfectly for the drop-off records. However, I assign IT team members to all records, not just drop-offs, and when I assign out a non-drop-off ticket I get a ‘failed automation’ notice. Is there a way to tell Airtable to only update records that have ‘Drop-off’ selected, and not update for records with ‘Ship to HQ’ selected?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.