Set row link to other records by sending its key value in API

This is an almost a deal breaker to me.

Airtable has a feature called “smart links”, if you create via API a new row in a table that has a “link to other records” column type, you can send the key value of that link (not the id!) and that record gets linked automatically.

For example, if I have to tables:

Table 1
customer_id / name / membership
cust-0001 / John / premium

Table 2
membership / price
basic / 10 USD
premium / 100 USD

On aritable I could create a new customer record vía API simply by sending:

“customer_id”: “cust-0002”,
“name”: “Laura”,
“membership”: “basic”

And it gets linked automatically!

On sea table its a very convoluted process, I have to:

  1. Create the row without the link field
  2. Get the link column link_id and other_table_name via Get A Base’s Metadata
  3. Get the other_table_row_id via List Filtered Rows
  4. Link the row via Link A Row

4 API calls, just to create a record! Not to mention that the last 3 steps, I have to repeat for each record on that row, or mess with a batch update.

Please this feature is a must for using seatable as a no-code database. Today I’m stuck not using links on any of my tables.

We will improve the API in the future. Regarding the number of calls, as link_id will never change after link column creation, you can write the id in your code directly, the same is for other_table_name.

In your another table, the row ids for membership plans will not change too. So you can read them in the beginning of your script and put them in a map.

So actually only two API calls are needed for each new row:

  1. create the row
  2. add link

You are right with the link_id and the table_names.

However, my application is adding dynamically records to both tables. It’s not best to solution to hard code the row_ids. I have to get the row_ids via API if I don’t want to map the ids every time I add a record.

Please keep this in mind in the future, while you improve your API. At this point the first colunm of each table it’s not a true key value, it’s just an ornamental column type.

Are there any updates on this request?

Something similar to “smart links” already in development?

This is an important feature! I am trying to establish kind of a similar thing but with several linked fields/columns in one table. All of which are supposed to be created dynamically via a Script/API.

You can now use “automation rule → Add links” to link records between tables. You can also use “Data processing → Auto add link” to add links to existing records in bulk.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.