Refactoring: Way to copy/paste a huge section of 1 workflow?

Hi,

We are using 1 workflow, it's now messy and too big to maintain efficiently.

Is there a way to "split" it into 2 (or more) workflows, without having to re-do everything?

Hi @som,

We don't support this copy/paste functionality currently, although it is something we are considering.

A workaround would be to duplicate your workflow, then delete all the blocks you don't need:

image

To delete a lot of blocks, one thing that might help is zooming out, pressing the shift key and dragging to select multiple blocks, then pressing the delete key.

1 Like

@andrei - just throwing in my two cents, it would be great if in a manner similar to how you can create a module in an App by selecting multiple components, it would be awesome to port something like that to workflows. Even better if it would give an option to "replace current components with new workflow" or something like that which would drop in a workflow block pointing to the objects that were used to create a sub-flow.

I often find myself going through the process you described, which isn't horrible, but if anyone is looking into this on the Retool team, consider this a plus one from me.

2 Likes

It's perfect, this way is even better than copy/paste (because reworking complex workflow requires to see every blocks). So I would rather use duplicate + cleaning than remove then copy/pasting parts. Thanks for mentioning the shift key.

However, one feature that's really lacking is the ability to visually segments many blocks together - like on Miro, or like on your screenshot when multiple blocks are selected together.

Your solution has one big issue.

It only enables to replace entire workflows, not sections (multiple blocks). So it's scary to do it for 1 reason: If I need to combine let's say 3 workflows, I won't be able to do it.

Thanks everyone for the feedback. We've created a request for this feature. I'll let you know of any updates as they come!

1 Like

Extra information: + the fact that we pay for each workflow run, makes it worst for your customers - if/when we need to revert this or split workflows.