I need to develop a scenario that will do other scenarios

I wanted to create a scenario that would do other scenarios, but I ran into a problem:
when I take the blueprint of the scenario I want to copy and I want to make a request to create a new scenario, I get an error because I have variables that do not apply to the scenario in which I am making another one


Welcome to the Make community!

You can remove the variables if they don’t apply.

2 Likes

But I need them in the scenario I’m copying, so I can’t delete them!

In that case you’ll need to recalculate the number of modules, set the module IDs (numbers), and then replace the references to those new module IDs in other module definitions.

You should be able to iterate the array of modules, and then reassign the module IDs accordingly using the string functions.

e.g.:

replace(json; old_id; new_id)

samliewrequest private consultation

3 Likes