MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / createRecords

Method createRecords

integrations/airtable/src/base.ts:75–96  ·  view source on GitHub ↗
(key: IntegrationTaskKey, records: { fields: Partial<TFields> }[])

Source from the content-addressed store, hash-verified

73 }
74
75 createRecords(key: IntegrationTaskKey, records: { fields: Partial<TFields> }[]) {
76 return this.runTask(
77 key,
78 async (client) => {
79 const result = await client
80 .base(this.baseId)
81 // official types are wrong - we need to use our extended AirtableFieldSet here
82 // @ts-ignore
83 .table<TFields>(this.tableName)
84 .create(records);
85 return result.map((record) => toSerializableRecord<TFields>(record));
86 },
87 {
88 name: "Create Records",
89 params: records,
90 properties: [
91 ...tableParams({ baseId: this.baseId, tableName: this.tableName }),
92 { label: "Created records", text: records.length.toString() },
93 ],
94 }
95 );
96 }
97
98 updateRecords(key: IntegrationTaskKey, records: { id: string; fields: Partial<TFields> }[]) {
99 return this.runTask(

Callers 1

airtable.tsFile · 0.80

Calls 6

toSerializableRecordFunction · 0.85
tableParamsFunction · 0.85
toStringMethod · 0.80
createMethod · 0.65
runTaskMethod · 0.45
baseMethod · 0.45

Tested by

no test coverage detected