Course 1- Inserting data into airtable - error

Hi,

I am now trying to go through the step “Inserting data into airtable” from course 1, I added the airtable account, inserted the API key, the base ID and the table ID, however, I am receiving the following error when trying to execute the node:

ERROR: Your request is invalid or could not be processed by the service
Field “orderID” cannot accept the provided value

Please find below the details of the error:

{“message”:“422 - {“error”:{“type”:“INVALID_VALUE_FOR_COLUMN”,“message”:“Field \“orderID\” cannot accept the provided value”}}”,“name”:“Error”,“stack”:“Error: Request failed with status code 422\n at createError (/private/var/folders/tw/ftvkyylj3453d6rz7z_cr_vc0000gn/T/AppTranslocation/A59A3E19-19B5-49A0-BEC9-63A540EADE46/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/private/var/folders/tw/ftvkyylj3453d6rz7z_cr_vc0000gn/T/AppTranslocation/A59A3E19-19B5-49A0-BEC9-63A540EADE46/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/private/var/folders/tw/ftvkyylj3453d6rz7z_cr_vc0000gn/T/AppTranslocation/A59A3E19-19B5-49A0-BEC9-63A540EADE46/d/n8n.app/Contents/Resources/app/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:406:35)\n at IncomingMessage.emit (node:domain:470:12)\n at endReadableNT (node:internal/streams/readable:1331:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”}

This is how my table looks like:

And here below the parameters of my node:


Thanks for the help!

Good morning from Spain, Lisa.

I hope this help you.

I had the same mistake. Check the result returned by the “set” or “if” node, you probably put a space in the value expression and it is returning something that is not a number. In my case there was a space before the expression and if you see the result of the node in “json” mode you will see that the value is in quotes with a space. Something like this:
[
{
“orderId”: " 1",
“employeeName”: “Mario”
},

]

You remove the space from the expression and verify that it returns the value without quotes, something like this:

[
{
“orderId”: 1,
“employeeName”: “Mario”
},

The node with wrong expresion:

In expression, could be a space:

1 Like

Hi Lisa,

The Table ID should be the name of the table, so in your example Orders.
Also, the fields orderID, customerID, orderPrice should be of the type Number, and employeeName and orderStatus of the type Single line text.

Does it work if you make these changes?

2 Likes

Hi Iorena,

yes! those changes fixed the issue, thanks :slight_smile:

2 Likes