Multi-select fields in AirTable and Notion

Found out that I can’t send Multi-select Fields from Notion to AirTable. I can see separate select items, but can choose them all and send them as a string with comma separation. Of course, the best choice would be assign Multiple select in AirTable, but n8n doesn’t provide such type.

Is it possible to send all such values as a string?

See the screenshot:

Unlike the Notion node, the Airtable node needs the data you want to insert passed in the input. As long as the multi_select field has the same name in Notion and Airtable, no modification it’s needed. If the names are different, then you need a set node to rename the field.

In the example below, I had a multi_select field in Notion called “multi_select” and wanted to map that to a multi_select field called Category1 in Airtable.

But agree with you. Both nodes should work similarly. Unfortunately, it’s not the case because when we created the Airtable node, we did not have the possibility to create the fields “dynamically” depending on the type. We introduced this functionality with the Notion node. In the future, all nodes with different field types (like Airtable) will work as the Notion node.

Is it possible to send all such values as a string?

You do not need to send a string but an array of strings. Let’s say you have two possible options: option1 and option2. The data needs to be sent as field: ['option1", "option2" ], which is btw, the way Notion returns the data.

Example workflow

{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
250,
300
]
},
{
“parameters”: {
“resource”: “databasePage”,
“operation”: “getAll”,
“databaseId”: “=c7f1bbde-9254-49dc-8fd5-646c4ad731aa”,
“options”: {}
},
“name”: “Notion”,
“type”: “n8n-nodes-base.notion”,
“typeVersion”: 1,
“position”: [
520,
300
],
“credentials”: {
“notionApi”: “asasasas”
}
},
{
“parameters”: {
“operation”: “append”,
“application”: “appKUpd1rLmDvMCeZ”,
“table”: “Movies”,
“options”: {}
},
“name”: “Airtable”,
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 1,
“position”: [
900,
300
],
“credentials”: {
“airtableApi”: “[email protected]
}
},
{
“parameters”: {
“keepOnlySet”: true,
“values”: {
“string”: [
{
“name”: “Category1”,
“value”: “={{$node[“Notion”].json[“multi-select”]}}”
},
{
“name”: “Cat”,
“value”: “asasas”
}
]
},
“options”: {}
},
“name”: “Set”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 1,
“position”: [
710,
300
]
}
],
“connections”: {
“Start”: {
“main”: [
[
{
“node”: “Notion”,
“type”: “main”,
“index”: 0
}
]
]
},
“Notion”: {
“main”: [
[
{
“node”: “Set”,
“type”: “main”,
“index”: 0
}
]
]
},
“Set”: {
“main”: [
[
{
“node”: “Airtable”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

Tnank you. I see, Notion and AirTable interfaces have some differences. For AirTable you only specify the name of fields. For Notion, you specify field names and folrmulas.

After some playing, I managed to transfere selects from Notion to AirTable.

But when I tried to do reverse transition, I faced a type problem. Seems like array is not suitablem and I should “hardpick” the values. When I tried to through an array to a Notion Multi-select field, an error occurs. See the video:

Ahh, yes, that is expected. In Notion, to set a multi-select, you need to provide an array of ids. It’s not like in Airtable (as far as I know) that you can reference the option using the names. I will have to check that out. If it’s possible to use the names, that would be better for scenarios like this one. In the meantime, you can have a function node that maps the multi-select option names to the corresponded id in notion.

[
   {
      id: "id of the option 1 in notion"
   },
   {
      id: "id of the option 2 in notion"
   }
]

Ok just tested it, and Notion does support setting the multi-selects using the name and the ID. It currently uses the id. That is the reason it fails. If I change it to use the name, that would be a breaking change. Have to think about how to property add it. In the meantime, you can do what I previously suggested. I will keep you posted.

I guess, it’s needed to suck Notion database data to see all the options and then match.
Thank you and will wait for update.

A fix for that issue by @RicardoE105 got released with [email protected]

1 Like

Jan,
Is it now possible to set the selects or multi-selects using name?
I’m trying to do that and I’m still getting an error message (I’m at version 0.126)

Welcome to the community @Daniel_Barra

Currently, you can use names just with the multi_select type. I tried to add it to the select one, but it would have been a breaking change meaning it would have broken many workflows. We will tackle that probably when we have node versioning released.

Thank you @RicardoE105 !
I understand and will adapt my workflow.
Just tested the multiselect and it worked like a charm.

2 Likes

Just leaving my contribution to whoever has a similar problem.
Since I had one column that needed to be a select (because it was my GroupBy item for my board), it was necessary to transform the data.
So first I used the Notion node to get the ID for each item I wanted to add. (as in picture)
Since I don’t know JS and I code like a 7-year-old, I preferred to send my data using the google sheets node to a SHEET#1 , placed the Name and respective ID in SHEET#2 and then on SHEET#3 I made all the cells the same as SHEET#1 (example: SHEET#3!A1 = SHEET#1!A1) except for the column where I needed the select. On that one I did a VLookup to SHEET#2 using the value from SHEET#1 as reference (example: SHEET#3!F1 = VLOOKUP(SHEET#1F1, SHEET#2!A:B, 2, FALSE)).

And then I would use the google sheets node on N8N to read the data from the spreadsheet on SHEET#3, which would already be in the correct structure to send to the notion node.

Simple but it worked.

One thing that I though was weird though was that even sending data as a number (came from sheets in that format and I selected option to maintain the formatting) notion did not identify it as number (would give me an error message). I changed it to text and it worked, but might be something to look into.

1 Like