Need development and API help? Ask your questions here!
Recently active
It would be really useful to be able to set confirmButtonDisabled and cancelButtonDisabled (both booleans) to diable the respective buttonts on the ConfirmationDialog component.
Been trying to wrap my head around how to display record attachments (images) in the markdown output of the scripting app. I heard rumours that’s possible :slightly_smiling_face: but haven’t seen any code snippets that seemed to be working []!($URL) produces errors asking for a function called Any hints?
Hello, We have created a new base with full permission. But i can’t write to this new base. Is anyone else having same issue? “message”:“You are not permitted to perform this operation because the field or table has been configured to limit who can perform this operation”
Hi, I have two tables. “Margins” and “Orders”. I need a script that would be triggered by an “New Record in the Orders table” automation that would use the value in the “Product” field to lookup a “Margin” value in the “Margins” table, then record this against the new order record, assuming a match is found. In doing this, I hope to preserve the current margin against a new order, something that would not happen with a normal lookup filed as it would simply update all the linked order records when a margin is altered. Would anybody be able to nudge me in the right directly here. I have no experience in Javascript, although I have basic knowledge of Python. How do I select the “Product” value from the latest record(s) in the Orders table and only update those records that have not been already updated previously be the script? Are there examples of similar scripts that anybody is aware of that I could work from? I am guessing that this example posted by @Sam_Cederwall could be a good st
When adding a file to an attachment field via the API (using Zapier) the file being added replaces any current files already in that field rather than adding it in.
In case somebody looks for ways to get uploaded Youtube channel video links to Airtable… You can go Zapier … Or you can go Integromat. However, Integromat doesn’t list Youtube as one of the available integration options. I’m not sure why is that. Is it because Youtube is not a business app? I found link to automation template and that enables to get the Youtube app. https://www.integromat.com/en/integration/79-post-new-youtube-videos-on-facebook You need to create API credentials for Youtube (it’s a bit pain, the description here doesn’t match anymore)… https://support.integromat.com/hc/en-us/articles/360025257393-Connecting-YouTube-to-Integromat-via-Google-OAuth-Client The “Search Records” module needs a Formula {YOURFIELDNAMEINAIRTABLE}=“NAMEOFTHEYOURUBEVIDEO”. In this scenario the name of the Yourube video matches the name of the record in the Airtable field. Set the limit of number of records to return to “1”. If multiple videos have same title, I believe higher number would res
Hello, as far as I understood I cannot pass an input when I call a script. Am I right ? I have a table A with 3 fields id, name, description I have a table B with 3 fields name, id (link with the table A) and single select (template, todo …) Each time there is a new record in A I want to create records in B with b.id = a.id for each record b.template. for those records the single select will not be template but todo. I hope it is clear :frowning: Thanks for your help Alex
I have a ledger for tracking inventory movements. When I create a new line with a 502 movement I want to run a script. The script has an input variable which is a list of linked records from another base. I want to read those records and get some data from them and then automatically create some new lines in my ledger base. I am trying to pass the values from the subcontracting records lookup The problem is when I read the subcontracting records it looks like it is reading multiples of the same record ID and when it writes to my ledger it links the incorrect material codes. Can someone help me with what I am doing wrong? //sets up the tables and input var let subcontractingTbl = base.getTable('Subcontracting'); let ledgerTbl = base.getTable('Ledger'); let inputConfig = input.config(); let mapOutput = 0; let compPosted = 0; //loop thorugh, read the subcontracting components and writes to ledger for (let i = 0; i < inputConfig.subcontractedRecord.length; i++) { let subconInpu
Background: Hello, any help with this is much appreciated. I’m pretty new to JavaScript, but learning quickly. So far I am proficient with variables, functions, scopes, oh—and commenting things to death! Problem: I’m trying to create a script that creates a new event that automatically fills in some recurring contextual information in an [Events] table. However, I cannot find anything anywhere about entering/recording the time of day into a {Date/Time} field when running a script. The event is always at the same time 12pm-1pm (EST in my case) but the date is what needs input(ed) by the user running the script. So Far: // identify base and table info let table = base.getTable('Event List'); // user input "Event Name" let eventName = await input.textAsync('What\'s the name of this event?'); // Create new record with default event criteria in the [Event List] table let recordId = await table.createRecordAsync({ 'Event Name': eventName, 'Event Type': { name: "My Cool Event" }, 'S
I just can’t find the right way to format my request. I’m trying to update a single field in a single record. but keep hitting - INVALID_REQUEST_MISSING_FIELDS",“message”:"Could not find field “fields” in the request body Getting data is fine. After a few hours trying different things I’m asking for help what am I missing? Any help appreciated API and Base ID Blanked out function apiCall(){ var API_KEY = ‘XXXXXXXXX’; var root = ‘https://api.airtable.com/v0’; var baseId = ‘XXXXXXXXXXXX’; var tableName = encodeURIComponent(‘Travels’); var recordId = “recSaJTXSBu1g8CBd” var endpoint = ‘/’ + baseId + ‘/’ + tableName + ‘/’ + recordId; var params = { ‘method’: ‘PATCH’, ‘muteHttpExceptions’: true, ‘Content-Type’: ‘application/json’, ‘headers’: { ‘Authorization’: 'Bearer ’ + API_KEY }, "fields" : { "Declaration link": "https://docs.google.com/spreadsheets/d/13V8gO7511yJ0830IpiKXtfYfKeuVVSJ8uqbXR-9Ne8w/edit#gid=0" } }; var response = UrlFetchApp.fetch(root + endpoint, params);
Hi – In an effort to save weeks worth of research, I’m hoping to find someone who may know the most efficient way to build out an automation process. I have no experience with computer language or programming and am officially waving my white flag. :rofl: I essentially need to build a custom numerology app. I need to be able to press a button in my Airtable and run a program to break down each name (first, middle, last - each in separate columns) into individual characters and assign each letter to a number. There are more steps to the process as a whole, but this is my primary need for assistance. I’m fairly certain this can be done with a formula by splitting the text string (name) into individual characters; however, I don’t know how to make this a dynamic process (for the len and/or mid functions) nor do I know how to run a split function without a delimiter. If anyone has any suggestions, all feedback is appreciated! As briefly mentioned, there are more steps to this process and
Hi all. With my custom CSV importer script, I’d like to do a few operations before the .parsedContents method should look at the file. Examples: My file uses a comma for decimal notation. .parsedContents simply removes them, so 4,5 becomes 45 but it should become 4.5 I’d like to take a closer look at date formats used in the file, because they may vary, and even if .parsedContents correctly identifies it as a date, the format may be DD/MM/YYYY or MM/DD/YYYY. The Javascript methods .readAsText() or .text don’t seem to work even though the documentation states that input.fileAsync() delivers a File object which is a Blob. Any clues?
Hey! I’m currently making the first steps with the Blocks SDK and having problems with fetching data from our Shopify Backend. I’m trying to do it like this (frontend.js): let url = https://xyz.myshopify.com/admin/api/2020-01/orders/${record.getCellValue("Shopify Id")} let response = await fetch(url,{ method: ‘GET’, headers: { ‘Content-Type’: ‘application/json’, ‘X-Shopify-Access-Token’: ‘xyz’, }, }) return await response.json() Whenever I trigger this function, the console logs say: Access to fetch at 'https://xyz.myshopify.com/admin/api/2020-01/orders/123.json' from origin 'https://devblock---123xyz.airtableblocks.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. Any help with this will be much appreciated :slightly_smiling_face:
Hi everyone, As part of our ongoing effort to make Airtable more and more extensible, we’re beginning to expand access to the Metadata API. The metadata API gives you read-only access to a list of a user’s bases, as well as the specific schema of each base - things like what tables exist, what fields exist on those tables, etc. Usage of this API currently requires a unique developer token, in addition to the user’s API key for whom you are looking to pull the metadata. You can view the metadata API documentation here, and request a developer token here. We are considering in the longer-term simply rolling the metadata API functionality into the main Airtable API - this would require some deeper underlying structural changes, however, hence in the short-term we are bridging the gap by issuing individual tokens. As always, we’re eager to get your feedback on what you’re looking to do with this and all Airtable API’s. The metadata API contains some known gaps - most obviously, that it is
Despite having standardized the look-up field, my table is giving very distinctly different answers in the formula field. An image of the formula field + look-up field are below. What could possibly be going wrong? What can I test to fix? My formula is: FIND(‘T003: Symptom’, {Rel_lookup_Terms_Type})
Hi there - Is it possible to determine which view in a form is being used to help determine what happens in an automation? For instance, my form is choosing items from a drop down list that is pre-sorted in a view. I want to run an automation based on that pre-sort. Is that possible?
Hello, My app keeps data on my server in sync with changes made to Airtable. My question: What is the best way to subscribe to record updates when using the blocks API? The useRecords hook simply returns all of the table’s records when a record is modified so it doesn’t seem the best way to keep track of updates. It looks as if the best way to do this is to write a custom useWatchable on all the records of the table so that I receive individual records as they get updated but I’d like to know if there’s a more elegant solution than this. I’d also like to know if there’s a native way to get notified via callback or event when a new record is created or if I’ll have to keep track of this on my end. Many thanks
Hello Everyone, I am trying to convert a string value to a datetime ? or how can I add a no of dates on a date format? Example, I have a date 08/16/2020 I would like to add 5 days to be 08/21/2020 in Scripting block I have this script, to create all number of eps and create the date assigned to that specific episode I have the start date value, and I have No of eps value. I tried to use a moment to add a duration of days, but it’s not working for me moment.duration().add(1,date) let importTable = base.getTable(“Titles”); let importQuery = await importTable.selectRecordsAsync(); let episodesscheduletable = base.getTable(‘Episodes Schedule’); for (let record of importQuery.records) { let rowcount =0; rowcount= record.getCellValue(‘EPS’) while (rowcount>=0) { if (rowcount===0) { }else { //let now = new Date().toLocaleDateString(""); let date =record.getCellValue(‘Start Date’) var rightNow = new Date(); //rightNow=date. let Pattern=record.getCellValue(‘Release Pattern’) let fullName = r
Hi, AirTablers (yup, It’s now a verb) ! I’m trying to build a clean two-way sync between AirTable and GoogleCalendar. My choice is Integromat because : (1) full two-way CRUD functionality out of the box (2) first useful paid plan much cheaper than Zapier for my use case. I have good coding background, but I’m still new to those codeless integration tools, and I was wondering if someone could help me build Integromat scenarios for my use case ? I have read this and that, but nothing really helpful. My logic so far is to use two scenarios : Watch GCal => C/R/U/D in AirTable (using URL of GCal event as a field in AirTable) Watch AirTable => C/R/U/D in GCal (using AirTable record ID as description of GCal event) My main concern is to avoid infinite loops, and to make sure my scenarios are as simple as possible (you should see the weird lines of Node.js I write sometimes…). Any input would be highly appreciated !
Hey all, I have a button that “Runs script”. I want the script to type "(a word)" into {FieldX}, obviously in the same record as the button that was pressed Thank you!
Is there a way to get user input from a dropdown list? I would like this list populated from the values in a single select field. Lee
Hello, I’m new to Airtable and I’m trying to build a React Next.js app with Airtable as an api. here is the relevant code in pages/index.js export async function getStaticProps() { var Airtable = require('airtable'); var base = new Airtable({ apiKey:process.env.API_KEY }).base(process.env.BASE_ID); const table = base(proces.env.TABLE_NAME); my .env: API_KEY=xxxxxxxxxxxx BASE_ID=appDAc9CXCfSiBuV8 TABLE_NAME=Content even when I’m running the app locally, I am getting error 401 that the airtable API key is invalid. If I print the process.env.API_KEY it is totally fine so the .env does work. When I copy the same key and paste it into the code, everything works fine!! It seems like Airtable has a strange problem, maybe with next js or something because I can’t get this to work in any way. I really need to deploy my app and can’t do that without hiding the key in .env/next.config.js…can anyone help on the matter? deployment error pic Thanks!
Hey Airtable team, I noticed that topics started closing automatically after 3 days, with no way of replying and contributing to the discussion. Specifically to the custom blocks topic where new things are learned and created on a daily basis (but in my opinion relevant to all categories), I think that this puts some breaks on the sharing of knowledge in the community and on it’s growth. Just my 2 cents. Best, Ronen
Hi all, I’m trying to develop a method to work with a given table with a various views. I have a table named “Send Pitch”. Under this table, I have multiple views. Each view tied to a different client. Each client has its campaigns with multiple names. Each campaign has its own “Pitch” or “Follow up” that needs to be sent to a potential lead. I want to create a method to show on a given column the full template of this pitch with personalization. I tried so many ways to build a flow for this problem, but I couldn’t find the right way to do that. Here’s an example of a view: Airtable Grid view - Airtable Explore the "Grid" view on Airtable. I need to work with these fields: Campaign name First Name User Name Fup Text Basically, I thought of this metric: Extract the fup number from ‘Campaign Name’ column Finding the relevant Pitch for the ‘fup’ code Assign it to a column Modify ‘First.Name’ and ‘User.Name’ I’ve tried to use a sequence
I’m not sure to understand what’s happening. I’m pushing files as attachments and receive the response as expected. For example, I get the following for the file I uploaded: { "id": "attIuYUqNG4YvfUvz", "url": "https://<...>/doc.jpg", "filename": "doc.jpg" } But then when I look at the history, Any tip on why this may be happening? :thinking:
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.