-
Notifications
You must be signed in to change notification settings - Fork 31.1k
feat(Airtable node): Add support for field ids #16359
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
base: master
Are you sure you want to change the base?
Conversation
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.
cubic found 1 issue across 14 files. Review it in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
packages/nodes-base/nodes/Airtable/v2/actions/common.descriptions.ts
Outdated
Show resolved
Hide resolved
Hey @domdomegg, Thanks for the PR, We have created "GHC-2553" as the internal reference to get this reviewed. One of us will be in touch if there are any changes needed, in most cases this is normally within a couple of weeks but it depends on the current workload of the team. |
Hey @domdomegg, Is this any different to the other PRs that are open for the same thing? Quick edit, I remember this issue now. I will get this sorted this week as the original contributor has had more than enough time. |
@domdomegg looks like there are some conflicts to fix first |
…ons.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
I don't understand why my PR was closed. I have been asking and waiting for a review for 4 months now. |
@xbinaryx I have just answered that on your PR, There is a lot of history with this feature. |
@@ -31,7 +31,7 @@ export async function getColumns(this: ILoadOptionsFunctions): Promise<INodeProp | |||
for (const field of tableData.fields as IDataObject[]) { | |||
result.push({ | |||
name: field.name as string, | |||
value: field.name as string, | |||
value: field.id as string, |
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.
Is this a breaking change in existing workflows as they will currently be using the name field and not the ID. It might be best to create a light node version like 2.2
and if the node version is 2.2 we use field.id instead of field.name.
This also applies to the other cases like this.
Summary
Currently, the node requires field names when creating or updating records, but Airtable’s API uses field IDs. This can cause issues, especially when field names change which results in broken workflows.
A similar functionality for targeting tables by ID instead of table name has been discussed and implemented. This PR implements a similar feature for fields.
To avoid this being a breaking change, nodes accept either field ids or field names (by virtue of the Airtable API allowing these to be interchanged). Nodes continue to output with field names, but with the
returnFieldsByFieldId
option users of this node can opt-in to getting data as fieldIds.Screenshots:
Without field id output:

With field id output:

Updating a record. Under the hood this now uses field ids, so continues to work even if I edit the column names after saving the n8n configuration:

Plus this also works with returning the updated data with field ids:

Related Linear tickets, Github issues, and Community forum posts
Closes bluedotimpact/bluedot#19
Related:
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)