Upload and create Airtable records to a base
air_upload_records.RdTakes a list created by tibble_to_air_records() and uploads it to Airtable.
If request_type is set to "update" the body list must have an id field for
each record. Each element of body must be up to 10 records long.
Usage
air_upload_records(
body,
table,
base_id,
api_key = Sys.getenv("AIRTABLE_KEY"),
request_type = c("create", "update")
)Arguments
- body
list with the records, as formatted by
tibble_to_air_records()- table
name of the table (string)
- base_id
id of the Airtable base where the table is located
- api_key
API key for Airtable. By default it looks at the
AIRTABLE_KEYenvironment variable.- request_type
Whether to create a new record or update an existing one. If updating an existing one, an
id_fieldneeds to be specified when callingtibble_to_air_records()