malte.huener
malte.huener5mo ago

How to get the right request variable?

Hi there.. I am trying to set up the following: supabase insert trigger and then get a row from another table PSEUDO: WHERE (analyses_)id == request.id The supabase trigger is set up and running, but i got problems to figure out the right variable for the "Get Row" Filter.. When i test the node with fixed value (60) it working, so I think it's a problem with the variable definition.. I run the insert trigger always with id = 60. Means i delete the row and then insert new with id = 60 Please take a look at my screenshots - thank you in advance!
No description
No description
No description
No description
No description
No description
Solution:
I got it.. After trying different things: - renaming the db table from KPIvalues to KPIvalues (though maybe have problems with' ' ) - removing secret, enter hard code API, Keys and token...
Jump to solution
5 Replies
malte.huener
malte.huener5mo ago
@Gaurav Chadha I logged variable's value as you mentioned before and now i am pretty sure, thant I adress the variable wrong. But the record object comes directly from buildship, so I really don't know, what I am doing wrong.. Please check the request data and adressed / choosen variable in the Screenshots
No description
No description
No description
malte.huener
malte.huener5mo ago
@Gaurav Chadha I figured out, that it matters in which order you write the 'javascript code' .. It's about this Log Message 'Test ${(x)record.id}' When I first add the variable trough (x) Variables -> Request Body -> record and then add write 'Test ' around it and add ${} around the (x)record it shows "Test ${ctx["root"]["supabase-webhook"]["record"].id}" as output. When I first write 'Test ' and then add the variable trough (x) Variables -> Request Body -> record inside the String it adds the ${} automaticly around the (x)record and shows "Test 60" as output. IS THIS A BUG OR A FEATURE? But I have the problem that the 'Get Row' node shows no output even when I wrote analyses_id =eq ${(x)record.id} in the right order/way.. Since it's not possible to upload Videos here, I uploaded it on Google Drive: https://drive.google.com/file/d/14Gbq52hiE1iotDCgHP7rMCVW-mVxenHh/view?usp=sharing BTW: I am using Safari browser, if that matters..
malte.huener
malte.huener5mo ago
Even when i let the filter empty, get Row shows no response in log console. When i test the node (also with empty filter), it shows me all 5 entrys.. How could that be??
No description
No description
Solution
malte.huener
malte.huener5mo ago
I got it.. After trying different things: - renaming the db table from KPIvalues to KPIvalues (though maybe have problems with' ' ) - removing secret, enter hard code API, Keys and token - having a workmate remotely on my maschine, to control for wrong writings - switching browser from safari to chrome - my workmate got it running on his maschine, with exactly same trigger, nodes, data and using my supabase db) - deleting the trigger, all nodes and build new from scratch - deleting the whole workflow and build new from scratch with no success.. Then I closed the browser, log out from my business account, logged in my private Buildship account, rebuild and it work at the first tried.. Logging out from private account, relogin to business account, build totally new workflow, trigger, nodes - it don't work.. so weird..
malte.huener
malte.huener5mo ago
success and fail.. everything same, just different accounts..
No description
No description