Airtable - Upload File from Workflows to Airtable
Overview
Easily transfer data from a CSV file to Airtable using batch operations. Choose to either append new records, update existing ones, or completely replace the table's contents. When updating, you can identify records by their ID or match them based on specific fields (key_fields). Be cautious with the replace option, as it will remove all existing records in the table before adding the new data from the CSV file.
Variables
Name | Reference | Type | Required | Default | Options | Description |
---|---|---|---|---|---|---|
Personal Access Token | AIRTABLE_API_KEY | Password | ✅ | - | - | Personal Access Token associated with a user that has access to the specified Base, Table, and View listed. |
Base | AIRTABLE_BASE_ID | Alphanumeric | ✅ | - | - | The ID of your Airtable base. Found in the URL of your base and starts with `app` |
Table ID | AIRTABLE_TABLE_ID | Alphanumeric | ✅ | - | - | Can be the Name (case sensitive) or the ID of the table. The ID can be found in the URL and always starts with `tbl`. |
Key Fields | AIRTABLE_KEY_FIELDS | Alphanumeric | ➖ | - | - | List of field names separated by commas that Airtable should use to match records in the input with existing records on the server. |
Typecast | AIRTABLE_TYPECAST | Boolean | ➖ | FALSE | - | If enabled, the Airtable API will perform best-effort automatic data conversion from string values. |
Workflows Folder Name | AIRTABLE_SOURCE_FOLDER_NAME | Alphanumeric | ➖ | - | - | Name of the local folder on Workflows to upload the target file from. If left blank, will look in the home directory. |
Source Filename or Pattern | AIRTABLE_FILENAME_OR_PATTERN | Alphanumeric | ✅ | - | - | The name of the file to upload or search criteria |
Match Type | AIRTABLE_MATCH_TYPE | Select | ✅ | exact_match | Exact: exact_match Regex: regex_match Glob: glob_match | Determines if the text in "Filename or Pattern" will look for one file with exact match, or multiple files using regex or glob. |
Insert Method | AIRTABLE_INSERT_METHOD | Select | ✅ | - | Upsert: upsert Replace: replace Append: append | Upsert: Inserts or updates records as needed. Replace: Replaces table content with CSV data, removing old data. Append: Adds new records, ignoring potential duplicates. |
YAML
Below is the YAML template
source:
template: Airtable - Upload File from Workflows to Airtable
inputs:
AIRTABLE_API_KEY:
AIRTABLE_BASE_ID:
AIRTABLE_TABLE_ID:
AIRTABLE_KEY_FIELDS:
AIRTABLE_TYPECAST: 'FALSE'
AIRTABLE_SOURCE_FOLDER_NAME:
AIRTABLE_FILENAME_OR_PATTERN:
AIRTABLE_MATCH_TYPE: exact_match
AIRTABLE_INSERT_METHOD:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 100
- 101
- 102
- 103
- 104
- 205
- 206