Need development and API help? Ask your questions here!
Recently active
Did the basic “Hello World” demo app. ie. selected “Add an App” then “Build a Custom App”, selected “Hello World” example and went though installing blocks-cli, doing blocks init and blocks run. I see the " Your block is running locally at https://…" message on my server. I specify the App URL back on airtable’s message box and click “Start Editing App”, but after about a second I get this message: Error running app Error: Disconnected from development server pollForLiveReload/</<@https://XXX.XXX.XXX.XXX:9000/__runFrame/poll_script.js:19:19 (I replaced my IP with “XXX.XXX.XXX.XXX”) When I try with “Simple Chart” example some GUI elements from the app show in the airtable’s dashboard space for that app, bu get the same error again after about a second… Any hints on why this error is happening here appreciated… I’m using demo apps as provided by airtable…
Is it possible to create scripts OR automation on tables using API endpoints? Thanks, Deepak.
Based on template by @kuovonne , I want to use button to run the script. But I don’t want create two buttons. My scenario is when Single Select field is “Not Started”, when I press the button, it will change to “In Progress”. When the field is “In Progress”, then I press the button again, it will change to “Completed”. How do I achieve this? Thanks.
How can I ensure Airtable properly handles dates I write from JavaScript into a Date field? This script pictured below properly inserts the Date retrieved into a Date field as long as I run it before a certain time. If I run it in the morning, for example, I get the date I expect in my Date field. I just ran this at 6:50pm in my current timezone and it entered the date into the date field as if it were a day later: This really has me thinking that it’s an Airtable date display problem, and not a JavaScript DateTime interpreter problem. I have the same issue with this script run as an Automation - Script Action as well. I do not have the Time included in this Date field, and I do not have the “Use the same timezone for all…” option checked: So my presumption is that this field should be interpreting DateTimes relative to the timezone my browser recognizes me to be in, or that my system is set to (and clearly the JavaScript that is fetching the date and displaying it in my script outpu
Hi! Trying to reach Airtable via curl from debian buster. root@689c6c6a3ea9:/app# curl https://www.airtable.com curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. Installed last updates of ca-certificates, tried to reload them but it doesn’t help. For now it solved when I manually installed SectigoRSADomainValidationSecureServerCA.crt into debian trusted cert store. Could you please check that issue?
Hi! I’m trying to automatically link records through a script created by @Justin_Barrett (Automatically link record based on plain text or formula result). But I can’t run the script as I get errors in the last line: Property ‘id’ does not exist on type ‘string | SitesTable_Record’. / Property ‘id’ does not exist on type ‘string’ What could be the problem? I have no knowledge about scripting… Thanks!
I’ve been testing out the Scripting block over the past few days. This is the most exciting thing to happen to Airtable…since Airtable :slightly_smiling_face: Does anyone know of a way to make the scripts resilient to changes in a table’s field names? For example, if I have the following code in a script: fname = record.getCellValue(“First Name”); this works great until someone decides to rename the “First Name” field to “Contact First Name” – at which point the script will no longer work. I’m wondering if there is some sort of “internal ID” for a field that stays the same even if the visible field name is changed. Thanks Bill
Hey everyone! I’m trying to create a script that will read whatever content is placed into the first column “Product Title” and create a url handle out of it. I’m just looking for it to copy whatever record is under “Product Title” to “Handle” and replace all instances of spaces with “-” instead. Thanks so much!
I am looking to run multiple search queries/scripts in three fields where users will enter a long format answer explaining project needs. These are populating in a request table. I have second Airtable that lists out my talent at my agency and have created a ‘Keywords’ column that lists out all the different expertise fields and past industries. My goal is to search through the long format answers client input and connect the keywords to the best match talent in my pool. Any thoughts or stimuli from past projects? Below is what I have tried so far, but do not know if there is a simpler way since it is two air tables and not calling another database outside Airtable let table = base.getTable('Project_Needs'); let resultsField = table.getField('Talent v2'); let record = await input.recordAsync('Record', table); let searchQuery = record.getCellValueAsString("TalentTable_KeywordsField") if (searchQuery) { table.updateRecordAsync(record, {[resultsField.id]: 'Updating...'}); output
I was looking into the Airtable API, and I looked into the section “list records”, I can see the sample code in Javascript, and some of the fields I have looked into, it only works on the ‘text’ or string field type. eachPage(function page(records, fetchNextPage) { records.forEach(function(record) { console.log('Retrieved', record.get('Name')); }); Then I tried adding the “profile photo” field, but knowing the field is actually a array type because there are separate URLS for different image sizes in a array. Simply what I did is this eachPage(function page(records, fetchNextPage) { records.forEach(function(record) { console.log('Retrieved', record.get('Profile Photo')); }); I tested in a playcode.io playground and came out as this: Retrieved (1) [{...}] Retrieved (1) [{...}] Retrieved (1) [{...}] Is there a way to get a item in a array field in this? I just want to get the attachment/image url.
Using gatsby-source-airtable. Was working fine until today (have made no code changes that would affect afaik): FetchError: request to https://api.airtable.com/v0/appXXXXXXXXXXXXXX/Products%20-%20T4?view= failed, reason: connect ETIMEDOUT 54.210.4.251:443 Tested via cURL and that seems to be working fine: https://api.airtable.com/v0/appXXXXXXXXXXXXXX/Products%20-%20T4?view=&api_key=keyXXXXXXXXXXXXXX Is this an intermittent server issue, or should I perhaps be looking within my code to debug? gatsby-source-airtable@2.2.0 concurrency: 5
Not a question, just thought I’d share in case any rookie developers like me are struggling with laying out a custom app. I’m having great success making various layouts for my components by utilising grid template areas via Styled Components - it’s incredibly intuitive. Here’s an example snippet and the resulting layout. Would love to hear anymore layout tips! const Section = styled.div` border: solid black 1px; display: flex; align-items: center; padding: 5px; ` const HeadSection = styled(Section)` grid-area: hd; ` const SidebarSection = styled(Section)` grid-area: sd; ` const LineItemsSection = styled(Section)` grid-area: li; ` const DeliverySection = styled(Section)` grid-area: dl; ` const TermsSection = styled(Section)` grid-area: tm; ` const TotalsSection = styled(Section)` grid-area: to; ` const FooterSection = styled(Section)` grid-area: ft; ` const GridContainer = styled.div` display: grid; grid-template-columns: repeat(9
Hi all, I am triggering a script upon row creation. I want to be able to respond to form submissions and manually entering rows as we migrate to this new table. For some reason the available “Field Values” are different when I test the “Trigger” and “Script” directly in the Automation screen: but when the script runs live against a form submission one field is missing: This is how the automation is failing, but you can see in the first screenshot that that field is available when running the tests: Is there a nuance I need to be cautious of when creating/automating form row creations? Or should I be triggering my automation on both form and manual table row creations? Many thanks for any advice :pray:
In 4 weeks, we’ll be rolling out a small change to the URL format returned from Table, View, and Record models via the .url property. Specifically, these URLs will now also include the base ID in their return value. This change affects both Scripting and Custom apps, and coincides with the recent change to include base IDs in Airtable URLs throughout the rest of product. This may be a breaking change if your script or app makes hard assumptions about the format of this url property (e.g. by deconstructing the returned URL into its component parts with substring() or similar). No action should be needed if your script or app only uses the URL for navigational purposes. Browser navigation will continue to work for the old-style Airtable URLs via redirects, although these redirects may not be supported indefinitely in the future. If your script or app constructs Airtable URLs from scratch, we recommend updating the construction logic to also include the base ID. Summary of changes Scrip
Hi All, I have a Tasks table, and an Appointments table, and I often find myself needing to manually link multiple tasks to a a single appointment. Say we are scheduled to meet with customer XYZ next Tuesday, and I have 30 tasks for them, but I’ll only be able to get to 5 of them next Tuesday. So I want to link those 5 tasks to the appointment. Is there a way to select those 5 tasks and link them all to one appointment? So far I have experimented with using a checkbox column in the Tasks table, something like “Ready to Schedule”, and that works okay, but it creates multiple records in the Appointments table, with the automation running the script after each row is checked. Is there a way to have a script run on the selected records (the checkbox on the far left of each row, not an added checkbox column)? Or am I thinking about this the wrong way? Is there a different approach you would take with this use case? In general I find myself wanting to select several rows and do something wit
Hello, I already posted in another part of the community, I’m wondering if this section would have been a better place? The core issue is that a date formatted formula column causes an error when creating new records with the error as below. ERROR j: Can't create records: invalid cell value for field 'Date'. Cell value has invalid format: <root>.0 must be a string, <root>.1 must be a string, <root>.2 must be an object at main on line 131 Thanks for your ideas!
Hello! I am brand new to Airtable scripting and trying to get a very simple script to work with no luck. What I am trying to accomplish is to have a use click a button then run a script to update 2 fields on that record. I have pieced this together and it doesn’t show any specific error but also doesn’t change the field (I am starting with only one first to see if I can get this working). Any ideas on what is going wrong? // Change these to match your base. let table = base.getTable('Master_Table'); let field = table.getField('Step'); // When run from a button field, the script skips the prompt // and automatically uses the button's record. let record = await input.recordAsync('Choose a record', table); let value = field.updateOptionsAsync.toString("QC Ready");
I have been successfully using this script for almost a year now and it stopped working last week. Did something on the backend change? Here is the error message I am getting: TypeError: record.getCellValue is not a function or its return value is not iterable at main on line 76 Here is line 75 and 76 of my script: if (unique && record.getCellValue(“Lock Content”) == true) { for (let rec of record.getCellValue(fieldToWriteTo)) { “Lock Content” is a checkbox field. Ultimately when it is checked the script doesn’t edit those records and when it is unchecked it is supposed to update, but I am getting the error message. I have never had this problem with this script and I like said earlier we have been using it for almost a year now. Here is my whole script. It’s a bit long and has some old iterations still in there. /* C O N F I G */ /* names: fill to match own table*/ let tableToPullFromName = 'Content Library'; let viewToPullFromName = 'Grid view'; let tableToWriteToName = 'Con
Hi, I have a problem with displaying the data from the API AirTable… it appears correctly on the console screen, but it does not appear in the exact location on the site
Can I have an OAuth2 authorization flow where the redirect_uri points to a custom app URL?
Hi all, Can I use Next.js to run a Custom App? Have any tried it before? Are there any incompatibilities? Thanks
The Airtable REST API allows one to create, update, and delete up to 10 records at a time. I need to know whether or not Airtable will prevent the modification of all record info provided in the request payload if any issues are to arise in the operation, whether that be due to partial bad input on my end or an issue on Airtable’s end. From doing some quick testing it seems that if operations are atomic but I’d love some confirmation from Airtable staff on this. Thank you!
I would like to know how to copy a column “Items” from one table to another table. Both table have the same naming “Items” Table Name: DB_Checklist Daily_Closing_Checklist View Name: DB_Checklist > Closing Field Name: DB_Checklist > Items Daily_Closing_Checklist > Items I want to copy one of the row of data from DB_Checklist/Closing/Items to Daily_Closing_Checklist/AllEntry. Can anyone show me how to code this? let checklist = base.getTable("DB_Checklist"); let checklistView = checklist.getView("Closing"); let dailyClosingChecklist = base.getTable("Daily_Closing_Checklist"); I only know this much, want to learn more on how to make my table more automate.
I have this script I made a month ago. It worked perfectly fine. Just tried it today and it doesn’t work. The fields that I’m updating with updateRecordAsync do not update. They are just blank. let newRecord = await main.createRecordAsync(obj) main.updateRecordAsync(newRecord, { "ID" : newID, "Discipline" : {name: record.getCellValueAsString("Discipline")}, "Experience" : {name: record.getCellValueAsString("Experience")}, "Duration" : {name: record.getCellValueAsString("Duration")}, "Activity Type" : {name: record.getCellValueAsString("Activity Type")}, "Content": newCombinedText }) Like I said, this script did exactly as I wanted to in the past. Did something change with updateRecordAsync?
Hello! I believe I discovered a new issue when working with Airtable’s automated testing feature. Here is my sample component: import React from 'react'; import { useBase, useRecords } from '@airtable/blocks/ui'; const Main = () => { const base = useBase(); // Table and view name will vary depending on your base const view = base.getTableByName('Component Table').getViewByName('Potluck Volunteer Sheet'); const records = useRecords(view); return ( <div> <h1>Testing useRecords</h1> <p>{records.length} records found for {view.name}</p> </div> ); }; export default Main; And here is the example unit test: import React from 'react'; import TestDriver from '@airtable/blocks-testing'; import { render, screen } from '@testing-library/react' import Main from './main'; import { fixtureData } from './fixture'; const testDriver = new TestDriver(fixtureData); describe('main', () => { it('renders correctly', () =>
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.