Skip to content
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(Airtable Node): Make multipleRecordLinks editable in fields #9608

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

joshsorenson
Copy link
Contributor

  • Removed multipleRecordLinks from read-only fields
  • Ensured multipleRecordLinks is correctly mapped in types map
  • Updated field mapping logic to reflect changes

Summary

This PR makes the multipleRecordLinks field editable in Airtable fields. Previously, it was incorrectly marked as read-only. To test, ensure that multipleRecordLinks fields are now editable and correctly mapped when integrating with Airtable in n8n.

Related tickets and issues

https://community.n8n.io/t/airtable-linked-record/15462/6

- Removed multipleRecordLinks from read-only fields
- Ensured multipleRecordLinks is correctly mapped in types map
- Updated field mapping logic to reflect changes
@CLAassistant
Copy link

CLAassistant commented Jun 3, 2024

CLA assistant check
All committers have signed the CLA.

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear Issue or PR has been created in Linear for internal review labels Jun 3, 2024
Copy link
Contributor

@michael-radency michael-radency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@netroy netroy changed the title fix: make multipleRecordLinks editable in Airtable fields fix(Airtable Node): Make multipleRecordLinks editable in fields Jun 20, 2024
@netroy netroy merged commit fdde995 into n8n-io:master Jun 20, 2024
8 of 9 checks passed
This was referenced Jun 20, 2024
longnz added a commit to AcclaroInc/workflow-automation that referenced this pull request Jun 21, 2024
* 'master' of github.com:n8n-io/n8n: (380 commits)
  feat(Anthropic Chat Model Node): Add support for Claude 3.5 Sonnet (n8n-io#9832)
  refactor(core): Remove inferral of execution status (no-changelog) (n8n-io#9829)
  refactor(core): Log denials from subworkflow caller policy (no-changelog) (n8n-io#9827)
  fix(Zulip Node): Fix a typo preventing some messages from updating (n8n-io#7078)
  🚀 Release 1.47.0 (n8n-io#9826)
  ci: Fix repository url for provenance checks (no-changelog) (n8n-io#9825)
  docs: Update docs links in the HTTP node (no-changelog) (n8n-io#9188)
  feat(Pipedrive Node): Add sort field for get all persons (n8n-io#8138)
  ci: Add opencontainer image spec labels to the release Dockerfile (no-changelog) (n8n-io#9822)
  fix(core): Upgrade `ws` to address CVE-2024-37890 (n8n-io#9801)
  ci: Fix ARM custom images (no-changelog) (n8n-io#9821)
  fix: Get workflow not returning home project and shared projects (no-changelog) (n8n-io#9815)
  fix(AWS SES Node): Fix issue with email aliases not working for sending from or sending to (n8n-io#9811)
  fix(Google Sheets Node): Check for column names changes before upsert, append, update (n8n-io#9649)
  fix(MongoDB Node): Correct typo in MongoDbProperties (no-changelog) (n8n-io#9587)
  fix(editor): Console error in ActionsMode when searching for action and pressing enter (no-changelog) (n8n-io#9292)
  fix(Airtable Node): Make multipleRecordLinks editable in fields (n8n-io#9608)
  refactor(editor): Refactor code editors to composition API (no-changelog) (n8n-io#9757)
  refactor: Correct spelling mistakes (no-changelog) (n8n-io#9305)
  fix(editor): Align all cell contents to the top in RunDataTable (no-changelog) (n8n-io#3889)
  ...
longnz added a commit to AcclaroInc/workflow-automation that referenced this pull request Jun 21, 2024
* n8n-io-master: (380 commits)
  feat(Anthropic Chat Model Node): Add support for Claude 3.5 Sonnet (n8n-io#9832)
  refactor(core): Remove inferral of execution status (no-changelog) (n8n-io#9829)
  refactor(core): Log denials from subworkflow caller policy (no-changelog) (n8n-io#9827)
  fix(Zulip Node): Fix a typo preventing some messages from updating (n8n-io#7078)
  🚀 Release 1.47.0 (n8n-io#9826)
  ci: Fix repository url for provenance checks (no-changelog) (n8n-io#9825)
  docs: Update docs links in the HTTP node (no-changelog) (n8n-io#9188)
  feat(Pipedrive Node): Add sort field for get all persons (n8n-io#8138)
  ci: Add opencontainer image spec labels to the release Dockerfile (no-changelog) (n8n-io#9822)
  fix(core): Upgrade `ws` to address CVE-2024-37890 (n8n-io#9801)
  ci: Fix ARM custom images (no-changelog) (n8n-io#9821)
  fix: Get workflow not returning home project and shared projects (no-changelog) (n8n-io#9815)
  fix(AWS SES Node): Fix issue with email aliases not working for sending from or sending to (n8n-io#9811)
  fix(Google Sheets Node): Check for column names changes before upsert, append, update (n8n-io#9649)
  fix(MongoDB Node): Correct typo in MongoDbProperties (no-changelog) (n8n-io#9587)
  fix(editor): Console error in ActionsMode when searching for action and pressing enter (no-changelog) (n8n-io#9292)
  fix(Airtable Node): Make multipleRecordLinks editable in fields (n8n-io#9608)
  refactor(editor): Refactor code editors to composition API (no-changelog) (n8n-io#9757)
  refactor: Correct spelling mistakes (no-changelog) (n8n-io#9305)
  fix(editor): Align all cell contents to the top in RunDataTable (no-changelog) (n8n-io#3889)
  ...
@erinviegas
Copy link

@joshsorenson @alexgrozav @michael-radency changing multipleRecordLinks to type:array causes the field to expect an array. This is an issue when Typecast is enabled and we want to pass a string.
SCR-20240628-qug

@joshsorenson
Copy link
Contributor Author

Hey @erinviegas,

I understand your concern about the multipleRecordLinks type change causing some problems. Let me explain my reasoning for making this change, and then we can discuss how to address the Typecast compatibility issue.
I moved multipleRecordLinks to an array type for a couple of important reasons:

  • Accuracy: As you noted, this accurately represents how the data is structured in Airtable. Multiple record links are fundamentally stored as an array of record IDs, even if they can sometimes be represented as a comma-separated string.
  • Type safety: Using an array type provides better type checking and helps prevent errors that could occur when working with comma-separated strings (like accidentally passing in a malformed string).
  • Consistency: This change makes our type definitions more consistent with Airtable's actual data model, which can help reduce confusion and potential bugs in the long run.

It's worth noting that my team hasn't experienced any issues with this change. However, I completely understand that updating existing workflows can be frustrating and time-consuming, especially if they've been working well for you up to this point. Your concern is valid, and I appreciate you bringing it to our attention.

One possible workaround within your expressions could be to convert the string to an array when needed. For example, you could use string.split(',') to transform a comma-separated string into an array. However, I recognize that this puts the burden on you to update your expressions, which isn't ideal.

@erinviegas
Copy link

Hey @joshsorenson,

Appreciate your quick response. As a workaround for the time being, I've just changed the type back to string for my affected scenarios. Completely agree that the field type needs to be an array for multiple linked records. I will try using the split function for a permanent fix.

@joshsorenson
Copy link
Contributor Author

@erinviegas ah, that's smart. Sorry about that breaking fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member in linear Issue or PR has been created in Linear for internal review node/improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants