Skip to content

Commit 5356168

Browse files
committed
Fix: pass returnFieldsByFieldId to getRecord for Airtable actions
1 parent 65e79d1 commit 5356168

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

components/airtable_oauth/actions/get-record/get-record.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ export default {
66
key: "airtable_oauth-get-record",
77
name: "Get Record",
88
description: "Get data of a selected record from a table. [See the documentation](https://airtable.com/developers/web/api/get-record)",
9-
version: "0.0.11",
9+
version: "0.0.17",
1010
type: "action",
1111
props: {
1212
...common.props,
13+
returnFieldsByFieldId: {
14+
propDefinition: [
15+
airtable,
16+
"returnFieldsByFieldId",
17+
],
18+
},
1319
recordId: {
1420
propDefinition: [
1521
airtable,

components/airtable_oauth/airtable_oauth.app.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,16 @@ You can also reference an object exported by a previous step, e.g. \`{{steps.foo
258258
: axios($, config);
259259
},
260260
getRecord({
261-
baseId, tableId, recordId,
261+
baseId,
262+
tableId,
263+
recordId,
264+
opts = {},
262265
}) {
263-
const base = this.base(baseId);
264-
return base(tableId).find(recordId);
266+
return this._makeRequest({
267+
method: "GET",
268+
path: `/${baseId}/${tableId}/${recordId}`,
269+
params: opts,
270+
});
265271
},
266272
listBases(args = {}) {
267273
return this._makeRequest({

components/airtable_oauth/common/actions.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export default {
9292
baseId,
9393
tableId,
9494
recordId,
95+
// Added 2025-04-22: Ensure returnFieldsByFieldId is passed to the API.
96+
// Previously, this option was defined in the action but not forwarded to the API call.
97+
opts: {
98+
returnFieldsByFieldId: ctx.returnFieldsByFieldId,
99+
},
95100
});
96101

97102
$.export("$summary", `Fetched record "${recordId}" from ${ctx.baseId?.label || baseId}: [${ctx.tableId?.label || tableId}](https://airtable.com/${baseId}/${tableId})`);

0 commit comments

Comments
 (0)