DB trigger can't find supabase.httpRequest() function
I have this trigger
when i run this query
it fails as it can't find the httpRequest method
14 Replies
Did you enable webhooks?
Do you have another trigger on this table calling the http extension or the function you show above? Sort of weird it is complaining about parameters not matching and you have and a url, string (with NEW in it?) and an actual array being passed. Your trigger above does not match that pattern.
@garyaustin actually, I had other triggers, and I removed them but I still get the same issue, I have attached a screenshot of the current triggers.
and this is the trigger code
There is something strange i don't understand

What is the notify_webhook trigger?
And did you enable webhooks?
webhooks are enabled, i had other simpler webhook and it was working normally
You should go the the database/trigger UI and turn off the other trigger.
Also is your error exactly the same with the "new" trigger code you are showing? I don't see an array in that either.
no it different error now
i am trying to delete the notify_webhook but it doesn't get deleted, and there is no web_hooks in the UI (in integration ) i don't have one created through UI but i am sure that notify_webook is not on the interview table so i don't think that it will cause problem
Then number is also a string when calling the function. You have an integer.
Database Webhooks | Supabase Docs
Trigger external payloads on database events.
yes you are correct, but this doesn't solve the issue the error message at PERFORM i don't why it fails (Btw i tried make number string) now and still getting the error
the issue is most probably that i created trigger function
I had a webhook that was basically taking static inverview_id and covnersiation_id and it worked fine, when I wanted to make the static data dynamic from the newly added row i had to use JSON_build_object and in order to use this i had to create a function for the trigger
The example shows using execute.
tried to use both and it didn't work also :xd)
Sorry, I've not used the webhook function directly. Others have got it working though.
it is okay, I really appreciate your help