- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 21, 2022 12:47 PM
Hi, I am trying to move records form one table in Base A to another table in Base B. To do this, I want to build an app, which automatically creates a table in Base B and then copy the records from Table in Base A into Table B.
I do not have access to Metadata API which makes it easier to do so. I saw in a post, I can use the blocksSDK to create table, which I can do if I am in the same base as the App is installed, but not in the additional base.
Airtable FAQ says this is possible by providing the API_key
Yes. While each app runs in a sandboxed iframe and can only access data from the base that it’s installed in, you can use the Airtable public API in tandem with a custom app to interact with another base. To do this, the custom app will need to ask the user for their Airtable API key. Then, the app can use this key to make calls to the API endpoint for the other base. You can find the public API documentation under “Help” in any of your Airtable bases.
But the public API doesnt have a createTable API call without having access to Metadata API.
I have tried using the below snippet and tried to initiate a new base with BaseB ID, but this dint work either. Any help is appreciated.
var Airtable = require('airtable');
Airtable.configure({
endpointUrl: 'https://api.airtable.com',
apiKey: 'YOUR_API_KEY'
});
var base_A = Airtable.base('Base A');
var base_B = Airtable.base('Base B')
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 22, 2022 05:11 AM
The public REST API cannot create a new table. If you want your custom app to copy records from base A to base B, the target table must already exist in base B.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 22, 2022 09:51 AM
Seeking to see, if I can using the blocks SDK and point my base to another base id?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 22, 2022 10:43 AM
No, you cannot use the blocks SDK to directly access another base. The most you can do is have the custom app use the REST API to access the second base, including being limited to what the REST API can accomplish in the second base.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 22, 2022 12:23 PM
Sigh!, Without having access to the Metadata AOI, these things are getting very limited to automate.
The use case I am working on, my base is hitting the limits and I want to archive the records in my base to another base with full automation, but looks like this is not possible.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 23, 2022 06:43 AM
Welcome to Airtable! :winking_face:
Sometimes the answer is best found by stating the requirements without contemplating (or deeply biasing) the assessment with implementation details. For example - this is not a requirement (it’s an implementation detail):
Create table in another base using API
This is a requirement:
I want to archive the records in my base to another base with full automation
And exploring this as a business requirement will cause you to consider issues like:
- Do I need all of this data in Airtable all the time?
- Are there core records that are operational assets vs non-core records that are strategic assets?
- How do archive records relate to the reporting and business analytics functions?
Consider this.