-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Fix: pass returnFieldsByFieldId to getRecord for Airtable actions #16391
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
Fix: pass returnFieldsByFieldId to getRecord for Airtable actions #16391
Conversation
@SokolovskyiK is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes update the Airtable OAuth "Get Record" action by adding a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GetRecordAction
participant CommonActions
participant AirtableApp
User->>GetRecordAction: Invoke with returnFieldsByFieldId
GetRecordAction->>CommonActions: Call getRecord(ctx)
CommonActions->>AirtableApp: getRecord({ baseId, tableId, recordId, opts: { returnFieldsByFieldId } })
AirtableApp->>AirtableApp: Make HTTP GET request with query param
AirtableApp-->>CommonActions: Return record data
CommonActions-->>GetRecordAction: Return record data
GetRecordAction-->>User: Return record data
Assessment against linked issues
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SokolovskyiK I've just added a minor request change on the component version. Also keep in mind that we need to increase the version in components/airtable_oauth/package.json
to 0.4.5
Also because you've touched a common file you need to increment following ones as well:
# MacOS
sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/create-comment/create-comment.mjs && sed -i '' 's/0.1.2/0.1.3/' components/airtable_oauth/actions/create-field/create-field.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs && sed -i '' 's/0.1.2/0.1.3/' components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/actions/create-single-record/create-single-record.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/create-table/create-table.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/delete-record/delete-record.mjs && sed -i '' 's/0.0.12/0.0.13/' components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/list-records/list-records.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs && sed -i '' 's/0.0.12/0.0.13/' components/airtable_oauth/actions/search-records/search-records.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/update-comment/update-comment.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/update-field/update-field.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/actions/update-record/update-record.mjs && sed -i '' 's/0.0.10/0.0.11/' components/airtable_oauth/actions/update-table/update-table.mjs && sed -i '' 's/1.0.2/1.0.3/' components/airtable_oauth/sources/new-field/new-field.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs && sed -i '' 's/0.1.2/0.1.3/' components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs && sed -i '' 's/1.0.2/1.0.3/' components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs && sed -i '' 's/1.0.2/1.0.3/' components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs && sed -i '' 's/0.0.12/0.0.13/' components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs && sed -i '' 's/1.0.2/1.0.3/' components/airtable_oauth/sources/new-records/new-records.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs && sed -i '' 's/0.1.2/0.1.3/' components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/actions/create-single-record/create-single-record.mjs && sed -i '' 's/0.0.12/0.0.13/' components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs && sed -i '' 's/0.0.11/0.0.12/' components/airtable_oauth/actions/update-record/update-record.mjs
Let me know if you can do that otherwise I can do it for you thanks!
@jcortes Hi. Sure let me do this. |
@jcortes Done! Hopefully I didn’t mess anything up =) Let me know if anything else is needed — happy to adjust. |
Hi @SokolovskyiK seems like there is only two components left that need to modify the version as well
Can you apply those changes and push again plase? |
@jcortes Hi. Sure. |
@jcortes Done. |
Hi @SokolovskyiK there still are some conflicts, can you fix them first please! |
@jcortes And I don't have authorization to resolve it. |
Hi @SokolovskyiK you need to bring changes in origin master into your branch, then you might see some conflicts I usually do something like
|
@jcortes Thank you. I'll try. |
Co-authored-by: Jorge Cortes <jacortesmahmud@gmail.com>
c9df33f
to
71d0a29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SokolovskyiK lgtm! Ready for QA!
@jcortes Great. Thanks. |
71d0a29
to
14b6006
Compare
Hi @SokolovskyiK I think the version in |
/approve |
Fixes #16317
I opened both actions:
Both use the shared getRecord() method from commonActions.mjs.
I noticed that returnFieldsByFieldId was not being passed to the API when fetching a record — unlike updateRecord(), which correctly includes it via the opts parameter:
I inspected getRecord() and found the issue:
I suspected .find() might not support query parameters, so I checked the Airtable SDK (table.ts) and confirmed:
These wrap two different functions:
Since _findRecordById does not accept opts, and .find() simply wraps it, there's no way to pass returnFieldsByFieldId using the SDK method.
What I did to fix it
I rewrote the internal getRecord() method inside the Airtable app (airtable_oauth.app.mjs)
to use this._makeRequest() instead of .find(), giving us full control over query parameters:
Then I updated commonActions.getRecord(...) to pass the returnFieldsByFieldId flag properly:
I also updated get-record.mjs to explicitly expose the returnFieldsByFieldId option to the user by adding it as a prop.
I did not need to modify get-record-or-create.mjs, as it already defined the returnFieldsByFieldId prop and passed this to commonActions.getRecord(...).
Result
When testing the updated actions, I confirmed that:
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor
Chores