Supabase delete fails

Hi my Supabase delete fails. Can anyone help me? The AI bot tells me there may be a few reasons. i checked them all and nothing helps. Here is my Node setup and here is my “metadata” field. I already checked settings, RLS is disabled, Im on a current cloud version and I can delete within the database with no issues. {
“loc”: {“lines”:{“to”:1,“from”:1}},
“source”:“blob”,“file_id”:“2ad9296c-cc2a-4988-9390-862ca8d2e985”,
“blobType”:“text/plain”,
“file_name”:“Title 2 - sample - utc8.txt”,
“source_url”:“https://www.sample.com/bulkdata/title-2”,
“updated_at”:“2025-04-09”
}

Information on your n8n setup

Shouldnt the filter have filed_id without the quotes. something like

metadata->>file_id=eq.{{ $('If!').item.json.id }}

@Saikalyan_Akunuri I tried that too. I also tried hardcoded file id. Nothing works.

I just noticed that I’m on 1.85.4 version. I’m gonna try upgrading first

@Saikalyan_Akunuri I’ve updated to the latest stable version and tried again, nothing works. I tried this metadata->>‘file_id’=eq.‘my_ID_UDID’ and metadata->>“file_id”=eq.“my_ID_UDID” and everything without quotes, and nothing works. I also execute this in SQL and it works without any issue:

DELETE FROM documents WHERE metadata->>‘file_id’ = ‘my_ID_UDID’;

I also just tried through curl and it works. Rows get deleted. What’s not working is n8n.

Its really frustrating that there is no support on this.

Are you doing a Post or a Delete request. It has to be a delete request as you want to delete a record. No reason why it shouldn’t work. Please check and revert

I also noticed that you are sending
metadata->>‘file_id’=eq.‘my_ID_UDID’
metadata->>“file_id”=eq.“my_ID_UDID”

And these don’t work, even though logically they look fine.

That’s because:

n8n sends the filter to Supabase’s PostgREST API, not as SQL.
PostgREST expects strict syntax**, especially around quotes and operators.

your API request should be something like
https://aufebgcjyjkrlekwepmy.supabase.co/rest/v1/City?id=eq.5
https://.supabase.co/rest/v1/

?id=eq.{{$json[“id”]}}

The eq. is shorthand for “equals”. It’s part of a group of operators Supabase/PostgREST supports.

Please use a http request node and try

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