Skip to content

[BUG] returnFieldsByFieldId prop not used in airtable_oauth-get-record-or-create #16317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MartinMalinda opened this issue Apr 16, 2025 · 3 comments · May be fixed by #16391
Open

[BUG] returnFieldsByFieldId prop not used in airtable_oauth-get-record-or-create #16317

MartinMalinda opened this issue Apr 16, 2025 · 3 comments · May be fixed by #16391
Labels
bug Something isn't working triaged For maintainers: This issue has been triaged by a Pipedream employee

Comments

@MartinMalinda
Copy link

MartinMalinda commented Apr 16, 2025

Action https://pipedream.com/apps/airtable-oauth/actions/get-record does not have prop returnFieldsByFieldId so I tried to use https://pipedream.com/apps/airtable-oauth/actions/get-record-or-create instead, but it seems like there it seems to be used only for the potential creation, not when the record is fetched, possibly because the underlying commonActions.getRecord does not pass it.

related: #9803

@MartinMalinda MartinMalinda added the bug Something isn't working label Apr 16, 2025
@MartinMalinda MartinMalinda changed the title [BUG] returnFieldsByFieldId not used in airtable_oauth-get-record-or-create [BUG] returnFieldsByFieldId prop not used in airtable_oauth-get-record-or-create Apr 16, 2025
@MartinMalinda
Copy link
Author

    const record = await pd.makeProxyRequest(
      {
        searchParams: {
          account_id: airtableAccount.account_id,
          external_user_id: externalUserId,
        },
      },
      {
        url: `https://api.airtable.com/v0/${selected_base}/${selected_table}/${recordId}?returnFieldsByFieldId=true`,
        options: {
          method: "GET",
        },
      },
    );

works as expected

@vunguyenhung vunguyenhung added the triaged For maintainers: This issue has been triaged by a Pipedream employee label Apr 17, 2025
@SokolovskyiK
Copy link
Contributor

SokolovskyiK commented Apr 22, 2025

const record = await pd.makeProxyRequest(
{
searchParams: {
account_id: airtableAccount.account_id,
external_user_id: externalUserId,
},
},
{
url: https://api.airtable.com/v0/${selected_base}/${selected_table}/${recordId}?returnFieldsByFieldId=true,
options: {
method: "GET",
},
},
);

works as expected

Hi @MartinMalinda
It helped to locate the problem.

returnFieldsByFieldId option defined in get-record-or-create actions wasn't being forwarded to the Airtable API.

Also
The getRecord method in commonActions was calling .find(recordId) from the Airtable SDK without passing any flags further.
However, exploring the Airtable repo I found out .find() does not support additional options like returnFieldsByFieldId.
In contrast, methods like .update() do accept an opts parameter.

I updated getRecord to use a direct API request with params: { returnFieldsByFieldId: true } instead of relying on .find().

Also added returnFieldsByFieldId to get-record.mjs

@michelle0927 michelle0927 moved this from Prioritized to Ready for PR Review in Component (Source and Action) Backlog Apr 23, 2025
@jcortes jcortes moved this from Ready for PR Review to In Review in Component (Source and Action) Backlog Apr 23, 2025
@michelle0927 michelle0927 moved this from In Review to Ready for PR Review in Component (Source and Action) Backlog Apr 29, 2025
@jcortes jcortes moved this from Ready for PR Review to Changes Required in Component (Source and Action) Backlog Apr 30, 2025
@jcortes jcortes moved this from Changes Required to Ready for QA in Component (Source and Action) Backlog May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged For maintainers: This issue has been triaged by a Pipedream employee
Projects
Development

Successfully merging a pull request may close this issue.

3 participants