Supabase - Field Mapping is showing error in two fields

Describe the problem/error/question

I am trying to dump data that is returned from an API into a Supabase table. I am able to map all the fields between the API’s JSON and Supabase Table’s fields except for two fields.

Here is the mapping screnshot:

What is the error message (if any)?

When I map these n8n shows error:

Please share your workflow

Share the output returned by the last node

NodeApiError: Bad request - please check your parameters
    at Object.supabaseApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Supabase/GenericFunctions.js:27:15)
    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/Supabase/Supabase.node.js:128:41)
    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

Information on your n8n setup

  • n8n version:
  • Database (default: Supabase/PostgreSQL):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker):
  • Operating system:Linux

I have found the problem worked out its solution.

The problem is that the data returned by the API that I am calling is not consistent for each record. Here by inconsistent I mean each records returned has a different set of fields.

So I have added a conditional expression to Field Value while mapping fields.

{{ $json.hasOwnProperty('certificate_of_occupancy')?$json.certificate_of_occupancy:'' }}

If there is a better solution I am ready to use that. But currently this seems to work at the moment.


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