tlawrence
tlawrence5mo ago

More then 1 Record Insert

I have an Node the returns the response of an API that contains many "objects" and I want to insert each object as a row into my suppabase table. It looks like the suppbase create row node, just does one record at a time. What's the best way to insert "many" rows into my supabase table from an API call?
3 Replies
AI Support
AI Support5mo ago
To insert multiple rows into your Supabase table from an API call, you can use a loop to iterate over each object and insert them one by one. Here’s a general approach: 1. Fetch API Data: Use a node to fetch the data from your API. 2. Loop Over Data: Use a loop node to iterate over each object in the API response. 3. Insert Rows: Within the loop, use the Supabase Create Row node to insert each object as a row into your Supabase table. For more details on connecting and performing operations with Supabase in BuildShip, you can refer to the documentation here. If you need further assistance, please submit your query via the in-app support button. This solution is marked as answered ✅
Luis
Luis5mo ago
Hi @tlawrence, the "Create Row" node actually supports inserting multiple records by passing them as an array:
No description
AI Support
AI Support5mo ago
Certainly! The "Create Row" node in BuildShip does support inserting multiple records by passing them as an array. You can configure the node to accept an array of JSON objects, each representing a record you want to insert into your Supabase table. For more detailed instructions, you can refer to the BuildShip documentation on integrating Supabase. If you have any further questions or need additional assistance, please submit your query via the in-app support button.