Skip to main content
Module

x/airtable/airtable.ts>Airtable#create

Unofficial Airtable client for Deno 🦕
Go to Latest
method Airtable.prototype.create
import { Airtable } from "https://deno.land/x/airtable@v1.0.0/airtable.ts";

Create record for selected base and table

 const createOne = await airtable.create({
   ["Name"]: "Griko Nibras",
   ["Age"]: 25,
 });

Type Parameters

T extends FieldSet

table field types

Parameters

data: T

record values

optional
options: RecordOptions

Returns

Promise<TableRecord<T>>

created record values

Create multiple records for selected base and table

const createMultiple = await airtable.create(
  [
    { ["Name"]: "Foo", ["Age"]: 20 },
    { ["Name"]: "Bar", ["Age"]: 15 },
  ],
  { typecast: true }
);

Type Parameters

T extends FieldSet

table field types

Parameters

data: T[]

array of record values

optional
options: RecordOptions

Returns

Promise<TableRecords<T>>

array of created record values