I want to use the COUNT option in Supabase to retrieve number of rows instead of row values. E.g. instead of returning “apple”, “banana”, “monkey”, it will return “3” as the output. Current Supabase Node doesn’t support that (correct me if I’m wrong) so I’m using HTTPs node to send a GET request.
My Supabase Messages Table structure
GET the count of rows for column message_bot that matches a specific user_id and chat_id.
Reason to get count and not values
My guess here is if I retrieve 1,000 message_bot values instead of just a number like “4”, it will increase the load on the flow and server. So performance wise I’d rather just get the count than values.
Not sure how to translate/apply the JS selector in Supabase Docs and Stackoverflow answer to n8n https node. Like how can I use that “COUNT” option in the HTTPS node or Supabase node (if possible).
Supabase Docs on how to use COUNT option in JS
See parameters, options toggle, count
Stackoverflow guide on how to use COUNT
ERROR: Bad request - please check your parameters
“failed to parse filter (exact)” (line 1, column 1)
Current output is “Apple”, “Banana”, “Monkey” which is the text values of the message_bot but I want the output to be “3”, just the count
- **n8n version:**1.1.1
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker