Airtable multiple select field updated - ERROR: Invalid input for 'XXXXX' [item 0]

Hi !

I am trying to create or update data from Notion to Airtable.

But I have this error :
ERROR: Invalid input for ‘Espaces Coachs (Formaté)’ [item 0]
‘Espaces Coachs (Formaté)’ expects a array but we got ‘AAAA BBBB, CCCC DDDD’.

In the Code node I am trying to change string into array :


const coachArray = $json.property_espaces_coachs_format_string.split(',').map(coach => coach.trim());
const collabArray = $json.property_coach_s_format_string.split(',').map(coach => coach.trim());
const opportArray = $json.property_opportunit_s_format_string.split(',').map(opport => opport.trim());

// Prepare the data 
$input.item.json.coachArray = coachArray;
$input.item.json.collabArray = collabArray;
$input.item.json.opportArray = opportArray;

return $input.item;

This is the input for the create or update node :

[
{
“id”: “xxxxxxxx-xxxx8-4288-b293-xxxx”,
“name”: “Xxx Xxx”,
“url”: “https://www.notion.so/Xxx Xxx-5dexx0300586xxxxb29xxxxx4af55446”,
“property_objectifs”: “2023 : \n- Spot coaching ponctuels \n- Coaching fondateurs\n”,
“property_email_rh”: “[email protected]”,
“property_created_time”: “2023-05-04T16:33:00.000Z”,
“property_taille”: “Scale-up”,
“property_coach_s_format_string”: “Xxx Xxx 2”,
“property_espaces_coachs”: [
“xxxxxxx-378a-xx-85c2-bxxxxx464af”,
“xxxxxxxx-8057-40xxx-b8fb-8axxxxc3944a”
],
“property_contacts”: [],
“property_ca_ht_potentiel_2023”: 600,
“property_opportunit_s_format_string”: “Xxx Xxx 1, Xxx Xxx 2, Xxx Xxx 3”,
“property_espaces_coachs_format_string”: “AAAA BBBB, CCCC DDDD”,
“property_notes_business”: [],
“property_statut”: “Client”,
“property_opportunit_s”: [
“febd81cf-dexxx-45c1-b899-fxxxxx2e136”,
“ad97d84a-ce3c-xxx-b1ec-5xxxx65bfbe91”,
“77xxxx4-71fa-4f82xxx0-xxxxxx”
],
“property_secteur”: “Tech”,
“property_coach_s”: [
“a75xxxx39-c507-4xxxxa-9856-5afxxx8xxx20”
],
“property_objectif_offre_annuelle”: [
“Track Manager”
],
“property_nom”: “Xxx Xxx”,
“coachArray”: [
“AAAA BBBB”,
" CCCC DDDD"
],
“collabArray”: [
“Xxx Xxx 2”
],
“opportArray”: [
“Xxx Xxx 1”,
" Xxx Xxx 2",
" Xxx Xxx 3"
]
}
]

Here is the workflow (I don’t know why there is a “?” on the airtable node when I copy past it here) :

Thank you very much for your help !
@Jon

Information on your n8n setup

  • n8n version:1.1.1
  • Running n8n via n8n cloud:

Hi @sssamsss8, I am sorry you’re having trouble. I was able to reproduce this problem and have added it to our bug tracker for a closer look.

In the meantime, perhaps you want to consider using the old Airtable node? This won’t come with a “Create or Update” operation (so you’d have to first search for each existing record, then either create or update it depending on the search result), but it would add arrays (or “Multiple select” fields in Airtable) just fine, I’ve just tested this:

Node:

Result:

You can copy the older version of the Airtable node from my example workflow below:

I am sorry for the trouble this causes. We’ll of course update this thread once the problem has been fixed.

Thank you @MutedJam for the answer.

The Airtable append node can only add a new line (or record) to my airtable table or is it possible to fill up lines that are already existing but not updated ?

I tested it and I only managed to make the node add a new line.

for example let say my airtable table looks like this :

Name | Status | Email | People|
name1 | status1 |******** |******** |
name2 | status 2| [email protected] |********|

In this example, is it possible to make the append node fill up the “Email” and the “People” for the 1st line ? And fill up the “People” for the second line ?

Thank you !!

Hi @sssamsss8, in this example you’d two of the older Airtable nodes. The first one using the List operation to search for existing rows, the second using the update operation since you’re updating an already existing row.

You probably need a Set node as well before your second Airtable node to define the Email and People fields you want to update.

Unless this is very urgent it might be more convenience to simply wait on a fix for the problem you have encountered.

Ok thank you @MutedJam.
Indeed, it is maybe better to wait a little bit. Do you have any idea on how long it should take to fix this ?

Unfortunately not, but I hope it won’t be too long seeing how popular Airtable is and seeing this is a very new node.

If I may suggest something else in the futur fix :

Actually all this was a workaround to manage relation properties and linked fields Update from Notion to Airtable :

I was trying to sync an Airtable database with a Notion one. I built the same database structure in Notion and in Airtable. And I could not find a node allowing me to sync Notion’s Relation properties with Airtable Linked fields.

So the workaround I was trying to do is :

  • I transformed relation properties into strings separated with “,” thanks to a new Formula property in Notion. Like this I had names of the relation properties in the form of strings
  • then in n8n I transformed the new Formula property into an array to have tags with the names
  • I was then hoping to update Airtable with these tags.

So if I may suggest a priority fix, it would be to fix Airtable node / Notion node to manage Linked fields in Airtable / Relation properties in Notion. :slight_smile:

Last I heard the Notion node is also due for an overhaul at some point. So your idea might work in the future, but for know database support in Notion is somewhat limited I am afraid.

2 Likes

Ok thank you.
So I am going to wait for it :slight_smile:

Meanwhile, I saw that it was maybe possible to manage notion relation properties and airtable linked fileds with http request node. Do you have an idea on how to do that ?

Unfortunately not @sssamsss8. Your best bet in such cases would usually be to copy the required curl request from the respective documentation.

Also, be aware that if your relational field in Notion is using the rollup type. Notion currently won’t allow any changes through their API (this is listed under limitations in their documentation).

With Airtables “Linked Record” it should however be possible. Assuming my table looks like this:

image

The linked column is the “Employee” one. To update this column, I’d use an HTTP Request node like this:

The values you’d need to adjust are the URL: https://api.airtable.com/v0/appwTLCOMpC9wzoUW/Shift%20plan/reck3giqB1NZdlpBO

In this URL you’d need to replace appwTLCOMpC9wzoUW with your actual base ID, Shift plan with your actual table name and reck3giqB1NZdlpBO with the ID of the record you want to update.

You’d also need to update the value of the fields.Employee to match the record you want to link.

Hope this helps!

3 Likes

Hi, I’m having the same issue. When you said “added to our bug tracker”, is there a Github issue that I can subscribe to? Thank you!

I am afraid not, the problem with upserting multiple select fields is only in our internal ticket system as NODE-716. At this stage I do not have an ETA.

1 Like

I see. That’s unfortunate, as the new node version seems to be a significant improvement so I was super excited to test it out. Thank you for the update anw!

@MutedJam Would it be possible to be notified (here for example) when the NODE-716 ticket is done and live ? :slight_smile:

Yes, that’s actually what will happen. Once a pull request has been merged, Jan has an automation posting on the linked forum topics for the respective PR (like this one).

2 Likes

Hi there !
I see that there is a lot of updates but still no improvement regarding this topic. Yet it seems to be a very basic feature regarding all other features that are already available : “Update a multiselect field in Airtable”.
Any news on fix or workaround on this ?
Sorry to look insistant. The thing is, I really need this to sync a database from Notion to Airtable.
Thank you very much !! :slight_smile:

I am afraid this currently isn’t very high up on the engineering roadmap, so I am not sure when exactly this will happen. Perhaps @sirdavidoff can provide an estimate on when this issue (internally filed as NODE-716) will be looked at?

2 Likes

@MutedJam Is there anything we can do to help it get a higher priority?
My n8n workflows are heavily Airtable-centric, and I’d imagine there are many other n8n users like me, given that Airtable is one of the most popular nocode databases out there (though I’m sure you have better usage stats that might say otherwise).

This issue and the attachment field issue raised in the other threads (and maybe there are other cases we haven’t come across since we can’t use it yet) make designing new n8n workflows with Airtable almost impossible at the moment. I understand we can keep using the old node version, but it’s a costly workaround. The upsert operation isn’t possible in the old node, and we can only mimic it with a complex - multi-paths workflow. It’s hard to justify doing that knowing a superior version is available, and we will need a lot of rework once it becomes usable.

Having at least an ETA will be a great help. Thank you!

Hi @peterng1618, good news actually. Updating using an array is working for me in [email protected], perhaps you want to give this a go?

1 Like

OMG that is amazing! Thank you & the team so much!!

1 Like