1 | import { Airtable } from "https://deno.land/x/airtable/mod.ts"; |
2 | import { Field } from "https://deno.land/x/airtable/mod.ts"; |
3 |
|
4 | type Airtable = { |
5 | apiKey: string; |
6 | }; |
7 |
|
8 | type AirtableTable = { |
9 | baseId: string; |
10 | tableName: string; |
11 | }; |
12 | export async function main( |
13 | at_con: Airtable, |
14 | at_table: AirtableTable, |
15 | new_record_list: object, |
16 | fields_list: object, |
17 | ) { |
18 | const airtable = new Airtable({ ...at_con, ...at_table }); |
19 |
|
20 | type Fields = fields_list; |
21 |
|
22 | const createMultiple = await airtable.create<Fields>(new_record_list); |
23 |
|
24 | return { message: "Created multiple records in table" }; |
25 | } |
26 |
|