n8n-nodes-airtable-programmatic
v0.1.0
Published
Create, update, and delete Airtable schemas
Readme
n8n-nodes-airtable-programmatic
This n8n node is developed using the programmatic style. It allows you to manage your Airtable base schemas by creating and modifying bases, tables, and fields directly from your n8n workflows, which is especially useful for automating setup and infrastructure maintenance in Airtable.
n8n is a fair-code licensed workflow automation platform.
Features
- Base Management: Create new Airtable bases and get their schema.
- Table Management: Add new tables to your existing bases.
- Field Management: Create fields of various types (text, select, currency, etc.) in your tables.
- Deploy from JSON: Define and deploy a complete base structure, including tables and fields, using a single JSON object.
- Easy integration with n8n workflows for schema automation.
Installation
To use this node, you need to install it manually in your n8n instance.
Manual Installation
- Navigate to your n8n custom nodes directory (usually
~/.n8n/custom/). - Run the following command:
npm install n8n-nodes-airtable-programmatic - Restart your n8n instance.
If you are using Docker, you may need to add this installation step to your Dockerfile and rebuild the container for the changes to take effect.
Operations
Base
- Create: Creates a new base. You can include initial tables upon creation.
- Get Schema: Retrieves the full schema of an existing base, including its tables and fields.
Table
- Create: Creates a new table within a specific base. You can add initial fields.
Field
- Create: Creates a new field in a table. It supports a wide variety of field types like
singleLineText,multipleSelect,currency,date, and more, with specific options for each type.
Schema
- Deploy From JSON: Creates and configures a complete base, with its tables and fields, from a structure defined in JSON format.
Credentials
To use this node, you need to configure Airtable Enterprise API credentials:
- Go to the "Developer Hub" section in your Airtable account settings to generate an Access Token.
- Get the Workspace ID from your Airtable workspace URL.
- In n8n, create a new credential of type
Airtable Enterprise API. - Enter your
Access TokenandWorkspace ID.
Usage
Here are some examples of how to use the Airtable Schema Manager node.
Create a New Base
- Add an
Airtable Schema Managernode to your workflow. - Configure the
Airtable Enterprise APIcredentials. - Select the Base resource and the Create operation.
- Enter a name for your new base.
- Optionally, you can add initial tables and fields.
- Execute the node.
Deploy a Base from a JSON Schema
This is one of the most powerful features. You can define the entire structure of a base in a JSON object and deploy it with a single operation.
- Add a
Setnode or similar to define your JSON schema. - Add an
Airtable Schema Managernode. - Select the Schema resource and the Deploy From JSON operation.
- In the
JSON Schemafield, enter your JSON object. You can use an expression to get it from the previous node. - Execute the workflow. The node will create the base, tables, and fields according to the definition.
Example JSON Schema:
{
"baseName": "My New Contact Base",
"workspaceId": "wspXXXXXXXXXXXXXX",
"tables": [
{
"name": "Contacts",
"description": "Customer contacts",
"fields": [
{
"name": "Full Name",
"type": "singleLineText",
"description": "First and last name"
},
{
"name": "Email",
"type": "email"
},
{
"name": "Status",
"type": "singleSelect",
"options": {
"choices": [
{ "name": "Active", "color": "greenLight2" },
{ "name": "Inactive", "color": "redLight2" }
]
}
}
]
}
]
}Resources
License
This project is licensed under the MIT License.
