Need development and API help? Ask your questions here!
Recently active
HiI'm reading my Airtable data using the API which is working fine, I'm now trying to write back to Airtable but I am having issues.I can write to Airtable successfully if the field is a string or a number but I can't when it's a currency. Any ideas how I do this?This is how I am currently doing it: Request.headers['Authorization'] = 'Bearer API here'const obj = Noodl.Object.get(Inputs.ObjectId) Request.content = { records: [ { fields: { "Overhead": obj["Overhead"], "Amount": obj["Amount"] } } ]} Amount is currently a number although it doesn't matter if it's a string or a number as they both work but currency does not.
hey! trying to get this script to run, and I cannot seem get it right. Any help would be appreciated!Scenario: I'm trying to update a list of Records as a step in an automation. I have my automation to receive both the row for which the values will be inherited from, and the list of records in which to deposit the values. I've modified what seems to be a popular script, below:Script let config = input.config(); let StackerEmail = config.StackerEmail let ALink = config.ALink let records = config.RowIDs let table = base.getTable("Projects"); for (let record of records) { await table.updateRecordAsync(record, { "[For Stacker] A Email": [{StackerEmail}], "A Link": [{ALink}], }) } The error I receive: ERROR Error: Field "fldLpHsJuxicnS2eZ" cannot accept the provided value. at main on line 8 input (With examples & field types)RowIDs |&n
Hey Guys, My question is how many external API calls we can make in Scipting Extension Block per execution.FYI, my usecase is to read records(around 2000) from a table view, make 2000 API calls for all of these records, and then finally update the records in a batch update of 50.I particularly want to know that if there's any limitation on making external API calls in scripting extension block?Thanks!!
Hey. I need some help scripting to generate next available SKU when adding a new product through an Interface.My table is called PRODUCT MASTER and my column is SKU. Depending if product category (column category) is Software, Subscription or Hardware, it should look for and create the next available SKU number in the 100000, 200000 or 300000 range. And how can I add this automation to the Interface form that I have created? Or do I need to add the automation to a button? Appreciate any help! 🙂
Admittedly, I'm super new APIs in general, and I'm using ChatGPT to generate the code. So, if you're looking at it and you're like 'you and chatbot are wrong about everything and this can't be done', please let me know.Here is my use case:Imagine I am a duplicating a base and all of its tables and records from one Airtable account to another via API. I push a button, and it runs a script which performs this action.My first question is, with the new API, is this even possible?If so, my follow up question would be related to the code ChatGPT gave me. I filled out the placeholders with the appropriate information (I think), but I get a 404 error that returns 'Error Copying Base: undefined'.I'm using the new token api with all scopes allowed on the particular base I'm trying to copy to another Airtable account.My main question would be: what the heck am I doing wrong?And also: is the SOURCE BASE ID and YOUR APP ID not the same thing? They're both just app ids for the base, yeah?<script&
Hi folks! I have an API I’d like to interact with in the Scripting block which requires AWS V4 signing in the headers. There are a dozen ways to do this very easily using npm libraries but I’m wondering if anyone has some guidance or resources on how to do that with the standard library instead. I imagine there are standard library functions for hmac and the like.
I got a user table and all the users link to a Company table to a specific company. How can I query all the users under that company?
Hi everyone, I'm trying to create a new formula copy the product link and add my id to the end please help. Also any resources on formulas fr babies would be great because i feel my last hour was jumping down a rabbit hole to beginners which for me was in a completely different language. Thanks much. ={Product link}(gngimportsus-20)
We utilize the QR Code Extension in our data base & am looking for simple automation to trigger said extension when a form is submitted. I have all the steps down but the trigger from the automation to hit the manual button on extension. I expect its a script but Im fairly new to this platform.
Hi!following the public api of Airtable, I tried to create a new field to an existing table of an existing base. It all goes as expected though the new field that I create is hidden. I wonder if there’s a flag I need to send in the api to have the new created field not hidden, or to show fields through another api calls?Thanks!
Hi everyone,I currently use Airtable as my backend and bubble as my web application interface.There is a plugin on Bubble to synchronize data from Bubble to Airtable quite easily through the API.But I saw that API keys will be replaced by tokens starting next year and I was wondering if you know how to use these new tokens to synchronize from Bubble to Airtable, thanks!
Hello! I am in desperate need of help. I can't figure out how to "filterByFormula" in the following script. I am trying to send a JSON payload via webhook to MAKE.com. I only want to send records where a given field is blank. I have tried multiple variations of the filter but can't figure out why it always sends EVERY record. let table = base.getTable("BA Aggregated Calendar 2022-2023");table.selectRecordsAsync({fields: ["Event ID", "Outlook Category", "Users"],filterByFormula: "blank(Outlook Category)",sorts: [// sort by "Users" in ascending order...{field: "Users"},]}).then(query => {const payload = {records: query.records.map(record => ({id: record.id,eventID: record.getCellValueAsString("Event ID"),outlookcategory: record.getCellValueAsString("Outlook Category"),Users: record.getCellValueAsString("Users")}))};const options = {method: 'POST',headers: {'Content-Type': 'application/json'},body: JSON.stringify(payload)};fetch('webhookhere', options);});
I am new to scripting & know that I dont know exactly what I am doing however I like to learn & am kind of learning on the job taking it 1 step at a time.When creating a script the following code will allow the user to choose which table & field they want to use in the script from the script settings. // Click the "gear" icon in the top right to view settings let config = input.config({ title: "Script Title", description: "Script Description", items: [ input.config.table('selectedTable', { label: 'Table to use', description: 'Pick any table in this base!' }), input.config.field('selectedField', { label: 'Field inside the above table', parentTable: 'selectedTable', }) ] }); I want to be able to select multiple fields. But I only want to be able to select:Fields that are either a singleLineText or a multilineText.Only be able to select each field once.How w
I want to create a file upload interface on my custom app so that collaborators/users of the app can upload an image from their file system to the base (instead of using the airtable interface) Is this possible, and if not, can you suggest any workarounds? Thank you!
I'm not familiar with Javascript.Looking to make a button that will start a script to generate an alphanumeric string that's 8 characters long. The code I found on Google to generate a string is:function makeid(length) { var result = ''; var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var charactersLength = characters.length; for ( var i = 0; i < length; i++ ) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } console.log(makeid(8));However, I'm not sure how to make it output into a record in a table in Airtable. Is it possible to make it replace the same record every time the button is pressed? Is it possible to clear the record after x amount of time?
Hi,I am building an application to get data from a view and attempting to patch it back to the view. However, I haven't found any endpoints to do it. First, I want to check whether the view has a field. If it doesn't, I shall create a new field and patch my data to the view. Any help is highly appreciated. I am using Nest.js Axios, and here is my code: createField(baseId: string, tableId: string, field: string, token: string) { console.log('creating field...'); // when I post, it gives me 422 const url = `https://api.airtable.com/v0/meta/bases/${baseId}/tables/${tableId}/fields`; const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json', }; const body = JSON.stringify({ fields: { name: field, type: 'singleLineText', }, });&nb
Is there a way to filter RecordQueryResult by a checkbox field; let's say I want all records where the value is False? let query = await table.selectRecordsAsync({ fields: [uniqueIdField, dateDueField, projectField, waiveRushField, comparisonField], }); That's the query I've been working with. I'd like to filter the resulting records to only pull items where waiveRushField is not marked.Thanks!
Hi there, I’m a French PharmD and I use Airtable to manage all patients’ appointments. It’s very useful for all my team except 1 laborious step : create appointments. I manage all appointments in a dedicated table (every X days I create X records for next days, so anyone can select a slot). So far I create appointments (1 appointment = 1 record) one by one. Ideally, I would like to fill a form and create multiple records with an automated script. For exemple, if I fill a form with : from : 22/10/2022 09:00 to : 22/10/2022 11:45 every : 00:15 (fifteen minutes) ==> It run a script and create records : 22/10/2022 09:00 22/10/2022 09:15 22/10/2022 09:30 … 22/10/2022 11:45 As a Pharmacist I don’t have skills to create a reliable JavaScript code in automation. Any help would be grateful ! :slightly_smiling_face: Thank you, Hadrien
I want to make an automation that runs a script, and in that script I'd like to call an ajax function (either with jQuery somehow or with XMLHttpRequest() etc.) to grab some external data from a Google calendar. Is this possible? I've searched around and can't seem to find any information on it and the script editor says the ajax functions aren't defined, so I'm not sure if/how I can include jQuery if that can help.Thanks
Hello,I am setting up a record to duplicate a record (but only certain fields) in a base by taking input variables and then creating a new record and inputting these into the new record as suchlet recordIdNew = await table.createRecordAsync({ "DateTest": StartDate, "SingleLineText": SingleLineText, "PhoneNumberTest": PhoneNumberTest, "CheckBoxTest": CheckBoxTest, "LongTextTest": LongTextTest, "EmailTest": EmailTest, "SingleSelectTest": {name: SingleSelectTest},}); I have managed to achieve this with all the required data formats but I’m really struggling with Multiple Select. I am able to pull the data from the original records field and it shows in the console as followsCONSOLE.LOG▶(2) ["AA", "BB"] The issue is, I don’t know how to add it to the new record (like I am able to do with all of the other data types) I have
Hi,I am working on a project requiring syncing complex data to Airtable. After having errors due to some columns containing json data (working on a Python script), I switched my API queries to typecast=true which solved my issue (json data is converter to text).https://airtable.com/developers/web/api/create-records#request-typecastHowever, I was surprised that using this parameter gives me some errors on dates formatted as "2023/01/19 10:12:18" while same data was working correctly with typecast=false :requests.exceptions.HTTPError: ('422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/*********/*********', '422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/*********/********* [Error: {\'type\': \'INVALID_VALUE_FOR_COLUMN\', \'message\': \'Cannot parse date value "2023/01/19 10:12:18" for field date_intervention\'}]')Isn't typecast=true supposed to be more permissive ? If so, why such errors on dates while they are accepted on typecast=
I’m using a button to trigger a Zapier webhook. It’s annoying that every time the button is clicked, a browser window is opened. As I can select to run a script with the push of a button, is there any way to run a script in the background that triggers the webhook? Thanks!
Good day,I would like to download attachments via a link keeping the original file name. I managed so far to upload a document with the correct file name but the issue is that when downloading in another page it becomes a new generic names for all filesDo any of you know a solution to this? This is currently being integrated with Softr.Thanks
Hi all!I'm very new to scripting and I have this code that was working before until recently. When I run the code I see TypeError: Cannot read properties of undefined (reading 'getCellValue') at main on line 271Line 271 is let client_apps = globals.site.getCellValue("Apps") For reference this is the first part of the code that the line is referencing: var globals = {} let client = await input.recordAsync("Which client has a change?", base.getTable("📊 Clients")); const sitesTable = base.getTable("🌐 Sites"); const sitesQuery = await sitesTable.selectRecordsAsync({fields: ["Apps", "Client", "Site Name", "Site Type", "Status"]}); // Does the client have multiple OTT sites? If so, we'll need to know // which app suite the change applies to // Get all the client's Site records var clientSites = sitesQuery.records.filter(record => record.getCellValue("Client") && (record.getCellValue("Client")[0].id === client.i
Hi guys and gals 🙂I am a newbie to Airtable, can someone help me out with the script and automation?I want to populate two fields in the column Notes and Points with the data returning from a web API call using bearer token authorization, but I also need to add the parameters included in Product and Quantity in the API call and filter out specific elements from the json file to be stored in the field Notes and Points.I have the following columns:RunWork | Status | Product | Quantity | Notes | PointsRunWork contains the checkbox.Status is either blank, In Progress, DoneNotes and Points will get populated with json data from an API call.My logic would be, If RunWork is checked,-> Then change Status to In Progress-> Then populate Notes and Points using parameters in Product and QuantityWhen all fields are filled,-> then change Status to DoneAny help or code example is greatly appreciated!
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.