Ability to download data from workflow block

I'm trying to debug a workflow and one of my blocks generates an array of ~400+ items, each potentially containing dozens more arrays - so it's a decent amount of data. There is a "copy JSON" button in the run history view, but in a case like this with so much data, it usually causes the browser to hand/crash. It would be great to either add some additional debug capabilities - like loading the data into a console variable so I could map/filter over it, or download the JSON data as a file, so I can debug in another tool.

While I'm here, it would also be great to be able to open/go-to a block from the Run History Block list vs having to scroll around my workflow to find the block to look at the code.

Hello @MikeCB!

Apologies for the inconvenience viewing the data from the workflow :sweat_smile:

I can definitely make a feature request for a "download JSON data" option to export this data to a file for further analysis.

I can definitely let the workflows team know as well that the "copy JSON" button can cause apps to crash, as we definitely do not want that happening. Once that is addressed it might be easier to handle the data in other ways such as you described with "loading the data into a console variable to map/filter over".

For your other request, I can make a request for that as well. So that when viewing a block in the "Run History" that the app can visually navigate the user to the block that they click on. This sounds like a cool idea and will definitely help users to look at the code and navigate complex apps.

1 Like

That’d be great, thanks Jack!

1 Like

I don't know if this will help in the meantime, but here's a workflow that can convert JSON to base64 and save it in Retool Storage or it can load a file and convert the contents to JSON. you can use the 2nd workflow that uses a chunking strategy by setting {"chunk": true}.... if it's stored chunked, be sure to load it using chunking also (there are no checks for trying to load json from a single file when it was stored in chunks)

Convert JSON & Store_Load As File.json (42.0 KB)

helper functions:


image

load json from single file:

store json as single file:

since you mentioned file size is an issue, here's a version that implements a chunking strategy (1MB chunks) for loading and storing:
Workflow With Chunking (70.9 KB)

helper function for loop block:
image

loading chunks:

storing chunks:

2 Likes

Amazing @bobthebear!!!
:tada: :tada: :tada:

1 Like