N8n expects an array, but Airtable is giving it a giant string

I have an Airtable field that is MultipleSelect with categories of news articles for a website I’m building. The logic in the workflow is assigning the category so when I approve in teh puclis queue, it will post to that section of teh news page. Problem is n8n is expecting an array, but it’s receiving a giant string (that literally includes the whole code + instructions)
.
I am stuck on this one node and have had to start over 4 times already. Once this is sorted out, I publish.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow



Share the output returned by the last node

ExpressionError: Invalid input for ‘publish_category’ [item 0] at validateValueAgainstSchema (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/validate-value-against-schema.ts:206:9) at ExecuteContext.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/node-execution-context.ts:469:42) at ExecuteContext.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/node-execution-context/execute-context.ts:126:9) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts:75:25) at ExecuteContext.router (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Airtable/v2/actions/router.ts:32:67) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/Airtable/v2/AirtableV2.node.ts:30:23) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1254:31) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1428:22) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1761:38 at processTicksAndRejections (node:internal/process/task_queues:105:5)

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system: self hosted Version 1.112.6 through Docker Desktop
    

It looks like your Airtable MultipleSelect field is being returned as a string instead of an array, which is causing the validation error. Here are a few solutions to try:

• **Use the Split function**: Add a Set node before your problematic node and use `{{ $json.your_field_name.split(‘,’) }}` to convert the string into an array

• **Check your Airtable node output**: Look at the actual data structure in the Airtable node output - sometimes MultipleSelect fields come through as comma-separated strings that need parsing

• **Use JSON.parse()**: If the field contains JSON-like data, try `{{ JSON.parse($json.your_field_name) }}` in an expression

• **Alternative approach**: Use a Code node to properly format the data: `return items.map(item => ({ …item.json, publish_category: item.json.your_field_name.split(‘,’).map(s => s.trim()) }));`

Can you share what the actual output from your Airtable node looks like? That would help pinpoint the exact transformation needed.