Help

Re: Are there create APIs for Table, Fields in a record and Views?

2726 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ashwin_P
6 - Interface Innovator
6 - Interface Innovator

I did not see these APIs in the documentation. Does anybody know if these APIS exist? - createTable, createFieldInARecord, createView .

16 Replies 16

We don’t have those APIs right now. Can you share how you might use them to help inform our prioritization?

Ashwin_P
6 - Interface Innovator
6 - Interface Innovator

One example: fetching data from another API which returns json.

As of now we have to create the table and all the fields and only then the api data can be populated into Airtable.

With createTable and fields API - we can query the data and automatically create the Table and all the fields required. User only had to customize the field types if required.

Ronen_Babayoff
7 - App Architect
7 - App Architect

@Kasra, I also have a use case that starts repeating itself - in case of a saas block (i.e. a product where each base is a customer) use the base as the backend db of the saas block (or at least store some of it’s base specific data in there) - I would make it so that those tables can be hidden or not editable by default (or at all) (i.e. block tables), so that users don’t change the schema of those tables, and break the block.

A similar concept can be found in the shopify api, with metafields that shopify apps can create for their own use and store their app specific data there.

I know you can use the GlobalConfig for this, but then I loose all of the advanced features that come with doing it with tables and the blocks api - and more importantly, you cannot access that data from outside the block - i.e. from the regular airtable api, by parts of your product that run outside the block.

Cheers,
Ronen Babayoff
Superblocks.at

I’ve also been poking around the documentation to see if it’s possible to configure a field in a table programmatically.

My use case is to sync data from a table in one base to a table in a separate base. I’m attempting to create a scripting block to do this.

The endpoints that would be extremely useful for this type of usecase are createFields or updateFields.

@Kasra – Am I understanding correctly that it is not currently possible to programmatically create/update fields in a table either via API call or via the scripting block interface?

Hi @Kasra

I got almost the same Use Case but in addition to this I would programmatically customize the field types & type format if required.

Best

olπ

The more I think about it, the more it makes sense to have block-specific tables, similar to app storage in mobile apps. The user can’t edit them (or, in v2, edit only specific fields in them, if block permits), or even view them??, but he can uninstall the block or clear the data in them. Blocks can use them via the blocks api and get all if it’s goodies or from the public airtable api.

Airtable can hugely benefit from it by tying them into the pricing model - block table records count against # of records in plan and the user can see how many records a block consumes.

Later on, airtable can provide blocks with an api to publish which tables they use, the purpose of each table, and how many records they use, and allow the user to clear data on a per table basis. For example, clear old log data, but keep config data, similar to deciding what to clear in the browser history.

@Kasra any plans for such a thing?

Cheers,
Ronen Babayoff
Superblocks.at

I would like to use a typical develop->staging->master work flow. I want to write migration scripts with some sort of DDL that I can get working in development environments, and the automated in a CICD flow as it progresses from develop, staging and then to master. For more context, we are using AirTable like a headless CMS.

We have various tables where we create columns for each month, week, etc.

In our case we are trying to forecast sales for various products, so seeing the change in their monthly sales data, monthly ranking, etc is really useful. I gather this data via a script and right now I need to create the columns ahead of time or each time when I run my script. It would be great if my script could just create these columns.

You can’t create fields in a script, but you can in a custom block: Airtable Blocks SDK

yes that’s right @Kamille_Parks,
and in relation with this:

Not yet tried: I’ve first to play with REACT.js and that’s what I’m doing now.

Best,

olπ

Lukas_Barth
4 - Data Explorer
4 - Data Explorer

We would also very badly need this feature!
Right now, we are managing more than 40 bases and if we want to add a new table to all of them, this sometimes takes us more than 5 hours if we have to do it by hand!

Please implement those APIs and please make it also possible to create automations via the API because also adding those takes us hours and hours for all our bases. We really need those features and using the Blocks SDK is not very convenient, not to mention that the Blocks SDK does not support creating formula fields and many other things.

I have a question posted about some errors I’m experiencing in the JavaScript console but the code example in my reply to that initial question (below) creates new tables and enables field linking (there was no example of this that I could find in the docs or articles).

createTableAsync example with MULTIPLE_RECORD_LINKS? - Development and integrations / API - Airtable...

Hey, I would suggest you create an automation in the base you want to RECEIVE records for a ‘Webhook’ then take the link provided

Navigate to the base you want the SEND the data from, create an automation for whatever you want, however your action will have to be ‘Run a Script’ from that level you must make a POST to the ‘Webhook’ link provided for the other base.

Of course this suggest you must decide how the data sent is handled. This method worked for me.

Hey, I would suggest you create an automation in the base you want to RECEIVE records for a ‘Webhook’ then take the link provided

Navigate to the base you want the SEND the data from, create an automation for whatever you want, however your action will have to be ‘Run a Script’ from that level you must make a POST to the ‘Webhook’ link provided for the other base.

Of course this suggest you must decide how the data sent is handled. This method worked for me.

Thomaso
5 - Automation Enthusiast
5 - Automation Enthusiast

Do you have an answer on when these API’s might get implemented?