Need development and API help? Ask your questions here!
Recently active
Hi All, I’ve writing a script that uses an automation to create a list of tasks. So what I have is an onboarding base with a table full of onboarding tasks, when a record in the employee onboarding table is added it need to create a list of task, based on there Job Title, so need to filter the list to only create the tasks that are relevant to the Job Title. This is the script so far: let inputConfig = input.config(); output.set(’’,${inputConfig.FirstName}); fname_var = ${inputConfig.FirstName}; output.set(’’,${inputConfig.Surname}); sname_var = ${inputConfig.Surname}; output.set(’’,${inputConfig.StartDate}); sdate_var = ${inputConfig.StartDate}; output.set(’’,${inputConfig.StartLocation}); sloc_var = ${inputConfig.StartLocation}; output.set(’’,${inputConfig.JobTitle}); jtitle_var = ${inputConfig.JobTitle}; output.set(’’,${inputConfig.PersonalEmail}); pemail_var = ${inputConfig.PersonalEmail}; output.set(’’,${inputConfig.LineManager}); lnman_var = ${inputConfig.LineManager}; let import
Hi! How to determine the number of records / entries in a table via API using curl / php / pyton? Imagine a table with 12304 entries. Our current stumbling block is the API limit: we can only get 100 entries at a time via the API using PHP. In this regard, we have to make a lot of requests page by page. Then count the number of pages and multiply them by 100. Is there a more elegant way? Thank you!
Hi there! Looking to see if it’s possible to use the scripting block to create a folder structure from my airtable records that I would be able to download (presumably from an attachments field) and use right away in finder on my Mac! Possibly interested in hiring someone to make this happen if it makes sense!
Hi! I’d like to port an app I’ve been building to be an Airtable custom app, but my codebase heavily uses CSS imports everywhere (+ an important dependency I have does the same). This doesn’t seem to be supported by block; seems like all it would take would be to change the webpack config to use webpack’s CSS loader: webpack css-loader | webpack webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. FTR the error looks like this: Module parse failed: Unexpected token (7:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders > .some_css_class_here { .... Importing CSS files is used by create-react-app and most React examples, and would help lots of developers start porting apps t
Hi, I have two simple tables votecount: cityid (text e.g. ‘Birmingham’) emails (linked to emails) count (number) emails: emailid (number…) email (email address) votecount (linked to votecount table, displays the cityid) On my react app, i want users to enter their email address and select their chosen city. I want to post that data to my airtable base. I’d like to simply post the email and the city name (not the linked record id) to the emails table. Please could someone give me a hand with how to do that? I read something about typecast:true but i dont quite understand how that works. Thank you
I, I upload picture (bar code) from Google drive to airtable throught Integromat. But, the pictogram of the picture appear first time and desappear just after on Airtable. Sometime it work, sometime it do not work, it’s difficult to learn on it. You can see my scenario on integromat : I respect everything i see on web : Can you help me please ? Maybe something wrong on my configuration ? Is there an alternative ? Thank’s a lot, Matthieu
Hello, I’m trying to create a new block, but npm install -g @airtable/blocks-cli is not working The error log: ERR! stack at maybeClose (internal/child_process.js:1021:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) node-pre-gyp ERR! System Darwin 19.3.0 node-pre-gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit node-pre-gyp ERR! node -v v12.18.0 node-pre-gyp ERR! node-pre-gyp -v v0.13.0 node-pre-gyp ERR! not ok Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/usr/local/lib/node_modules/@airtable/blocks-cli
I have a Timesheets base with a “Timesheets” table that is filled when my workers submit timesheets each month. I have a separate “Rates” table (in a different base) that is synced to my Timesheets base and table. In this Rates table, I have a list of rates connected to each of my referral partners, including a start and stop date. If they do not have a stop date then that rate is considered active, if it does have a stop date than that is not an active rate. My problem is that I am currently manually syncing the Rates table Referral partner to the Timesheet entry, and it’s too much work and error prone. The whole point of doing Rates in a different table was to not break that past timesheet entry’s as you can see here: Financial reporting dynamic changing past data - #3 by Justin_Barrett I am looking for a script that can automatically detect what record selection to make in the Timesheets table from the Rates table, connecting my referral partner to the timesheet. The identifier can
I have looked at other postings regarding this same topic and cannot determine why I keep throwing a specific error. We are attempting to utilize a project management setup where there is a list of issues. An issue can be a parent or can be linked to a parent record (in a linked record field called “Parent”). For sorting and interface purposes, I am working to set up an automation that will add the children to the parent record (in a linked field called “Child”). I’ve written a script that will allow the child records to be appended, but I keep getting an error that the Child field “cannot accept the provided value” when I try to spread the existing array. What am I missing here?
I am building a fairly simple projects and tasks list. However, we need to isolate tasks and information between individuals who the tasks are assigned to. To do so we need to have a master project/tasks base and a series of other bases where tasks will be copied/synced to. Those bases will have 1 to 2 individuals assigned to them. They will view their tasks in their own base and when they make updates, their updates will write back to the master list. I store the master record ID and the child record ID for each task assigned. Right now, I write from the master table to the child when a record is added or updated using a webhook but today will switch to using the API key so that I can get a more complete response from any given update. My question is general: Who has done something similar - two-way updates between bases - and what was the logic and triggers you used? Not the code - more or less the concept. For instance, in a child base, the person can add a tasks as well but I need
Hi, i’m strugling with it 3rd day and read many docs about querying with fetch on JS, but seems like my understanding of web stuff is not enough. I used similar method for fetching from API with JSON, or from simple html site parcing text, but here I can’t achieve desired goal. Site is a base of clients, sorry but for now I didn’t have approve to disclose real name. https://search.somelongdomain.com, reloading to https://search.somelongdomain.com/ClientSearch.php?Accept=Accept it contains form with “Name”, “LastName” etc, then “Start Date”, “End Date” and two buttons, Search and Reset. After submitting “start_date”, “end_date” i press Search and have list of Clients registered within this period, 20-50 names for 2-3 days, and that’s my desired result. output loaded as https://search.somelongdomain.com/NamePick.php, it’s a form with name table and checkbox near each, but that’s ok, i know how to extract my data from any type of text format is html text, site looks a bit old, it doesn’t
Any plans to add support to environment files? I’ve tested but it seems blocks SDK don’t have support. Create React App has support for this. It’s a kinda basic feature and would be super useful. Thanks
Hello everyone! This is probably a simple question, but I could not figure out the answer. I have an Object and two arrays: const arr = [1,2,3]; const arr2 = []; const obj = {}; obj.id = arr[0]; obj.fields = {}; obj.fields["Array items"] = arr; arr2.push(obj); console.log(arr2); //array contains 3 items as expected arr.length = 0; //empty array console.log(arr2); //array is empty As I understand the Object instance keeps only a pointer to the array. Is it possible with an Object to keep a copy of array contents and how to achive that? Thank you in advance.
How are airtableblocks.com domains generated? Trying to whitelist domains for my app and wondering if that is possible.
I’m trying to find the X-Airtable-Client-Secret inside Airtable Account URL. But it isn’t there. Reading this Airtable API Meta I thought I was going to find it inside airtable.com/account but it doesn’t seem so. Where do I find the airtable client secret ? thanks in advance
useCursor does not re-render my component when the active Table or active View changes useBase does not re-render my component when I add or remove tables or when I rename fields This was working a week ago. Any feedback?
Hi, everyone! I need some hints to solve the scripting problem. I am not a programmer and only know easy html. Please let me explain what I am trying to do and see if you can help. I have setup a sync of a table 禮儀選曲 from Base A to Base B, so both Bases has the same set of data in this table. I have created a VIEW for any records meeting the filtering criteria in both bases. I have setup an automation to create a record in a table 選曲表 of Base B triggered when any record(s) appear in the VIEW. The data of the new records are from the table 禮儀選曲. The recordID of the original record is also stored in the new record. Until this point, everything work fine. I need to update the original record with the recordID of the auto created record. Since the automation cannot update record in another base, I have to use an API request to do this. I am just don’t know how to write this script to make it work. Please see my script and attached screenshot. Thanks for anyone would like to help! It is a c
I haven’t been able to figure out the syntax to update a multiple linked record field through a script. I want to add to the linked records. I’ve looked through the multiple posts that address similar questions, but somehow none of the changes are working. :see_no_evil: Any help appreciated!
Any help on this issue would be really appreciated! I’m making a simple app to create quotes. I’ve got everything up and running to edit fields with the <Input /> component and for anything other than text it works great e.g. function updateRecord (quote, recordFields) { quotesTable.updateRecordAsync(quote, recordFields) } <Input name="Hire Start" type="date" value={quote.getCellValue('Hire Start')} onChange={(e) => updateRecord(quote, {'Hire Start': e.target.value})} /> However, when the input type is text (or currency, anything that can be typed quickly), there’s a very noticeable delay in the update to the cell value which makes input glitchy and, if you type fast enough, inputs get dropped. I then switched to controlling the <Input /> with a state object, only writing back to Airtable in a useEffect() that watched the state object. This solved the issue but now updates made in Airtable (outside of the app) are of course not reflected in th
Does Airtable allow to read the content within/ inside the documents/ attachments with its own APIs?
The problem I’m having is that I use airtable for my financial reporting and because its a relational database if I (or someone on my team) changes data in one base itll change all my past financial reports… Is there any workaround for this? Possibly an app that can capture the dynamic data and make it static so I dont have to copy/paste each month into a google spreadsheet…?
Hi all, I’m new to javascript/airtable scripting and I’m trying to add the content of a form to a webhook when it is submitted. (Check in date, Check out date and Number of Adults) At the moment I have an automation to trigger when a form is submitted with the action of running a script. This is the script: let table = base.getTable("Managed Service"); let view = table.getView("Check Availability"); let url = "https://hook.integromat.com/[hidden]?"; let checkInDate = table.getField("Check in date"); let checkOutDate = table.getField("Check out date"); let adultsNumber = table.getField("Number of Adults"); await fetch(url + "&checkInDate=" + checkInDate + "&checkOutDate=" + checkOutDate + "&adultsNumber=" + adultsNumber); console.log(url + "&checkInDate=" + checkInDate + "&checkOutDate=" + checkOutDate + "&adultsNumber=" + adultsNumber); When the script runs I get the webhook pushing to integromat, however the variables just show [object Object] as seen here:
Hi everyone, I’m executing a post request via the customer script app pointing to an integromat webhook to trigger an automation. The integromat scenario takes a while to run (approx. 45 seconds), as it duplicates heavy Google Slides presentations. The scenario ends by a the simple webhook response such as this one: { "body": {"message":"Scenario successful."}, "status":200 } I’m receiving the following error: Unexpected token A in JSON at position 0 This would normally indicate that the JSON string is malformatted and can’t be parsed. But a few tests, it looks like the await response.json() line is executed before the response is actually returned from integromat (it waits ~40seconds for a response before moving on). I have tested a mock scenario (running in a few seconds) returning the same json string and it works just fine. According to the researches I’ve made, default fetch() requests timeout at the time indicated by the browser which would be 300 seconds in Chrome, but I’m
I’ve got a Scripting app script that uses createTableAsync(), and it’s been working fine for months. Today when I run it, I get an error of the form: j: No table with ID tblPJSEYaC7kb5yIF in base ‘Untitled Base’ at main on line 1 The following script demonstrates the error. It has just one line, taken from the createTableAsync() documentation: const tableId = await base.createTableAsync("Tasks", [{name: "Title", type: "singleLineText"}]); I expect that this line would execute without an error, and tableId would end up with the ID of the created table. Instead, the Scripting app stops with an error message in the console, halting the script prematurely. (The table is created, for what it’s worth, but the script stops and does not complete the rest of the operations.) Why have I started getting this error with createTableAsync()? Is there a way I can fix it? Or can Airtable fix it?
I have an airtable base with ~1000 records. Each row record has a start and end date as well as additional information. I need to transform each record into multiple rows so that a record with a 3 month plan is shown in 3 rows, on a monthly basis (always 1st of every month)
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.