I have a Javascript Block that is storing API responses to an Array, but also I am posting each response to the console via console.log
Is there a way to access the logs in a future block so that I can upload those logs to a database, or best yet within my javascript post directly to a database resource?
Given that it's about 300k records I need to avoid running the entire workflow 300k times ![:slight_smile: :slight_smile:](https://community.retool.com/images/emoji/apple/slight_smile.png?v=12)
Of course you can reference previous block. Just {{ ReferenceTheBlocks.data }}
and you can use it's output.
I'm kinda doing that already by storing responses in an array and then inserting the array into my database following the previous block. I'm was hoping there was a way that as the API responses come in I could store them one at a time into my database, that way if my block fails I don't lose everything that was attempted.
Could you use the loop component and derive your own handler to loop over each record?
![image](https://community.retool.com/uploads/default/original/3X/2/7/2781d81a3b74d3eb3a8b0ba92f262fc2c8e0a854.png)