Unable to log node results

Hi, I am running a workflow where I use get rows with token to fetch the rows from my Supabase table matching an id. I am trying to log the results of this node in the console but get "undefined". The get row with token works since I can see the results in an array but when I try to log the results or store them in a variable I get an error. Any pointers on what might be wrong here?
No description
No description
6 Replies
AI Support
AI Support3mo ago
Processing...
🤖 Navigating through the information maze. 🌐 this might take a couple of minutes... beep boop
AI Support
AI Support3mo ago
Sorry, there was an error processing your request. Please try again in ~1 minute
Abhishek Sahni (Abhi)
Hi, I am running a workflow where I use get rows with token to fetch the rows from my Supabase table matching an id. I am trying to log the results of this node in the console but get "undefined". The get row with token works since I can see the results in an array but when I try to log the results or store them in a variable I get an error. Any pointers on what might be wrong here?
AI Support
AI Support3mo ago
Processing...
🤖 Assembling the pieces of the puzzle. 🧩 this might take a couple of minutes... beep boop
AI Support
AI Support3mo ago
🤖 AI Response
When using the "Get Rows with Token" node in BuildShip to retrieve data from Supabase, the returned data is typically an array of objects. To access specific data, you must reference the correct array index and property. For example, to get the "access_token" from the first object, use:
yourSupabaseData.access_token
yourSupabaseData.access_token
or in BuildShip's templating:
{{ $json.access_token }}
{{ $json.access_token }}
If you want to process all items, use array methods like .map() or a loop. For example, to create a string from each item:
let results = [];
yourSupabaseData.forEach(item => {
let formattedString = `${item.firstname} ${item.lastname} will expire in ${item.days_until_expired} days`;
results.push(formattedString);
});
let results = [];
yourSupabaseData.forEach(item => {
let formattedString = `${item.firstname} ${item.lastname} will expire in ${item.days_until_expired} days`;
results.push(formattedString);
});
Always ensure you are referencing the correct index or iterating over the array as needed. If you continue to have trouble, sharing your workflow with BuildShip support can help diagnose the issue more specifically. 🔗 References: 1. https://buildship.com/integrations/apps/buildship-database-and-supabase 2. https://buildship.com/integrations/apps/supabase-and-buildship-database 3. https://support.buildship.com/m/1263523832233332809 4. https://support.buildship.com/m/1338286029383270501 5. https://support.buildship.com/m/1188126663859511337
BuildShip AI Support
Abhishek Sahni (Abhi)
For future reference, the best way to test a workflow using REST API as a trigger is to use postman to send a request and log to console.

Did you find this page helpful?