Need development and API help? Ask your questions here!
Recently active
Hi, I have developed chatbots for different channels such as WhatsApp, Telegram, etc. I am currently using Airtable REST API to fetch the text field and attachment URLs and send them to Users as text messages and media files, respectively. The pieces of information and URLs are fetched at the time of the request i.e. When the user initiates the chatbot. Will the new change affect my chatbot workflow since I am directly fetching the URL every time the user requests the bot? Also, I read and I quote: Using Airtable as a CDN has been and continues to be discouraged in line with this change How can I avoid this? Any help or advice is appreciated .
I have 2 tables, staffs and works. there are 5 staffs. and there is a field called duties in my works tables. I would like to write a script to assign the duties in my duties field. I am using the linking record but I don’t know how to use the built-in methods to do so. can anyone help me thanks.
Does anyone know how set up a script to edit text fields (imported from xcel) - specifically I want a date + time text field to be separated into a date only so that I can convert it to a date field type for future automation processes. Example of what I want on the left and what I am working with on the right. I’m a complete newbie to scripting and pretty new to airtable generally so any advice is greatly appreciated! Update: I managed to work this out using another script for splitting fields — Split text to columns - #6 by Mike_Pennisi
Hi all, I would like to retrieve data from an API and update fields to a table. I have had trouble finding a basic example of this. I have been able to update one of my tables from a python module which really simplifies things but if I could remove the python from the process and simply do it in a script that would be great. If anyone had any links to share that would be awesome!
Hello All, I’m attempting to wire up a script to a button field. When the button is clicked this is what happens: all the fields associated with the clicked button’s recordID are gathered in an object: let data = { "field": "value", "field": "value", "etc...": "etc..." } this data object is then sent to a webhook via fetch post request What I have is this: let pipeURL = "webhook URL here"; let table = base.getTable("GPP Website Leads"); let view = table.getView("Grid view"); let queryResult = await view.selectRecordsAsync(); console.log(queryResult.records) This works, but only returns the recordID and the first field in the view. I’m sure it’s trivial but I can’t figure out how to loop through and get all the fields & associated values for a given recordID. The I could populate my data object with the fields and the values. Thanks for the help!
Update (June 25, 2020): The button field is now available for all users — read more in our launch blog post: https://blog.airtable.com/now-available-button-field :wave: Hey all — I’d like to announce the public beta of button field, a new field type that allows you to create buttons that trigger customizable actions. These actions include: Opening a link based on a URL formula Opening a specific record in page designer Opening an embed in the URL preview block Sending emails with SendGrid Perhaps most relevant to this community — you can use this new field type to run scripts directly from grid view, kanban view, gallery view, and expanded records. This will make scripts more readily accessible to end users and seamlessly integrated with their existing workflows. You can also customize your buttons with helpful labels that describe what your scripts do. When a script is run from a button, the first input.recordAsync call in the script will use the record the button was clicked
Greetings! I’m working on an airtable automation to operate from an interface button. the automation would do the following (the part im having trouble with is the script as the last step): from the rest of the automation im passing three values into the script as inputs: The original project record ID The duplicated Project Record ID a list of tasks that are linked to the original project (this one im not using for the script, but assume it would be more efficient to use this rather than query the entire list of 1000+ tasks. the script is currently “functional” but I’d like to make the following changes and im running up against my JS ability. use the list of IDs to make the script more efficient instead of the query when the fields are being set in that For loop, set the Project field to the new duplicated project as part of that same step. set another field called “Status” to the string “Planned”, otherwise all fields can simply be duplicates. Any help would be much appreciated
Hi All, I am using script to assign a unique ID to a household. Part of doing this includes counting the number of records that currently exist in the table that the unique ID will be assigned to. I am struggling to obtain this count. I created a column in the table using the Autonumber function that automatically assigns a number to a new record - in an ascending manner. I then us the input.config() method to try obtain this value of the most recently created record. But I get an undefined return from this. Any ideas on another way to do this? Thanks in advance. Cheers, Ryan.
I am working with the Airtable API in GoLang and I am using this client. I have 150 records. I am trying to fetch the first 50, then next 50 and so on. I do this by sending the following HTTP request (with the help of the client): /v0/appXXXXXXX/tblXXXXXXXcellFormat=string&offset=50&pageSize=50&sort%5B0%5D%5Bdirection%5D=asc&sort%5B0%5D%5Bfield%5D=Name&timeZone=Europe%2FLondo n&userLocale=en-gb Note the &offset=50. When I send this request I get the following error: “error”:{“type”:“INVALID_OFFSET_VALUE”,“message”:“The value of offset 50 is invalid” I have tried removing the offset parameter and it gets me the first 50, but how am I supposed to get the next 50! Below is my Go code using Mehanizm’s Client:
Hi! I have created an automation that runs each time a record of certain field is updated, in the automation I update some of the other records of the same field through a script . Is there a way I can make sure the automation won’t run again if the records are being changed from the script and not by a user in the UI ? Thanks for any help! Yaniv
Hi all, after some research I have found the solution to my needs via @Kamille_Parks’ no conflict airtable script. However, I would like to show the executing script as a client-facing page (the same way we would use a basic form) without having to show the database. Is there a way to do that? *see on the screenshot, the script portion.
hello. i’ve recently been told by Airtable Support that Permission for Groups / Users are not copied by default when Duplicating a Base It is expected behavior that the new base doesn’t have the same permissions as before so that nothing is unintentionally shared. as a result, when i Duplicate a Base, most Tables and many Fields are unusable, since they are still locked with Permissions … it’s just that no User or Group has those Permissions. so it requires a manual removal of the Permissions from every Field & Table to which they had been applied. we can continue using your excellent security features if we can build a script using your Enterprise API which can detect & remove those Permissions. your API documentation doesn’t describe the ‘Get Table’ endpoint (which would be the first place i would think to start). there also seem to be a variety of ?include= parameters, but i’m not sure what the range of values is, nor the shape of the responses it there a more complete
Hi, Airtable community! I’m writing a script in the Automations tab. My first trigger creates a new record called newEntityId. I want to link that newEntityId record to another record I’ve created in the script. My problem is that you can only get the record ID from the newly created record and the field type I want to link to is “Link to another record” which requires the object/record type. I’ve made a solution that works but throws an error. If the error could be solved, that would be appreciated! new record: error message: Code: let inputConfig = input.config(); let tasksTable = base.getTable("Tasks"); let taskQuery = await tasksTable.selectRecordsAsync(); let tasksrecords = taskQuery.records let tasksTemplate = base.getTable("Tasks Template"); let templateQuery = await tasksTemplate.selectRecordsAsync(); let tasksTemplateRecords = templateQuery.records; let taskTemplateLength = templateQuery.records.length; //Create taskTemplate.length records in Tasks field AND add all ta
Hi, i’ve implemented Levenstein function in my script to compare 2 tables of names from different sources. For some matches where match ratio is not very high, I added step, where user can choose from several options with maximum ratio (using await input.buttonsAsync). Since tables contain thousands records, one match operation lasts for some seconds. Is there a way to continue script execution (at least for records, that doesn’t require to interact with user) while user thinks which option to choose? upd: I read thread with function again and understand how to accomplish my task - use links instead of async input and gather them in some table where user selects while script runs in other tab. but still I’m curious - is the subj doable with “advanced” part of js? generators/iterators? or promises/async? I read these topics long time ago when my JS knowledge was not enough to understand. if you can point me in the rigth direction, thanks in advance.
Hi, I’m newbe at using “Scripting Extension” and I had an issue with using this extension. Let’s jump to the point. Here I have 1 table that I make as “Student Attendance”. in that table I have a grid view and calendar, so what I am trying to do is connect the grid view with the calendar. So for example: in the grid view section, I have these (Field/Column) “Name, Start Date, End Date and Select days in a week.” So the problem I can’t solve is I can’t find a way to show already selected days in grid view to the calendar. I want it like auto-generate date in calendar by “selected days in a week”
Hello, I created a few simple databases in Airtable and wanted to test the access to them with Power BI. I tried this simple query with Postman: https://api.airtable.com/v0/<BASE-ID>/<TABLE-id>?api_key=XXXX and it works great and instantaneously. But the same URL in PowerQuery like this: Json.Document(Web.Contents("https://api.airtable.com/v0/<BASE-ID>/<TABLE-id>?api_key=XXXX")) is not doing anything. Just trying to establish a connection or I don’t know. It doesn’t give any error message. I also have tried this guide: support.airtable.com Sending Airtable Data to Microsoft Power BI & Power Query | Airtable Support This article outlines a solution to efficiently and automatically bring information from your Airtable base into Microsoft Power BI and... and it is also not working and not giving any error message.
Would be super helpful to get base creation date via API. Any idea how one could get it ? Or any chance this can be added into the API ? At Softr we integrate with Airtable and need to enable users to select the base that has been copied over. In general having a bit better Meta API with write capabilities would be super helpful. E.g. We can create a google sheet document but can’t create a base or copy a base programatically. Thanks!
Does anyone know how to set up parameters to match the curl example in docs for air table with PyCURL or Request package? Could you give an example.
Previously I’m using multiselect field from the current table. However, I am trying to automate by pulling the multiselect field from the LOOKUP. But when I want to run the script, I am unable to do so. Here is the structure of the base My current script let templateName = r.getCellValue(s.tempField.name); console.log(templateName) let monthName = r.getCellValue(s.monthField.name); templateName.forEach(item => console.log(`${monthName}; ${item.name}`)); let combinedArray = templateName.map(item => `${monthName}; ${item.name}`); console.log(combinedArray); output.table(combinedArray); How to modify this script? Thanks!
Hi, I would to retrieve an array of all single select options from the api. but i dont know if its stored anywhere… Is it possible?
Hi team, I am using the scripting block to add a new single select option to a bunch of fields at once. Is there any way to specify the color of the item? Currently they all seem to be adding as grey by default. Thanks!
Hello all, How do I add time to a Date field using the scripting block in automations? I know about DATEADD() in formula fields but I’m trying to iterate through a loop. I want to automatically create an indeterminate number of new records where each record’s Date field is the next day (19th, 20th, 21st, etc) in other words, n = n + 1day. Is there some way I can do this in my script’s for loop? Or some clever way to do it with formula fields? Thanks,
I’m trying to insert a new record into a table that has a link field (single select). The value I’m trying to insert matches exactly with the value in the linked table but I’m getting a 422 error. To do this do I need to insert the record ID in the linked table? I don’t have this ID available in my external application.
Hello, I have a table with about 1700 records. I’m pulling a couple of records and doing some math on all the rows, then updating the result in a new record. The bulk update code I’m using is waaaay faster than a single row update, but it’s still taking about 45-60 seconds. That’s too slow for me to run an automation, which has a 30s timeout. Is the following code inefficient? while(updatedRecords.length){ await table.updateRecordsAsync(updatedRecords.splice(0,50)); } Regards, Scott
Hi everyone, I’m new to Airtable and I would need to obtain via api/sdk the possible values that a field of type single select has. Since I am implementing a form and I would like to get the values dynamically. This is possible? Thank you very much!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.