Can't pass values from Code or Set node to Airtable Update node

Describe the problem/error/question

Can not data into a Airtable Update Node.

What is the error message (if any)?

ERROR: Your request is invalid or could not be processed by the service
You must provide an array of up to 10 record objects, each with an "id" ID field and a "fields" object for cell values.
 Details
Time
08/08/2023, 17:12:26
HTTP Code
422
Stack
NodeApiError: Your request is invalid or could not be processed by the service
    at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1086:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Airtable/Airtable.node.js:694:40)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:646:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53

Please share your workflow

Relevant Screenshots

None of the methods below work. They all return the same error.



Share the output returned by the last node

No output returned due to error

Information on your n8n setup

  • n8n version: Latest
  • Running n8n via (n8n cloud):
  • Operating system:Mac M1

Hi @hdotking :wave:

It sounds like you may not be correctly passing the IDs - this doc has some information on how to grab the right data. Airtable | n8n Docs

If that doesn’t help you out, can you share the JSON data (or example data in the same format) that you are sending to the Airtable node and your current Airtable table structure (which fields/data types you are using)?

Hi @EmeraldHerald

Thanks! I’ll go through the docs now.

There are three examples of the JSON I use as input in the screenshots above.

Are those suitable?

@hdotking let me know how you get on! Admittedly I was just wanting to copy and paste :joy: But the sample data is rather small, if that’s what you’re working with. Could you give me the Airtable table/field structure as well, if you can’t get what you need from the docs? It looks like you’ve two dates, an integer, and a status as a string, but I’d want to be sure.

Sure thing! I am sure that the airtable ID is correct as I’m using it to call a Mock example with the Airtable Read command and it seems to work.

I’ll email you my Workflow as I can’t expose that ton a public forum for privacy reasons… But I promise that it’s just as simple as the screenshots :smiley:

Hey @hdotking,

Have you tried adding a new airtable node to your workflow which will take some of the guess work out of it? Looking at your screenshot you are using the older v1 node assuming you are on the latest n8n version 1.x it should look like this…

The workflow below shows how you can use the Airtable node with data being passed to it from a code node.

You will need to copy / paste the workflow into your n8n instance, Our preview instance has not yet been updated.

1 Like

Hey Jon! Thanks for the suggestion. I just confirmed and i’m definitely using version 1.0.5. So I don’t know why my airtable node doesn’t look like yours. Strange.

Hey @hdotking,

1.0.5 isn’t the latest release and the change went into 1.1.0, I will rework the example in the morning to use the older Airtable version.

Not to worry. It appears to be working now with the exact same input as the first screenshot.

No idea what I was doing wrong but it’s all sorted :slight_smile:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.