How can I route different PDF operations dynamically in Make?

:bullseye: What is your goal?

I want to build a Make scenario where a PDF file comes into the workflow together with an operation such as merge, split, compress, or convert, and the scenario automatically sends the file to the appropriate PDF-processing step.

:thinking: What is the problem & what have you tried?

I have been testing a workflow where a PDF is received from a previous module and the requested operation is stored as a value. I can use a Router with filters for known operations, but I’m unsure whether this is the best approach when the operation changes dynamically.
I have tried using Router filters based on the operation value, but I’m also trying to understand the best way to keep the PDF binary data available on each route without downloading or processing the same file unnecessarily.
What would be the recommended Make architecture for this type of workflow? Should I use a Router with predefined filters, or is there a better pattern using mapping, variables, or another module?

Hey there,

Yes, routers with filters is the standard way.
Also, you can download the file before the router, then it will be available in all routes.