Automatic record linking

Hello. Im trying to automatically link records as per this guide How to link rows automatically in bulk // Baserow but I keep getting the following error.

ERROR: Bad request - please check your parameters

400 - {“error”:“ERROR_REQUEST_BODY_VALIDATION”,“detail”:{“field_4560”:[{“error”:“Expected a list of items but got type "str".”,“code”:“not_a_list”}]}} - ERROR_REQUEST_BODY_VALIDATION

when setting the value of the linked field to link field instead of name i get the following error.

ERROR: Bad request - please check your parameters

400 - {“error”:“ERROR_REQUEST_BODY_VALIDATION”,“detail”:{“field_4560”:{“0”:[{“error”:“The provided value should be a valid integer or string”,“code”:“invalid”}]}}} - ERROR_REQUEST_BODY_VALIDATION

To explain what Im trying to do, im essentially trying to replicate the ability in airtable to duplicate a column then automatically link all the values in it to another table. Right now I have two tables, and I want to link all the rows in table 2 with the same name value to the corresponding row in table 1. here is an example of what im trying to do.

table 1:

table 2:

thanks

Hello Jake,

I had a similar problem when working with the API in n8n.

Baserow considers fields of the type Link to table as a field that expects an array. You can also see this in the API documentation of your database.

For example: I have a table with recipes where each recipe contains a number of ingredients. You need to pass this as an array of id’s.

So, in your case, you should adjust the field value {{$json.Name}} to [{{$json.id}}]. Even if there is only one item in the list.