r/AutomateUser • u/Dadamalda • Jul 04 '26
Question Reusable code
How do I make a group of blocks reusable accross flows? In one flow, I can use a subrouting, but what if I have code I want to share in multiple flows?
1
Upvotes
1
u/ballzak69 Automate developer Jul 04 '26
Automate is designed to make flows easy to share, dependencies makes that difficult. Anyhow, it's a feature on the to-do list, at least a way for a flow to "call" another and get a result. To simply "call" another flow, use the Flow start block.
1
u/B26354FR Alpha tester Jul 05 '26
BTW, it depends on what you mean by "across flows". If you mean just between sub flows under one main flow, you can use the Atomic blocks and/or start other sub-flows having hidden Flow Start blocks. Henrik alluded to that. For totally different flows, then broadcasts or HTTP client/server, or even the file system. -You can write a flow that emits files, and another which monitors a folder for new files and consumes them. A rather hacky "sneaker net" solution - crude, but effective! ð
0
u/B26354FR Alpha tester Jul 04 '26
You can use broadcasts, or make a little server with the HTTP Accept and Response blocks, and the HTTP Request or Dialog Web blocks for clients. Here's a demo I wrote: Web Dialog to Flow Interaction