Update Supabase Row
I'm trying to use the Supabase "Update Row" node, but I can't get it to work.
My workflow starts with the Supabase Trigger, and that connection works: it pulls in a newly added row. The next node uses OpenAI chat to generate an output. I want to update that initial row with this output in one of the columns.
For the filter field, I'm trying to filter to that row with this code, but I can't figure out what I'm doing wrong.
- The backticks are added automatically, are they needed?
- I put ${} around the record variable (because I get an error otherwise).
- I added .id after the record variable to select the id part of that row as filter
id=eq.${ctx["root"]["supabase-webhook"]["record"].id}
For the data field, I'm assuming I only need to say what column I want to edit? I want to update a column called solution, so I used the following code:
{
'solution':'${ctx["root"]["1707174788598"]["output"]}'
}
I've added some screenshots, as well as the Supabase table columns.
How can I get this to work? Thanks!!7 Replies
Also, when I test the node with "id=eq.3", I get the result in this image:
Can you try deleting the node and adding it again then test with raw values?
@beordo. did you find the solution? because I also experienced the same error
the result remains the same
I tried with static values, I made sure everything was correct and the results were like this
What do you mean with "raw values"? I deleted the node and tried again but no change
No solution yet @fikrilal. What code / syntax are you using? Same as me?
try it with javascript
Hi @fikrilal @beordo. You can refer to this. https://discord.com/channels/853498675484819476/1206060571376615444.