Need development and API help? Ask your questions here!
Recently active
Based on the advise here, I’m going to ask the user to enter an license/API key in order to prove they have subscription. My block might also need to store sensitive keys for other APIs. Where should I store these sensitive keys? This guide says it shouldn’t go in GlobalConfig. This answer says it should be an environment variable, but I want to enable non techincal users to install my block, so that doesnt feel like an option.
and failing, to be honest. Please take note that I have no idea what I’m doing and this script is pieced together from snippets and posts I found on the forum. This is what i have until now. I’ve tried multiple variations but I haven’t been able to write to a new attachment field correctly. //script settings let settings = input.config({ title: 'Create individual records from multiple attachments in a single attachment field', description: 'Creates 1 individual record in another table for each attachment in a multiple attachment field in the source table, and links the new records back to the source record.', items: [ // Source table select input.config.table('tableSource', { label: 'Table with existing attachments' }), // Source table: Attachment field input.config.field('attachField', { parentTable: 'tableSource', label: 'Attachment field with multiple attachments to split', }), //
Is there an endpoint to list all the bases for an api key, zapier is able to do it in their app, but i couldn’t find anything related to this in the standard api documentation ?
i'm trying with Postman, i don't understand how to find the email in a table of users and get the user data?it can be done?
Hi. I,m trying to filter records using filter formula based on record_id. The field is not exists in the table, and we don't want to create formula field to have record ids explicitly. Is there a way to compose query formula to filter data by their record_Ids like this:AND(OR(SEARCH(",recctaxd2aq9fvtfj,", "," & SUBSTITUTE(LOWER(ARRAYJOIN({record_id}) & ","), ", ", ","))))Thanks in advance.
I am working on a custom extension with Js/React. I would like to update the field of a specific record when someone clicks a button. function updateField() { let table = base.getTableByNameIfExists("Dart Applicant Tracker"); let record = useRecordById(table, "rec8XV8zW0GuGPBDX"); table.updateRecordAsync(record, { "Scheduled Staff": base._baseData["collaboratorsById"][base._baseData["currentUserId"]][ "email" ], }); }However, when I call my function I get the following error:Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app It seems like I can't use these methods in a function. What is a workaround?
Currently, my account cannot be accessed because Airtbale does not send a text message to my phone with a 2-layer security login code. What should I do now? thanks so much!!!
Good morning everyone, I can’t seem to figure out the correct syntax for updating a Linked Field within a record. My test base is simple, two tables, a name field in each, and a linked record between the two. Table First Table Second Example of my simple script below. It’s odd that in the Airtable GUI users may paste text straight into the “Second” link and it creates the items in the Second table. But scripting requires the object/array to be formatted - which I’d appreciate a hand on. :pray:t2: let table = base.getTable("First"); let query = await table.selectRecordsAsync({fields: []}); let recordId = query.records[0].id; //Updating the Name works as expected await table.updateRecordAsync(recordId, { "Name": "Example Record", }) const data = ["Item 1", "Item 2"]; //Needing a hand to stamp "Name" items into the Linked Record. await table.updateRecordAsync(recordId, { "Second" : data }) output.text("Updated a record!");
Hello, I’m reading documentation here on the rate limits for the Blocks API and I’d like some clarity around these two statements: Batch methods ( updateRecordsAsync , createRecordsAsync , deleteRecordsAsync ) may only update/create/delete up to 50 records in one call. Additionally, writes are rate-limited (maximum of 15 writes per second). Your app will crash if this limit is exceeded. Two questions: What is a “write”? Does calling a batch method count as 1 write? Assuming that a batch method counts as a single write, does this mean that it’s possible to update 750 records a second (15 batch methods a second * 50 records per full batch) via the Blocks API Many thanks
Airtable is already a great way to give folks in our business the ability to edit a wide variety of datasets. With Interface Designer, we expect to move even more of our data into Airtable. But Airtable is just one piece within a large ecosystem of business systems. We need to connect with a wide variety of custom internal systems and off-the-shelf systems. Event buses like Kafka make it easy to add new connections. Instead of connecting each system to each other system, you just connect everything to the event bus. It would be great to have a Kafka Connector for Airtable so we can stream out every single update to other systems that care about them. Other databases like Snowflake and Redshift have connectors. There are two ways to build this on the current system: the Script app and the API. Both approaches work, but they involve a lot of custom coding. It would be great to have an officially-supported option.
Hi all,Hoping someone can help me with this,I have a table with a list of brands and a score for each brand. The brands are labelled by category, some brands have multiple categories. I want to be able to automatically rank these brands by their score, and have that rank update if I filter.E.g if I filtered to just 'makeup' the rank would update to only rank the brands categorised as makeup.Included an example table that's simplified,Hoping this is possible!Thanks in advance,Charlie
Hello dear members of the community, I hope you’re doing well. I am requesting your help because Airtable removed the “editable shared view” that I was using before. I therefore need to find a workaround. I would like to use a script, so that when a partner edits a Linked Field (here ‘Status’) in his Table View, it will directly compare its value to the Status of the client in my Lead Table (lookup field) to update it, based on the one the partner selected. I have been able to prepare what I want using VSCode but I know nothing about scripting in JS or JSON. Could someone please help me ? I am adding some pictures to show the structure and what I imagined. Thanks a lot in advance for your help, Pierre
I am looking to export data from my airtable into JSON format. I am working with a Firebase Application, and I want to be able to collect data in AirTable, export it, and then dump it into a Firebase JSON based Database. Has anyone written a script/block/app that takes appdata and puts it into a JSON format? Thank You
I'm trying to generate some content using OpenAi's new ChatGPT API and I'm having an issue with updating the record field in my table with the response from their API. I have no idea why but for some reason I can't update the Long Text Field with the string in their response payload. Here is my script. Weirdly, it will work if I do a regex search using `exec` on the response first and then try to update the record... but it's only the first paragraph. // generates blog post content let table = base.getTable('Blog Posts'); let openaiUrl = "https://api.openai.com/v1/completions" let record = await input.recordAsync('select a record to use', table); if (record) { // construct the body let body = { "prompt": "Write a 1,000 word blog post about how to become a " + record.getCellValue("Trade") + ".", "temperature": 0.7, "max_tokens": 1024, "model": "text-davinci-003", "top_p": 1.0, "frequency_penalty": 0.0, "
Hi, I created a custom extension and a button to call this extension from a specific record. I would like to use a field from that record in my code, but I keep on getting React errors because of the order in which it is loading.I can't use record.getCellValueAsString within a useEffect hook to capture when useRecordActionData is loaded as it is considered using a hook within a hook.My end goal is to set number to the value in the Phone field of the selected recordTypeError: Cannot read properties of null (reading 'getCellValueAsString')Any ideas would be helpful. const [number, setNumber] = useState(""); let recordActionData = useRecordActionData(); let base = useBase(); let tableId = recordActionData == null ? "null" : recordActionData["tableId"]; let recordId = recordActionData == null ? "null" : recordActionData["recordId"]; let table = base.getTableByIdIfExists(tableId); let record = useRecordById(table, recordId); setNumber(reco
I am using a modified version of the currency conversion script kindly provided in this thread https://community.airtable.com/t5/development-apis/custom-currency-calculations-using-scripting-panel/td-p/136067 by @Vivid-Squid but I don't want to have to run the script each time and select which record I want it to run on. What I'm after is that when I input an amount in the 'Amount (GBP)' field it automatically runs the script to populate the 'Amount (Home Currency)' field.Any ideas how I do this?My script looks like this (it basically converts an amount in GBP to equivalent amount in the users local currency): let table = base.getTable('Currency'); let record = await input.recordAsync('Pick a record', table); let currencyType = record.getCellValueAsString("Local Currency"); let apiResponse = await fetch(`https://api.exchangerate.host/latest?base=${currencyType}`); let data = await apiResponse.json(); let conversionRate = data.rates.GBP; let result = await tabl
I'm looking to see if the solution below is viable to develop as a script inside Airtable.We use a loans table and a transactions table to manage a ledger in Airtable. In the transactions table, users enter either capital advances (loans out to clients), or capital reductions (payments against the principle). We also have interest only payments and a few other types for bounces and reverses in this table, but for this all we really care about is the principal impacting records. This goal of this script is to calculate the accrued interest between any two principal transactions and run this daily to update and hard code it so we always have a daily total of interest accrued on each account. Here is the rough flow I made in make.com (although it takes too many operations) List all active loansIterate through each loanGet loan informationList all principle transactions from the first to lastIterate through principle transactionsGet the first prin
Right now I have a multiple select field as follows: The script I’m trying to run has already identified the record IDs of all records with “Split Invoice” as a status. What I’m trying to do now is to remove that split invoice status and leave the rest (For example Estimated, Invoiced, those can all stay). What’s the best way to do this? All I can think of is to create an array of all statuses except for “Split Invoice” but I’m not sure how to write the syntax for that either. Code below: let table = base.getTable("Items"); let queryResult = await table.selectRecordsAsync(); var rec_IDs = [] var rec_names = [] for (let record of queryResult.records) { try { for (let status of record.getCellValue("Status")) { if (status.name === "Split Invoice") { rec_IDs.push(record.id); rec_names.push(record.name); } } } catch(e) { { continue; } } } // Script operations go here // As a fin
I'm trying to do a simple post request with Ruby and net/http but it keeps throwing the same error, here's my code: require 'uri'require 'net/http'data = { fields: { "Video Title" : "Top 10 funniest videos of 2022" }}uri = URI(https.....)headers = { 'Authorization': 'xxxxx', 'Content-Type': 'application/json'}http = Net::HTTP.new(uri.host, uri.port)http.use_ssl = trueresponse = http.post(uri.path, URI.encode_www_form((data), headers)puts response.body # {"error":{"type":"INVALID_REQUEST_BODY", "message":"Could not parse request"}} I've tried a bunch of things from google including downloading Ruby air table gems but they always throw the same error, I have a hunch that the object is not properly structured, If I send an empty object I get a different error: data = {}....response = http.post(uri.path, URI.encode_www_form((data), headers)puts response.body # {"error":{"type":"INVALID_REQUEST_MISSING_IELDS", "message":"Could not find field \\"fields\\" i
I have a board where I track ice cream names and the flavours they come in. Names are self generated where are flavours are common names such as vanilla or chocolate and so on.I want to use the npm airtable code here:https://www.npmjs.com/package/airtableand what I want to achieve is if a new flavour is added to the list of flavours, I want to also add this new flavour to the list of options available on the Airtable multiple select field. I am trying to mimic the code here:https://airtable.com/developers/scripting/api/field#update-options-asyncconst table = base.getTable("Tasks"); const selectField = table.getField("Priority"); await selectField.updateOptionsAsync({ choices: [...field.options.choices, {name: "Urgent"}], });However using the npm package it seems these functions are not available.I also tried using Curl as below:curl --request PATCH \ --url https://api.airtable.com/v0/meta/bases/{baseId}/tables/{tableId}/fields/{fieldId} \ --header 'Authorization: Bearer {myToke
Hi All, I would like to use the Airtable API to create a new table in an existing base. I've tried using Python/ PyAirtable as well as https requests via Postman. The API reference uses the following:https://api.airtable.com/v0/meta/bases/{baseId}/tables However, the last bit seemed rather strange to me plus I'm getting the following error: { "error": { "type": "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND", "message": "Invalid permissions, or the requested model was not found. Check that your token has the required permissions and that the model names and/or ids are correct." } } I'm using a personal token, with the required scopes (i.e. schema.bases:write)And the following payload (copied from the example): { "description": "A to-do list of places to visit", "fields": [ { "description": "Name of the apartment", "name": "Name", "type": "singleLineText" }, { "name": "Address",
Hello!I am getting error while requesting api - using your javascript examplevar Airtable = require('airtable'); var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('XXXXXXXXXXXXXXX'); base('Settings').find('recKrP4fJsCmnavbd', function(err, record) { if (err) { console.error(err); return; } console.log('Retrieved', record.id); });GET https://api.airtable.com/v0/undefined/Settings/recKrP4fJsCmnavbd? 404AirtableError {error: 'NOT_FOUND', message: 'Could not find what you are looking for', statusCode: 404}
Hi All,I am looking for a FIND or SEARCH formula to use in a GET URL.I need to lookup an ID, lets say "1234" and that ID is within a Multiple Select Option Column.the column on the table is a lookup and has multiple ids all in a string. example: 1234, 3563, 235234, 1435I am wanting to do the lookup to find the Record that the "ID" is within the multiple ids.The formula i'm using now, is looking up a Single entry, not an entry within multiple.What would my URL Formula Looklike?Here is what i'm using now.api.airtable.com/v0/"APP"/"MYTABLE"?filterByFormula=FIND("ID",{Client+ID})&maxRecords=1&pageSize=90Thanks
Before starting this, I will say I have no background in writing script. Any script/code I have posted was created using OpenAI API.What I am trying to create is an automation that upon an update in a selected Single Select Field will begin an automation that utilizes a script to input today's date & time in an adjacent Time/Date field.When I entered the code below into the Edit Script window and ran a test, the test failed with an error stating "ReferenceError: document is not defined at main on line 12" Can anyone provide feedback of what I need to change to make it work? var today = new Date();var options = { timeZone: 'America/New_York', hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: true};var timeString = today.toLocaleString('en-US', options);var dateString = today.toLocaleDateString('en-US');var dateTimeString = dateString + ' ' + timeString;var dateTime = document.createElement('div');dateTime.innerHTML = da
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.