Skip to main content

airtable.airtable.deleterecord

Home > @runlightyear/airtable > Airtable > deleteRecord

Airtable.deleteRecord() method

Delete record

Signature:
deleteRecord(props: DeleteRecordProps): Promise<DeleteRecordResponse>;

Parameters

ParameterTypeDescription
propsDeleteRecordProps
Returns:

Promise<DeleteRecordResponse>

Example

Delete a record

import { defineAction } from "@runlightyear/lightyear";
import { Airtable } from "@runlightyear/airtable";

defineAction({
name: "deleteRecord",
title: "Delete Record",
apps: ["airtable"],
variables: ["baseId", "tableIdOrName", "recordId"],
run: async ({ auths, variables }) => {
const airtable = new Airtable({
auth: auths.airtable,
});

const response = await airtable.deleteRecord({
baseId: variables.baseId!,
tableIdOrName: variables.tableIdOrName!,
recordId: variables.recordId!,
});

console.log("Response: ", response.data);
},
});