I am making a Global automation rule that runs whenever a Version is updated in a specific project. The goal is that this automation will find any other Version with the same name in other projects and update them to match.
Since there is no Version query within Automations I've decided to run a Get request on each project I want to search and get a list of their versions.
When I attempt to loop through this response with a For each: Smart value; it doesn't loop through each item individually. Rather it just returns it all as one large JSON.
How can I loop through a Web Response that is an array of JSONs?
E.g. My Automation with full url redacted.
The audit log step only ever logs the FULL array of JSONs. I can never access just the {{myIterator.name}} value.
If there is an easier way to sync updates from one Version across projects I'd be happy to know.
First, I do not believe there is a REST API endpoint to get all the versions for all of the projects. Instead, you may get all the versions for a single project, and that is the endpoint you appear to be using:
Next, without seeing the specifics of your advanced branch (specifically, the smart value expression) it is difficult to know why the rule is not iterating over a list of values.
Finally, back to your apparent scenario:
GIVEN a version named "123" in Project ABC
AND there are other versions named "123" in other projects
WHEN version "123" in Project ABC is updated
THEN do something to the versions with the same name in the other projects
To do this with an automation rule, I believe you could instead:
Kind regards,
Bill
Hi Bill, thanks for the response! Changing to looping through projects and adding the version name to the query helped make the automation easier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.