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')