All functions in Retool return a promise, so you need to await the result. Try changing your middle line to output = await test_func(output) and see if that works.
Hey @tj11, console.log(output.data.created_at[0) should work, along with the awaited call to the function, ie: output = await test_func(output) The function call returns an object with a data property where the return value is stored.
In order for this to work, you'll need line 22 to be const stringDates = output.data.created_at
Can you run the filterSevenDays function with some hard coded test data that is equivalent to the output passed in from dataProcessing?
It looks like that function is returning undefined or running into an error of some sort. Also looks like you are just assigning the input to the new variable in_data and then returning it without making any changes. What are you expecting to happen with ourTimeDate, today and sevenDaysAgo ?
It looks like that function is returning undefined or running into an error of some sort. Also looks like you are just assigning the input to the new variable in_data and then returning it without making any changes.
At the moment, this is on purpose just to test function-calling within workflow steps. Initially, I thought filterSevenDays was failing so I just modified it to return the input.
In order for this to work, you'll need line 22 to be const stringDates = output.data.created_at
output.data did the trick. So output data from every function is returned inside a data dictionary?