Google Sheet => HTTP Make a request for Supabase Insert/Update in table named ‘property’ (UPSERT operation)
Google sheet has 5000 rows with 3 columns like external_id, name, city
Supabase : table ‘property’ with column external_id, name, city
created UNIQUE Constraint on external_id
Enabled RLS . Also created all the policy for Select , Insert, Update
What is the problem?
Currently am testing in free plan.
I am using Google Sheets => Array Aggregator => HTTP Make a Request (using API Key)
But not sure how to prepare the batch size of 100 rows, so that i can 100 rows at a time to HTTP to minimize the API call . Also tackle the timeout issue and performance
What have you tried so far?
Google Sheet => Array Aggregator => HTTP Make a Request
It depends on how your Supabase endpoint is implemented.
If your current setup accepts only one record per request, then you won’t be able to avoid making multiple requests. In that case, batching on the Make side does not make much sense.
However, Supabase can accept arrays for insert/upsert, so you can send multiple records in a single request.
What you can do in that case:
Use Aggregate to JSON to build a proper array payload, or use Text Aggregator if you have simple data and don’t want to work with data structures
Send this array in a single HTTP request to Supabase
This way, you reduce the number of operations and avoid timeout issues. But as mentioned - if the endpoint accepts only one record per request, you won’t be able to avoid making multiple requests.
Thanks Michal. Aggregate to JSON worked. But in the internet I can see many people says, in Production, Instead of 5000 rows → 1 request , Do 5000 rows → chunks of 100 → 50 requests. How to do this ?