Loop OpenAI Responses to Multiple Rows in Baserow Field

I’m relatively new to using n8n and have successfully configured a Baserow node to retrieve multiple rows using the ‘GetMany’ operation. This node captures the content from the ‘Vendor Prompt’ field and passes it to the OpenAI node for processing. My current challenge is updating the ‘Vendors’ field in Baserow with the responses generated by the OpenAI node. I’m seeking guidance on the most efficient method to loop through and input the OpenAI content into each corresponding row of the ‘Vendors’ field in Baserow. Any advice or step-by-step instructions on setting up this loop within n8n would be greatly appreciated.

Also, I’d be happy if I can get help with splitting the task into batches. I have about 100k rows under 'Vendor Prompts" and I’d like the OpenAI node the process it in batches of 10,000, and of course, ignore rows that have been processed already.

Please share your workflow

##Error
ERROR: The resource you are requesting could not be found

404 - {“error”:“URL_NOT_FOUND”,“detail”:“URL /api/database/rows/table/258869// not found.”} - URL_NOT_FOUND

Information on your n8n setup

  • n8n version: Version 1.29.1
  • Database (default: SQLite): Baserow?
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default, I guess
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: Windows 10

Hey @Primus,

Welcome to the community :tada:

What you are doing seems to be pretty good but if you wanted to handle it in batches you can add a split in batches / loop items node and use that to control the batch size from the output of the Baserow node.

The error you are seeing is likely down to {{ $('Baserow').item.json.Vendors }} not being the actual ID for the row it is normally something like {{ $('Baserow').item.json.id }} as it is the internal Baserow ID that you need to use.

Hi @Jon,

Thank you for your reply.

I used {{ $('Baserow').item.json.id }} and the node executed when the Data to Send is “Auto-Map input Data to Columns”, but the data is not being passed to the field I want it passed to.

When I tried to ‘Define Below for Each Column’, I get this error despite the right field, and the field value.

I think I know the reason for the error. The field “Vendors” is an Array while the Field Value is Text. I changed the field to text and it worked. Thank you!

Hi @Jon ,

Could you please have a look at this and let me know why I’m getting the Error " Problem in node ‘Baserow‘

There might not be enough memory to finish the execution. Tips for avoiding this here"

I got it!

1 Like

Well that was a bit of fun to follow, Nice to see you have worked it out :raised_hands:

Thank you!

Now I have another issue making sure it continually loops through all the rows in Baserow :smiling_face_with_tear:: Problem Ensuring Continuous 'Split in Batch' Execution for Full Baserow Data Processing

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