Created by nicolassirang 243 days ago Viewed 256 times 1 Point
No comments yet
import { Airtable } from "https://deno.land/x/airtable/mod.ts";
import { Field } from "https://deno.land/x/airtable/mod.ts";
/*
@param: {wmill.Resource} at_con - https://hub.windmill.dev/resource_types/12/airtable-apiKey-baseId-tableName
@param: {object} new_record: data to be sent to airtable
example:
{
Name: "Harry",
Age: 44,
}
@param: {object} fields_list - type of data to be sent to airtable
example:
{
Name: string;
Age: number;
}
*/
export async function main(at_con: wmill.Resource<"airtable">, at_table: wmill.Resource<"airtable_table">, new_record_list: object, fields_list: object) {
const airtable = new Airtable({...at_con, ...at_table});
type Fields = fields_list;
const createMultiple = await airtable.create<Fields>(
new_record_list
);
return { message: "Created multiple records in table" };
}
No comments yet