beordo.B
BuildShip2y ago
9 replies
beordo.

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!!
CleanShot_2024-02-08_at_01.29.252x.png
CleanShot_2024-02-08_at_01.29.402x.png
CleanShot_2024-02-08_at_22.55.092x.png
Was this page helpful?